ultralytics 8.0.18 new python callbacks and minor fixes (#580)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jeroen Rombouts <36196499+jarombouts@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Ayush Chaurasia 2023-01-23 23:01:29 +05:30 committed by GitHub
parent e9ab157330
commit 936414c615
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 136 additions and 106 deletions

View file

@ -87,7 +87,7 @@ class SegmentationPredictor(DetectionPredictor):
c = int(cls) # integer class
label = None if self.args.hide_labels else (
self.model.names[c] if self.args.hide_conf else f'{self.model.names[c]} {conf:.2f}')
self.annotator.box_label(d.xyxy.squeeze(), label, color=colors(c, True))
self.annotator.box_label(d.xyxy.squeeze(), label, color=colors(c, True)) if self.args.boxes else None
if self.args.save_crop:
imc = im0.copy()
save_one_box(d.xyxy,