mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
Simplified PyTorch hub for custom models (#1677)
This commit is contained in:
parent
f7a923b446
commit
e92245a38c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user