-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yolov3 #103
Yolov3 #103
Conversation
libs/classifiers/classifier.py
Outdated
object['face_label'] = classifier_result | ||
else: | ||
object['face_label'] = -1 | ||
if object.get('face') is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you check for existence, please do it with if 'face' in object
rather than using .get()
, I THINK if someday having None as the value of the key 'face' will be meaningful, this breaks the code as it exists but returns None.
libs/detectors/x86/yolov3.py
Outdated
print('model does not exist under: ', self.model_path, 'downloading from ', url) | ||
wget.download(url, self.model_path) | ||
|
||
self.nms_thesh = 0.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you meant nms_thresh
, missed the r
.
score = float(pred[5].cpu) | ||
if cls == 0: # person class index is '0' at coco dataset | ||
bbox_dict = {"id": "1-" + str(i), | ||
"bbox": [c1[1] / self.h, c1[0] / self.w, c2[1] / self.h, c2[0] / self.w], "score": score, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this float division? self.w and self.h are integers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c1 and c2 both are int
. The division works for normalizing the bbox.
; using openpifpaf (openpifpaf detects both faces and pedestrians) | ||
ImageSize = 1281,721,3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we keep this resolution for OpenPifPaf in a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
Adding yolov3 detector.