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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turning detect.py into a .exe #434

Closed
MrCri5py opened this issue Jul 16, 2020 · 5 comments
Closed

Turning detect.py into a .exe #434

MrCri5py opened this issue Jul 16, 2020 · 5 comments
Labels
question Further information is requested Stale

Comments

@MrCri5py
Copy link

❔Question

I hope you are well.

I've got a question about creating an executable using YOLOv5. How do we go about to convert the detect. py script to an .exe? I have tried using Pyinstaller and cx_Freeze but this gives PyInstallerImportError: Failed to load dynlib/dll "caffe2_detectron_ops_gpu.dll". Your feedback will be highly appreciated.
Thank you

Kind regards

Additional context

@MrCri5py MrCri5py added the question Further information is requested label Jul 16, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jul 16, 2020

Hello @MrCri5py, 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.

@WelkinU
Copy link

WelkinU commented Jul 16, 2020

In your PyInstaller .spec file, try adding caffe2_detectron_ops_gpu.dll to the binaries.

Example:
binaries=[('path\to\your\caffe2_detectron_ops_gpu.dll' , '.')]

Note: If you use a conda environment the path should be similar to:
[ANACONDA_ROOT]\envs\[ENV_NAME]\Lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll

@MrCri5py
Copy link
Author

Thank you for your response @WelkinU . I have added the .DLL path to the binary and still gives the same issue. I've added --paths "path containing the .DLL", this then changed the error to PyInstallerImportError: Failed to load dynlib/dll "caffe2_nvrtc.dll"
Using Windows 10 build 18363.959
Anaconda
Pyinstaller 3.6
Torchvision 0.2.2. Post 3
Pytorch 1.5.1
Cuda 10.2
Cuda toolkit 10.1.243

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@blackCmd
Copy link

blackCmd commented Sep 6, 2021

@WelkinU 답변 감사합니다 . 바이너리에 .DLL 경로를 추가했지만 여전히 동일한 문제가 발생합니다. --paths "path 포함 .DLL"을 추가하면 PyInstallerImportError: Failed to load dynlib/dll "caffe2_nvrtc.dll"
Using Windows 10 build 18363.959
Anaconda
Pyinstaller 3.6
Torchvision 0.2.2. Post 3
Pytorch 1.5.1
Cuda 10.2
Cuda 툴킷 10.1.243

I've met he error too. How to solve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale
Projects
None yet
Development

No branches or pull requests

3 participants