Update utils/emotion_detection_brainai.py
Browse files
utils/emotion_detection_brainai.py
CHANGED
|
@@ -49,8 +49,8 @@ class EmotionModel:
|
|
| 49 |
def post_process_face(self, result_face, img, conf=0.5):
|
| 50 |
boxes = []
|
| 51 |
h,w,_ = img.shape
|
| 52 |
-
|
| 53 |
-
confidence =
|
| 54 |
|
| 55 |
top_predictions = predictions[(confidence>conf)] # 임계값보다 큰 conf 값을 가진 예측만 선택
|
| 56 |
for detection in top_predictions:
|
|
|
|
| 49 |
def post_process_face(self, result_face, img, conf=0.5):
|
| 50 |
boxes = []
|
| 51 |
h,w,_ = img.shape
|
| 52 |
+
predictions = result_face[0][0] # 하위 집합 데이터 프레임
|
| 53 |
+
confidence = predictions[:,2] # conf 값 가져오기 [img_id, label, conf, x_min, y_min, x_max, y_max]
|
| 54 |
|
| 55 |
top_predictions = predictions[(confidence>conf)] # 임계값보다 큰 conf 값을 가진 예측만 선택
|
| 56 |
for detection in top_predictions:
|