Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

can load the trained model in CPU ( using opencv ) ? #180

Closed
vishnukv64 opened this issue Jun 23, 2020 · 8 comments
Closed

can load the trained model in CPU ( using opencv ) ? #180

vishnukv64 opened this issue Jun 23, 2020 · 8 comments
Labels
enhancement New feature or request

Comments

@vishnukv64
Copy link

馃殌 Feature

how to load the trained model via a cpu and do inference?

Motivation

Loading the model in a CPU and do inference probably using opencv or using other methods

Pitch

Alternatives

Additional context

@vishnukv64 vishnukv64 added the enhancement New feature or request label Jun 23, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jun 23, 2020

Hello @vishnukv64, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, 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:

  • Cloud-based AI systems operating on hundreds of HD video streams in realtime.
  • Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
  • Custom data training, hyperparameter evolution, and model exportation to any destination.

For more information please visit https://www.ultralytics.com.

@glenn-jocher
Copy link
Member

@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 % 

@vishnukv64
Copy link
Author

Thanks bro!! So we need pytorch ( that's the only dependency )

@glenn-jocher
Copy link
Member

@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.

@glenn-jocher
Copy link
Member

glenn-jocher commented Jun 23, 2020

@vishnukv64 actually, if you use pytorch hub you don't even need to clone this repo. See https://docs.ultralytics.com/yolov5/tutorials/pytorch_hub_model_loading

@vishnukv64
Copy link
Author

@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?

@glenn-jocher
Copy link
Member

@vishnukv64 you can do anything you want if you work enough at it.

@vishnukv64
Copy link
Author

@glenn-jocher thank you for your help bro!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants