Webcam inference fix (#202)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Ayush Chaurasia
2023-01-10 22:59:11 +05:30
committed by GitHub
parent dba3f17884
commit e371e81aa0
4 changed files with 11 additions and 7 deletions

View File

@ -87,7 +87,7 @@ class DetectionPredictor(BasePredictor):
def predict(cfg):
cfg.model = cfg.model or "yolov8n.pt"
cfg.imgsz = check_imgsz(cfg.imgsz, min_dim=2) # check image size
cfg.source = cfg.source or ROOT / "assets"
cfg.source = cfg.source if cfg.source is not None else ROOT / "assets"
predictor = DetectionPredictor(cfg)
predictor()