当前位置:   article > 正文

Yolov9的DualDDetect层

Yolov9的DualDDetect层

Yolov9中DualDDetect是两个DDetect的级联,而DDetect则是一个完全解耦的检测模块。

train_dual: one aux branch + one main branch.

triple_branch: two aux branches + one main branch

Provide these codes to show how to extend aux branches for training. Everyone could follow the rule to make related researches. For example, we also extend train_multiple to implement training strategy which is similar to Co-DETR.

  1. class DualDDetect(nn.Module):
  2. # YOLO Detect head for detection models
  3. dynamic = False # force grid reconstruction
  4. export = False # export mode
  5. shape = None
  6. anchors = torch.empty(0) # init
  7. strides = torch.empty(0) # init
  8. def __init__(self, nc=80, ch=(), inplace=True): # detection layer
  9. super().__init__()
  10. self.nc = nc # number of classes
  11. self.nl = len(ch) // 2 # number of detection layers
  12. self.reg_max = 16
  13. self.no
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/159571
推荐阅读
相关标签
  

闽ICP备14008679号