reverse plotting low to high confidence

pull/1/head
Glenn Jocher 5 years ago
parent d2da523053
commit 7875f4c1fb

@ -100,7 +100,7 @@ def detect(save_img=False):
s += '%g %ss, ' % (n, names[int(c)]) # add to string
# Write results
for *xyxy, conf, cls in det:
for *xyxy, conf, cls in reversed(det):
if save_txt: # Write to file
xywh = (xyxy2xywh(torch.tensor(xyxy).view(1, 4)) / gn).view(-1).tolist() # normalized xywh
with open(txt_path + '.txt', 'a') as f:

Loading…
Cancel
Save