Skip to content

Instantly share code, notes, and snippets.

@bala-codes
Created August 12, 2020 17:11
Show Gist options
  • Save bala-codes/d3a31910c54cbd07274b82631468d4c4 to your computer and use it in GitHub Desktop.
Save bala-codes/d3a31910c54cbd07274b82631468d4c4 to your computer and use it in GitHub Desktop.
Inference
## TO PREDICT IMAGES IN A FOLDER ##
!python yolov5/detect.py --source /content/bcc/images/valid/
--weights '/content/drive/My Drive/Machine Learning Projects/YOLO/best_yolov5_BCCM.pt'
--output '/content/inference/output'
## TO PREDICT A SINGLE IMAGE FILE ##
output = !python yolov5/detect.py --source /content/bcc/images/valid/BloodImage_00000.jpg
--weights '/content/drive/My Drive/Machine Learning Projects/YOLO/best_yolov5_BCCM.pt'
print(output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment