Simplified PyTorch hub for custom models (#1677)

This commit is contained in:
Glenn Jocher 2020-12-12 11:42:27 -08:00 committed by GitHub
parent f7a923b446
commit e92245a38c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,7 @@ def custom(path_or_model='path/to/model.pt'):
if __name__ == '__main__':
model = create(name='yolov5s', pretrained=True, channels=3, classes=80) # pretrained example
# model = custom(model='path/to/model.pt') # custom example
# model = custom(path_or_model='path/to/model.pt') # custom example
model = model.autoshape() # for PIL/cv2/np inputs and NMS
# Verify inference