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>
正在显示
请
注册
或者
登录
后发表评论