From 0d891c601e8178e4b9665da46d630456668b1996 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 23 Mar 2021 14:25:55 +0100 Subject: [PATCH] check_requirements() exclude pycocotools, thop (#2571) Exclude non-critical packages from dependency checks in detect.py. pycocotools and thop in particular are not required for inference. Issue first raised in https://github.com/ultralytics/yolov5/issues/1944 and also raised in https://github.com/ultralytics/yolov5/discussions/2556 --- detect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect.py b/detect.py index 22bf21b4c825..c843447260ba 100644 --- a/detect.py +++ b/detect.py @@ -164,7 +164,7 @@ def detect(save_img=False): parser.add_argument('--exist-ok', action='store_true', help='existing project/name ok, do not increment') opt = parser.parse_args() print(opt) - check_requirements() + check_requirements(exclude=('pycocotools', 'thop')) with torch.no_grad(): if opt.update: # update all models (to fix SourceChangeWarning)