• Jebastin Nadar's avatar
    Refactor `Detect()` anchors for ONNX <> OpenCV DNN compatibility (#4833) · 9d75e42f
    Jebastin Nadar 提交于
    * 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: 's avatarGlenn Jocher <glenn.jocher@ultralytics.com>
    9d75e42f
tf.py 19.8 KB