how to load the trained model via a cpu and do inference?
Loading the model in a CPU and do inference probably using opencv or using other methods
Hello @vishnukv64, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook , Docker Image, and Google Cloud Quickstart Guide for example environments.
If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom model or data training question, please note that Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:
For more information please visit https://www.ultralytics.com.
@vishnukv64 cpu loading is the default action currently if no gpu is detected on your system:
(env1) glennjocher@Glenns-MBP yolov5 % python detect.py
Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.4, device='', fourcc='mp4v', img_size=640, iou_thres=0.5, output='inference/output', save_txt=False, source='inference/images', view_img=False, weights='weights/yolov5s.pt')
Using CPU
image 1/2 inference/images/bus.jpg: 640x512 4 persons, 1 buss, Done. (0.373s)
image 2/2 inference/images/zidane.jpg: 384x640 2 persons, 1 ties, Done. (0.291s)
Results saved to /Users/glennjocher/PycharmProjects/yolov5/inference/output
Done. (0.842s)
(env1) glennjocher@Glenns-MBP yolov5 %
Thanks bro!! So we need pytorch ( that's the only dependency )
@vishnukv64 see https://github.com/ultralytics/yolov5#requirements
Recommend you start with the colab notebook, its the easiest way to get started playing with things.
@vishnukv64 actually, if you use pytorch hub you don't even need to clone this repo. See https://github.com/ultralytics/yolov5/issues/36
@glenn-jocher Can i load my trained model in pytorch hub and use it? or its only available for pre trained models on cooc dataset?
@vishnukv64 you can do anything you want if you work enough at it.