Unverified 提交 0d891c60 authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

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
上级 1c132a1f
...@@ -164,7 +164,7 @@ if __name__ == '__main__': ...@@ -164,7 +164,7 @@ if __name__ == '__main__':
parser.add_argument('--exist-ok', action='store_true', help='existing project/name ok, do not increment') parser.add_argument('--exist-ok', action='store_true', help='existing project/name ok, do not increment')
opt = parser.parse_args() opt = parser.parse_args()
print(opt) print(opt)
check_requirements() check_requirements(exclude=('pycocotools', 'thop'))
with torch.no_grad(): with torch.no_grad():
if opt.update: # update all models (to fix SourceChangeWarning) if opt.update: # update all models (to fix SourceChangeWarning)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论