diff --git a/detect.py b/detect.py index 0ec51b8..c51d865 100644 --- a/detect.py +++ b/detect.py @@ -107,7 +107,7 @@ def detect(save_img=False): f.write(('%g ' * 5 + '\n') % (cls, *xywh)) # label format if save_img or view_img: # Add bbox to image - label = '%s' % (names[int(cls)]) + label = '%s' % (names[int(cls)]) if len(names) > 1 else None plot_one_box(xyxy, im0, label=label, color=colors[int(cls)], line_thickness=2) # Print time (inference + NMS)