赞
踩
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.
- class DualDDetect(nn.Module):
- # YOLO Detect head for detection models
- dynamic = False # force grid reconstruction
- export = False # export mode
- shape = None
- anchors = torch.empty(0) # init
- strides = torch.empty(0) # init
-
- def __init__(self, nc=80, ch=(), inplace=True): # detection layer
- super().__init__()
- self.nc = nc # number of classes
- self.nl = len(ch) // 2 # number of detection layers
- self.reg_max = 16
- self.no
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。