check_requirements() exclude opencv-python (#3495)

Fix for 3rd party or contrib versions of installed OpenCV as in https://github.com/ultralytics/yolov5/issues/3494.
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-06-07 10:03:47 +02:00
1 parent a1c3572bc9
commit 90b7895d65
1 file changed
+2 -1
+2 -1
View File
@@ -30,7 +30,8 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo
from utils.google_utils import attempt_download
from utils.torch_utils import select_device
check_requirements(Path(__file__).parent / 'requirements.txt', exclude=('tensorboard', 'pycocotools', 'thop'))
check_requirements(requirements=Path(__file__).parent / 'requirements.txt',
exclude=('tensorboard', 'pycocotools', 'thop', 'opencv-python'))
set_logging(verbose=verbose)
fname = Path(name).with_suffix('.pt') # checkpoint filename