Last active
February 19, 2023 05:15
-
-
Save shawonis08/07a418a894f0386595b8cdd1b21fb925 to your computer and use it in GitHub Desktop.
Loading custom trained model weights using pytorch hub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model = torch.hub.load('ultralytics/yolov5', 'custom', path='path/to/best.pt') # default | |
model = torch.hub.load('path/to/yolov5', 'custom', path='path/to/best.pt', source='local') # local repo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment