mirror of
https://github.com/AmanIbrash-brsh/emotional_damage.git
synced 2026-11-09 10:15:09 +00:00
21 lines
726 B
Python
21 lines
726 B
Python
import cv2
|
|
import mediapipe as mp
|
|
from mediapipe.tasks import python
|
|
from mediapipe.tasks.python import vision
|
|
|
|
print("Imports successful")
|
|
|
|
# Face Detector
|
|
base_options_face = python.BaseOptions(model_asset_path='face_detector.tflite')
|
|
options_face = vision.FaceDetectorOptions(base_options=base_options_face)
|
|
detector = vision.FaceDetector.create_from_options(options_face)
|
|
print("Face detector created")
|
|
|
|
# Pose Landmarker
|
|
base_options_pose = python.BaseOptions(model_asset_path='pose_landmarker.task')
|
|
options_pose = vision.PoseLandmarkerOptions(
|
|
base_options=base_options_pose,
|
|
output_segmentation_masks=False)
|
|
landmarker = vision.PoseLandmarker.create_from_options(options_pose)
|
|
print("Pose landmarker created")
|