From 8355775b2a71ce64c15e5dec0b800d4a9c7f5343 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 1 May 2021 17:48:12 +0200 Subject: [PATCH] cleanup (cherry picked from commit 7c89c829e3e299fec1f8e6280f69474572a51359) --- hubconf.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hubconf.py b/hubconf.py index 7f897d15c314..7359a58bd324 100644 --- a/hubconf.py +++ b/hubconf.py @@ -18,7 +18,7 @@ check_requirements(Path(__file__).parent / 'requirements.txt', exclude=('tensorboard', 'pycocotools', 'thop')) -def create(name, pretrained, channels=3, classes=80, autoshape=True, verbose=True): +def create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbose=True): """Creates a specified YOLOv5 model Arguments: @@ -106,9 +106,8 @@ def yolov5x6(pretrained=True, channels=3, classes=80, autoshape=True, verbose=Tr if __name__ == '__main__': - model = create(name='weights/yolov5s.pt', pretrained=True, channels=3, classes=80, autoshape=True, - verbose=True) # pretrained - # model = custom(path_or_model='path/to/model.pt') # custom + model = create(name='yolov5s', pretrained=True, channels=3, classes=80, autoshape=True, verbose=True) # pretrained + # model = custom(path='path/to/model.pt') # custom # Verify inference import cv2