Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
Cython
matplotlib>=3.2.2
numpy>=1.18.5
opencv-python>=4.1.2
Pillow
PyYAML>=5.3.1
PyYAML
scipy>=1.4.1
tensorboard>=1.5
torch==1.7.0
Expand Down
6 changes: 5 additions & 1 deletion utils/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ def plot_images(images, targets, paths=None, fname='images.jpg', names=None, max
for j, box in enumerate(boxes.T):
cls = int(classes[j])
color = colors[cls % len(colors)]
cls = names[cls] if names else cls
if names:
if len(names) == 1: # when training 1 class detector, error occurs in here
cls = names[0]
else:
cls = names[cls]
if labels or conf[j] > 0.25: # 0.25 conf thresh
label = '%s' % cls if labels else '%s %.1f' % (cls, conf[j])
plot_one_box(box, mosaic, label=label, color=color, line_thickness=tl)
Expand Down