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

Issue Running Example - Adding AutoShape... #7401

Closed
bruchpilot123 opened this issue Apr 12, 2022 · 6 comments · Fixed by #7402
Closed

Issue Running Example - Adding AutoShape... #7401

bruchpilot123 opened this issue Apr 12, 2022 · 6 comments · Fixed by #7402
Labels

Comments

@bruchpilot123
Copy link

bruchpilot123 commented Apr 12, 2022

Hey,

I tried to use the example code:


import torch

#Model
model = torch.hub.load('ultralytics/yolov5', 'yolov5s')  # or yolov5m, yolov5l, yolov5x, custom

#Images
img = 'https://ultralytics.com/images/zidane.jpg'  # or file, Path, PIL, OpenCV, numpy, list

#Inference
results = model(img)

#Results
results.print()  # or .show(), .save(), .crop(), .pandas(), etc.

During Execution, I get the following output:

_/bin/python /home/user/user1/ai/yolov5.py
Using cache found in /home/user/.cache/torch/hub/ultralytics_yolov5_master
/home/user/.local/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
fatal: not a git repository (or any of the parent directories): .git
YOLOv5 🚀 2022-4-12 torch 1.11.0 CPU

Fusing layers...
YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients
Adding AutoShape...

After the AddingAutoshape output, nothing happens anymore. No error, nothing. I am using an Nvidia Jetson AGX (JetPack5) with Ubuntu 18.04 LTS. Also I did not figure out, how to solve the warnings. Of course I run the requirements.txt. The detection.py example worked without any issues.

Have a great day and I appreciate any help :)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 12, 2022

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

Requirements

Python>=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

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

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

@glenn-jocher glenn-jocher linked a pull request Apr 12, 2022 that will close this issue
@glenn-jocher
Copy link
Member

glenn-jocher commented Apr 12, 2022

@bruchpilot123 it appears you may have environment problems. Please ensure you meet all dependency requirements if you are attempting to run YOLOv5 locally. If in doubt, create a new virtual Python 3.9 environment, clone the latest repo (code changes daily), and pip install requirements.txt again from scratch.

💡 ProTip! Try one of our verified environments below if you are having trouble with your local environment.

Requirements

Python>=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

Models and datasets download automatically from the latest YOLOv5 release when first requested.

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

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

@glenn-jocher
Copy link
Member

@bruchpilot123 #7402 should resolve one of your git warnings. The underlying cause of the issue may be your environment. YOLOv5 is only finding your CPU for example as you can see from your line, not any CUDA hardware.

@github-actions
Copy link
Contributor

github-actions bot commented May 13, 2022

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!

@razi-tm
Copy link

razi-tm commented Sep 25, 2023

vpn solved this (freezing at adding autoshape) for me.
@bruchpilot123

@glenn-jocher
Copy link
Member

Glad to hear that using VPN solved the freezing issue for you, @razi-tm! Virtual Private Networks (VPNs) can sometimes help with network-related issues that may be causing freezing or connectivity problems. If you have any further questions or need assistance with anything else, feel free to ask!

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

Successfully merging a pull request may close this issue.

3 participants