glenn-jocher
commited on
Commit
•
7875f4c
1
Parent(s):
d2da523
reverse plotting low to high confidence
Browse files
detect.py
CHANGED
@@ -100,7 +100,7 @@ def detect(save_img=False):
|
|
100 |
s += '%g %ss, ' % (n, names[int(c)]) # add to string
|
101 |
|
102 |
# Write results
|
103 |
-
for *xyxy, conf, cls in det:
|
104 |
if save_txt: # Write to file
|
105 |
xywh = (xyxy2xywh(torch.tensor(xyxy).view(1, 4)) / gn).view(-1).tolist() # normalized xywh
|
106 |
with open(txt_path + '.txt', 'a') as f:
|
|
|
100 |
s += '%g %ss, ' % (n, names[int(c)]) # add to string
|
101 |
|
102 |
# Write results
|
103 |
+
for *xyxy, conf, cls in reversed(det):
|
104 |
if save_txt: # Write to file
|
105 |
xywh = (xyxy2xywh(torch.tensor(xyxy).view(1, 4)) / gn).view(-1).tolist() # normalized xywh
|
106 |
with open(txt_path + '.txt', 'a') as f:
|