ultralytics 8.0.226 Validator Path and Tuner space (#6901)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Muhammad Rizwan Munawar <chr043416@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: DennisJ <106725464+DennisJcy@users.noreply.github.com>
Co-authored-by: Kirill Ionkin <56236621+kirill-ionkin@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-12-10 18:15:59 +01:00 committed by GitHub
parent 6e660dfaaf
commit 412eb57fca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 60 additions and 22 deletions

View file

@ -2,6 +2,7 @@
import cv2
from ultralytics.utils.checks import check_imshow
from ultralytics.utils.plotting import Annotator
@ -32,6 +33,9 @@ class AIGym:
self.view_img = False
self.annotator = None
# Check if environment support imshow
self.env_check = check_imshow(warn=True)
def set_args(self,
kpts_to_check,
line_thickness=2,
@ -120,7 +124,7 @@ class AIGym:
self.annotator.kpts(k, shape=(640, 640), radius=1, kpt_line=True)
if self.view_img:
if self.env_check and self.view_img:
cv2.imshow('Ultralytics YOLOv8 AI GYM', self.im0)
if cv2.waitKey(1) & 0xFF == ord('q'):
return