glenn-jocher commited on
Commit
7c89c82
1 Parent(s): c1a44ed
Files changed (1) hide show
  1. hubconf.py +3 -4
hubconf.py CHANGED
@@ -18,7 +18,7 @@ dependencies = ['torch', 'yaml']
18
  check_requirements(Path(__file__).parent / 'requirements.txt', exclude=('tensorboard', 'pycocotools', 'thop'))
19
 
20
 
21
- def create(name, pretrained, channels=3, classes=80, autoshape=True, verbose=True):
22
  """Creates a specified YOLOv5 model
23
 
24
  Arguments:
@@ -106,9 +106,8 @@ def yolov5x6(pretrained=True, channels=3, classes=80, autoshape=True, verbose=Tr
106
 
107
 
108
  if __name__ == '__main__':
109
- model = create(name='weights/yolov5s.pt', pretrained=True, channels=3, classes=80, autoshape=True,
110
- verbose=True) # pretrained
111
- # model = custom(path_or_model='path/to/model.pt') # custom
112
 
113
  # Verify inference
114
  import cv2
 
18
  check_requirements(Path(__file__).parent / 'requirements.txt', exclude=('tensorboard', 'pycocotools', 'thop'))
19
 
20
 
21
+ def create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbose=True):
22
  """Creates a specified YOLOv5 model
23
 
24
  Arguments:
 
106
 
107
 
108
  if __name__ == '__main__':
109
+ model = create(name='yolov5s', pretrained=True, channels=3, classes=80, autoshape=True, verbose=True) # pretrained
110
+ # model = custom(path='path/to/model.pt') # custom
 
111
 
112
  # Verify inference
113
  import cv2