From 3e8c89d5abb4ace951ffb1bc003fba7b3866c732 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 16 Jul 2020 13:37:58 -0700 Subject: [PATCH 1/2] update requirements.txt --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0deceac..4c2cce1 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,13 @@ # pip install -U -r requirements.txt Cython -numpy==1.17.3 +numpy>=1.18.5 opencv-python torch>=1.5.1 matplotlib pillow tensorboard PyYAML>=5.3 -torchvision +torchvision>=0.6 scipy tqdm git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI From 84a946615a99896b87b8cb325843f7166aa738a7 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 16 Jul 2020 16:44:00 -0700 Subject: [PATCH 2/2] update hubconf.py --- hubconf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hubconf.py b/hubconf.py index 29e93bd..bbca702 100644 --- a/hubconf.py +++ b/hubconf.py @@ -37,9 +37,11 @@ def create(name, pretrained, channels, classes): state_dict = {k: v for k, v in state_dict.items() if model.state_dict()[k].shape == v.shape} # filter model.load_state_dict(state_dict, strict=False) # load return model + except Exception as e: help_url = 'https://github.com/ultralytics/yolov5/issues/36' - print('%s\nCache maybe be out of date. Delete cache and retry. See %s for help.' % (e, help_url)) + s = 'Cache maybe be out of date, deleting cache and retrying may solve this. See %s for help.' % help_url + raise Exception(s) from e def yolov5s(pretrained=False, channels=3, classes=80):