jhj0517
commited on
Commit
·
29877df
1
Parent(s):
3b34b71
Let face detect in proper device
Browse files
modules/live_portrait/live_portrait_inferencer.py
CHANGED
@@ -113,7 +113,7 @@ class LivePortraitInferencer:
|
|
113 |
self.stitching_retargeting_module
|
114 |
)
|
115 |
|
116 |
-
self.detect_model = YOLO(MODEL_PATHS["face_yolov8n"])
|
117 |
|
118 |
def edit_expression(self,
|
119 |
rotate_pitch=0,
|
@@ -405,7 +405,7 @@ class LivePortraitInferencer:
|
|
405 |
return cmd_list, total_length
|
406 |
|
407 |
def get_face_bboxes(self, image_rgb):
|
408 |
-
pred = self.detect_model(image_rgb, conf=0.7, device=
|
409 |
return pred[0].boxes.xyxy.cpu().numpy()
|
410 |
|
411 |
def detect_face(self, image_rgb, crop_factor, sort = True):
|
|
|
113 |
self.stitching_retargeting_module
|
114 |
)
|
115 |
|
116 |
+
self.detect_model = YOLO(MODEL_PATHS["face_yolov8n"]).to(self.device)
|
117 |
|
118 |
def edit_expression(self,
|
119 |
rotate_pitch=0,
|
|
|
405 |
return cmd_list, total_length
|
406 |
|
407 |
def get_face_bboxes(self, image_rgb):
|
408 |
+
pred = self.detect_model(image_rgb, conf=0.7, device=self.device)
|
409 |
return pred[0].boxes.xyxy.cpu().numpy()
|
410 |
|
411 |
def detect_face(self, image_rgb, crop_factor, sort = True):
|