Commit Graph
4 Commits
Author SHA1 Message Date
Jebastin Nadar e0c3f42de7 Uncomment OpenCV 4.5.4 requirement in detect.py (#5305) 2021-10-23 13:40:34 +02:00
Jebastin NadarandGlenn Jocher 9d75e42f98 Refactor Detect() anchors for ONNX <> OpenCV DNN compatibility (#4833)
* refactor anchors and anchor_grid in Detect Layer

* fix CI failures by adding compatibility

* fix tf failure

* fix different devices errors

* Cleanup

* fix anchors overwriting issue

* better refactoring

* Remove self.anchor_grid shape check (redundant with self.grid check)

Also PEP8 / 120 line width

* Convert _make_grid() from static to dynamic method

* Remove anchor_grid.to(device)

clone() should already clone to same device as self.anchors

* fix different devices error

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-11 09:58:42 -07:00
Jebastin NadarandGlenn Jocher a0e15046c3 Fix different devices bug when moving model from GPU to CPU (#5110)
* fix different devices bug

* extend _apply() instead of to() for a general fix

* Only apply if Detect() is last layer

Co-authored-by: Jebastin Nadar <njebastin10@gmail.com>

* Indent fix

* Add comment to yolo.py

* Add comment to common.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-10 14:24:05 -07:00
Jebastin Nadar 1492632796 Fix zipfile name for coco128-segments (#4914) 2021-09-25 06:43:24 -07:00