Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslahm committed May 23, 2024
1 parent 1d81b4a commit 841fa14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ yolo predict model=yolov10n/s/m/b/l/x.engine

## Acknowledgement

The code base is built with [ultralytics](https://github.com/ultralytics/ultralytics) and [RT-DETR](https://github.com/lyuwenyu/RT-DETR)
The code base is built with [ultralytics](https://github.com/ultralytics/ultralytics) and [RT-DETR](https://github.com/lyuwenyu/RT-DETR).

Thanks for the great implementations!

Expand Down
4 changes: 3 additions & 1 deletion ultralytics/nn/modules/head.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,9 @@ def __init__(self, nc=80, ch=()):

def forward(self, x):
one2one = self.forward_feat([xi.detach() for xi in x], self.one2one_cv2, self.one2one_cv3)
if not self.export:
one2many = super().forward(x)

if not self.training:
one2one = self.inference(one2one)
if not self.export:
Expand All @@ -519,7 +522,6 @@ def forward(self, x):
boxes, scores, labels = ops.v10postprocess(one2one.permute(0, 2, 1), self.max_det)
return torch.cat([boxes, scores.unsqueeze(-1), labels.unsqueeze(-1)], dim=-1)
else:
one2many = super().forward(x)
return {"one2many": one2many, "one2one": one2one}

def bias_init(self):
Expand Down

0 comments on commit 841fa14

Please sign in to comment.