Skip to content
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

Merged
merged 15 commits into from
Dec 28, 2020
Merged

Yolov3 #103

merged 15 commits into from
Dec 28, 2020

Conversation

mrn-mln
Copy link
Contributor

@mrn-mln mrn-mln commented Dec 19, 2020

Adding yolov3 detector.

object['face_label'] = classifier_result
else:
object['face_label'] = -1
if object.get('face') is not None:
Copy link
Contributor

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.

print('model does not exist under: ', self.model_path, 'downloading from ', url)
wget.download(url, self.model_path)

self.nms_thesh = 0.5
Copy link
Contributor

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,
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor

@mhejrati mhejrati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,

@mhejrati mhejrati merged commit fe689a5 into galliot-us:master Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants