Feat/content analyser pro (#859)
* Update to Yolo powered content analyser * Update to Yolo powered content analyser * Fix typing * Drop bounding boxes and NMS check * Drop bounding boxes and NMS check * Fix CI
This commit is contained in:
@@ -208,9 +208,9 @@ def estimate_face_angle(face_landmark_68 : FaceLandmark68) -> Angle:
|
||||
return face_angle
|
||||
|
||||
|
||||
def apply_nms(bounding_boxes : List[BoundingBox], face_scores : List[Score], score_threshold : float, nms_threshold : float) -> Sequence[int]:
|
||||
def apply_nms(bounding_boxes : List[BoundingBox], scores : List[Score], score_threshold : float, nms_threshold : float) -> Sequence[int]:
|
||||
normed_bounding_boxes = [ (x1, y1, x2 - x1, y2 - y1) for (x1, y1, x2, y2) in bounding_boxes ]
|
||||
keep_indices = cv2.dnn.NMSBoxes(normed_bounding_boxes, face_scores, score_threshold = score_threshold, nms_threshold = nms_threshold)
|
||||
keep_indices = cv2.dnn.NMSBoxes(normed_bounding_boxes, scores, score_threshold = score_threshold, nms_threshold = nms_threshold)
|
||||
return keep_indices
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user