Merge PIL and OpenCV in plot_one_box(use_pil=False) (#4416)

* Merge PIL and OpenCV box plotting functions

* Add ASCII check to plot_one_box

* Cleanup

* Cleanup2
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-08-14 17:44:15 +02:00
1 parent 63e09fdc48
commit 2da4e7acf7
4 files changed
+34 -31

No files matched your search

+1 -1
View File
@@ -354,7 +354,7 @@ class Detections:
if crop:
save_one_box(box, im, file=save_dir / 'crops' / self.names[int(cls)] / self.files[i])
else: # all others
plot_one_box(box, im, label=label, color=colors(cls))
im = plot_one_box(box, im, label=label, color=colors(cls))
else:
str += '(no detections)'