zldrobit / tfjs-yolov5-example

TensorFlow.js example for YOLOv5
https://codesandbox.io/s/github/zldrobit/tfjs-yolov5-example
88 stars 30 forks source link

Simplified detection box and labeling code #1

Closed Zengyf-CVer closed 2 years ago

Zengyf-CVer commented 3 years ago

This fix a few days ago: https://github.com/ultralytics/yolov5/pull/1127#issuecomment-873329531

zldrobit commented 3 years ago

Thanks for your PR! I see that two loops are merged into one and redundant calculations (e.g. coords and scores estimation) are eliminated. However, putting the text drawing after the first loop is to avoid occlusions by the bounding boxes, which is also described by the comment: https://github.com/zldrobit/tfjs-yolov5-example/blob/12267bfddd67940ec8b4e8e8e4c0439ffb20820f/src/index.js#L112-L114

zldrobit commented 2 years ago

Closing the issue :D