Skip to content

Commit

Permalink
Update Detections() self.n comment (ultralytics#2620)
Browse files Browse the repository at this point in the history
```python
        self.n = len(self.pred)  # number of images (batch size)
```
  • Loading branch information
glenn-jocher authored Mar 26, 2021
1 parent f3bb8f7 commit 9c8de4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __init__(self, imgs, pred, files, times=None, names=None, shape=None):
self.xywh = [xyxy2xywh(x) for x in pred] # xywh pixels
self.xyxyn = [x / g for x, g in zip(self.xyxy, gn)] # xyxy normalized
self.xywhn = [x / g for x, g in zip(self.xywh, gn)] # xywh normalized
self.n = len(self.pred)
self.n = len(self.pred) # number of images (batch size)
self.t = tuple((times[i + 1] - times[i]) * 1000 / self.n for i in range(3)) # timestamps (ms)
self.s = shape # inference BCHW shape

Expand Down

0 comments on commit 9c8de4f

Please sign in to comment.