|
--- |
|
license: apache-2.0 |
|
datasets: |
|
- HuggingFaceFW/fineweb-edu |
|
language: |
|
- av |
|
metrics: |
|
- character |
|
library_name: adapter-transformers |
|
pipeline_tag: image-to-video |
|
--- |
|
---import cv2 |
|
import dlib |
|
import numpy as np |
|
import torch |
|
from transformers import pipeline |
|
|
|
# Carregar o detector de rostos |
|
detector = dlib.get_frontal_face_detector() |
|
predictor = dlib.shape_predictor('shape_predictor_68_face_landmarks.dat') |
|
|
|
# Função para detectar e alinhar rostos |
|
def detect_and_align_face(image_path): |
|
img = cv2.imread(image_path) |
|
gray = cv2 |
|
license: apache-2.0 |
|
--- |