Spaces:
Sleeping
Sleeping
thanhson28
commited on
Commit
•
10d200c
1
Parent(s):
e7fd1a1
Update libs/person_detector.py
Browse files- libs/person_detector.py +3 -3
libs/person_detector.py
CHANGED
@@ -262,8 +262,8 @@ class PersonDetectorAttrib(PersonDetector):
|
|
262 |
def visualize(image, objs):
|
263 |
bboxes = [obj['points'] for obj in objs]
|
264 |
bboxes = np.array(bboxes)
|
265 |
-
classnames = [ACTION[obj['actions_label']] +
|
266 |
-
"-" + POSE[obj['poses_label']] for obj in objs]
|
267 |
labels = [i for i in range(len(objs))]
|
268 |
# put rectangle as background of text
|
269 |
# thickness=4, font_size=1 for image with size 1284 962 set thickness, font_size base on image size
|
@@ -274,4 +274,4 @@ class PersonDetectorAttrib(PersonDetector):
|
|
274 |
|
275 |
image = draw_bboxes(image, bboxes, color=(
|
276 |
0, 0, 255), thickness=thickness, font_size=font_size, classnames=classnames, labels=labels)
|
277 |
-
return image
|
|
|
262 |
def visualize(image, objs):
|
263 |
bboxes = [obj['points'] for obj in objs]
|
264 |
bboxes = np.array(bboxes)
|
265 |
+
classnames = [f"ID-{i}: "+ACTION[obj['actions_label']] +
|
266 |
+
"-" + POSE[obj['poses_label']] for i, obj in enumerate(objs)]
|
267 |
labels = [i for i in range(len(objs))]
|
268 |
# put rectangle as background of text
|
269 |
# thickness=4, font_size=1 for image with size 1284 962 set thickness, font_size base on image size
|
|
|
274 |
|
275 |
image = draw_bboxes(image, bboxes, color=(
|
276 |
0, 0, 255), thickness=thickness, font_size=font_size, classnames=classnames, labels=labels)
|
277 |
+
return image, classnames
|