glenn-jocher commited on
Commit
005d7a8
1 Parent(s): 8f6e447

Update Detections() self.n comment (#2620)

Browse files

```python
self.n = len(self.pred) # number of images (batch size)
```

Files changed (1) hide show
  1. models/common.py +1 -1
models/common.py CHANGED
@@ -247,7 +247,7 @@ class Detections:
247
  self.xywh = [xyxy2xywh(x) for x in pred] # xywh pixels
248
  self.xyxyn = [x / g for x, g in zip(self.xyxy, gn)] # xyxy normalized
249
  self.xywhn = [x / g for x, g in zip(self.xywh, gn)] # xywh normalized
250
- self.n = len(self.pred)
251
  self.t = tuple((times[i + 1] - times[i]) * 1000 / self.n for i in range(3)) # timestamps (ms)
252
  self.s = shape # inference BCHW shape
253
 
 
247
  self.xywh = [xyxy2xywh(x) for x in pred] # xywh pixels
248
  self.xyxyn = [x / g for x, g in zip(self.xyxy, gn)] # xyxy normalized
249
  self.xywhn = [x / g for x, g in zip(self.xywh, gn)] # xywh normalized
250
+ self.n = len(self.pred) # number of images (batch size)
251
  self.t = tuple((times[i + 1] - times[i]) * 1000 / self.n for i in range(3)) # timestamps (ms)
252
  self.s = shape # inference BCHW shape
253