Browse Source

cleanup

modifyDataloader
Glenn Jocher 3 years ago
parent
commit
7c89c829e3
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      hubconf.py

+ 3
- 4
hubconf.py View File

check_requirements(Path(__file__).parent / 'requirements.txt', exclude=('tensorboard', 'pycocotools', 'thop')) 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 """Creates a specified YOLOv5 model


Arguments: Arguments:




if __name__ == '__main__': 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 # Verify inference
import cv2 import cv2

Loading…
Cancel
Save