check_requirements() exclude `opencv-python` (#3507)
Browse filesDuplicate of #3495 merged to `develop`. This PR will be merged to `master`.
Fixes https://github.com/ultralytics/yolov5/issues/3494.
- hubconf.py +2 -1
hubconf.py
CHANGED
@@ -30,7 +30,8 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo
|
|
30 |
from utils.google_utils import attempt_download
|
31 |
from utils.torch_utils import select_device
|
32 |
|
33 |
-
check_requirements(Path(__file__).parent / 'requirements.txt',
|
|
|
34 |
set_logging(verbose=verbose)
|
35 |
|
36 |
fname = Path(name).with_suffix('.pt') # checkpoint filename
|
|
|
30 |
from utils.google_utils import attempt_download
|
31 |
from utils.torch_utils import select_device
|
32 |
|
33 |
+
check_requirements(requirements=Path(__file__).parent / 'requirements.txt',
|
34 |
+
exclude=('tensorboard', 'pycocotools', 'thop', 'opencv-python'))
|
35 |
set_logging(verbose=verbose)
|
36 |
|
37 |
fname = Path(name).with_suffix('.pt') # checkpoint filename
|