-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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
How to compile Yolov5 for AWS Neuron #8619
Comments
👋 Hello @fishuke, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. 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 training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available. For business inquiries or professional support requests please visit https://ultralytics.com or email support@ultralytics.com. RequirementsPython>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started: git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install EnvironmentsYOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on macOS, Windows, and Ubuntu every 24 hours and on every commit. |
Running the
To correct the error we must resize the image to the same size as the # inference.py
im = cv2.resize(im, (640, 640), interpolation = cv2.INTER_AREA) |
@vitorStein thanks for the correction. I updated my post 👍 |
I've previously sucessfully compiled artifacts, but lately suddenly an error came out of the blue preventing me from compiling and I am not even sure where it comes from 🤷 |
@fishuke I have debugged, and found out that the latest branch/tag on master (v6.2) is breaking the compilation, by specifying the branch or tag of previous working versions would fix this issue: model = torch.hub.load('ultralytics/yolov5:v6.1', 'yolov5s6') I want the new improvements of 6.2 but can't now 😞 |
@paaksing I'm not sure where this error is originating but if you can debug and find a solution please help us by submitting a PR to master. Thank you! |
@glenn-jocher I opened #9341, the issue seems to not just about |
@paaksing I don't understand the cause, as v6.1 and v6.2 detection models are identical. The main change in v6.2 is the addition of classification models. |
@iann838 Thank you for your contributions! We appreciate your diligence in resolving this issue. Let us know if you encounter any further difficulties. |
I faced with lack of documentation about this and i wanted to share how i compiled and infered yolov5s6.
Prerequisites:
Linux (not working with mac) preferably aws inf1 instance
Create a Python 3.7.10 venv.
Follow here
Install yolov requirements
pip install "torch-neuron==1.10.2.*" "neuron-cc[tensorflow]" "protobuf<4" torchvision==0.11.3 --extra-index-url https://pip.repos.neuron.amazonaws.com
Compiler:
Inference:
The text was updated successfully, but these errors were encountered: