Comments (20)
Hi @kadirnar,
Thank you for your understanding and patience! π
To ensure a smooth experience with other YOLO models, please make sure you have the latest versions of torch
and ultralytics
installed. You can update them using:
pip install --upgrade torch ultralytics
If you encounter any issues, please provide a minimum reproducible code example. This will help us replicate the issue on our end and provide a more accurate solution. You can find guidelines for creating a minimum reproducible example here.
Feel free to continue exploring and testing other YOLO models. If you have any further questions or run into any issues, don't hesitate to reach out. We're here to help!
Happy coding! π
from ultralytics.
Thank you for the detailed explanation. I want to install the package. I will continue with other yolo models. Thanks β€οΈ
from ultralytics.
π Hello @lonely-and-luckly, thank you for your interest in Ultralytics YOLOv8 π! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.
If this is a π Bug Report, please provide a minimum reproducible example to help us debug it.
If this is a custom training β Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.
Join the vibrant Ultralytics Discord π§ community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.
Install
Pip install the ultralytics
package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.
pip install ultralytics
Environments
YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
- Notebooks with free GPU:
- Google Cloud Deep Learning VM. See GCP Quickstart Guide
- Amazon Deep Learning AMI. See AWS Quickstart Guide
- Docker Image. See Docker Quickstart Guide
Status
If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.
from ultralytics.
@lonely-and-luckly hi there!
Thank you for bringing this to our attention. It looks like you're encountering an issue with the SCDown
attribute in YOLOv10. To help us investigate further, could you please provide a minimum reproducible code example? This will allow us to replicate the issue on our end. You can find guidelines for creating a minimum reproducible example here.
Additionally, please ensure that you are using the latest versions of torch
and ultralytics
. You can upgrade your packages using the following commands:
pip install --upgrade torch ultralytics
Once you've updated, please try running your code again and let us know if the issue persists.
Looking forward to your response! π
from ultralytics.
Which torch versions does it work on? I got the same error.
env:
ltralytics YOLOv8.2.36 π Python-3.10.12 torch-2.3.1+cu121 CUDA:0 (NVIDIA GeForce RTX 3090, 24253MiB)
Setup complete β
(24 CPUs, 125.7 GB RAM, 4.0/100.0 GB disk)
OS Linux-6.5.0-35-generic-x86_64-with-glibc2.35
Environment Docker
Python 3.10.12
Install pip
RAM 125.65 GB
CPU AMD EPYC 7272 12-Core Processor
CUDA 12.1
numpy β
1.23.5<2.0.0
matplotlib β
3.7.2>=3.3.0
opencv-python β
4.8.0.76>=4.6.0
pillow β
9.5.0>=7.1.2
pyyaml β
6.0.1>=5.3.1
requests β
2.31.0>=2.23.0
scipy β
1.11.2>=1.4.1
torch β
2.3.1>=1.8.0
torchvision β
0.18.1>=0.9.0
tqdm β
4.66.1>=4.64.0
psutil β
5.9.5
py-cpuinfo β
9.0.0
pandas β
2.1.0>=1.1.4
seaborn β
0.13.2>=0.11.0
ultralytics-thop β
2.0.0>=2.0.0
from ultralytics.
Hi @kadirnar,
Thank you for providing the detailed environment information. It looks like you're encountering an issue with the SCDown
attribute in YOLOv10.
To help us investigate further, could you please provide a minimum reproducible code example? This will allow us to replicate the issue on our end. You can find guidelines for creating a minimum reproducible example here. Reproducing the bug is crucial for us to investigate and provide a solution.
Additionally, please ensure that you are using the latest versions of torch
and ultralytics
. You can upgrade your packages using the following commands:
pip install --upgrade torch ultralytics
Once you've updated, please try running your code again and let us know if the issue persists.
Looking forward to your response! π
from ultralytics.
Hi @kadirnar,
Thank you for providing the detailed environment information. It looks like you're encountering an issue with the
SCDown
attribute in YOLOv10.To help us investigate further, could you please provide a minimum reproducible code example? This will allow us to replicate the issue on our end. You can find guidelines for creating a minimum reproducible example here. Reproducing the bug is crucial for us to investigate and provide a solution.
Additionally, please ensure that you are using the latest versions of
torch
andultralytics
. You can upgrade your packages using the following commands:pip install --upgrade torch ultralyticsOnce you've updated, please try running your code again and let us know if the issue persists.
Looking forward to your response! π
Example code:
import torch
from ultralytics import YOLO
# Load the model
model = YOLO("models/ultralytics/yolov10n.pt")
# Load a 0-channel image
image = torch.rand(1, 3, 640, 640)
# Run the model
results = model(image)
from ultralytics.
I deleted the torch package and installed the night package.
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu124
new env:
Ultralytics YOLOv8.2.29 π Python-3.10.14 torch-2.5.0.dev20240621+cu124 CUDA:0 (NVIDIA GeForce RTX 4090, 24207MiB)
Setup complete β
(16 CPUs, 46.9 GB RAM, 1422.3/1832.2 GB disk)
OS Linux-6.5.0-35-generic-x86_64-with-glibc2.35
Environment Linux
Python 3.10.14
Install pip
RAM 46.88 GB
CPU unknown
CUDA 12.4
matplotlib β
3.9.0>=3.3.0
opencv-python β
4.8.0.76>=4.6.0
pillow β
9.5.0>=7.1.2
pyyaml β
6.0.1>=5.3.1
requests β
2.31.0>=2.23.0
scipy β
1.13.1>=1.4.1
torch β
2.5.0.dev20240621+cu124>=1.8.0
torchvision β
0.20.0.dev20240621+cu124>=0.9.0
tqdm β
4.66.4>=4.64.0
psutil β
5.9.8
py-cpuinfo β
3.3.0
pandas β
2.2.2>=1.1.4
seaborn β
0.13.2>=0.11.0
ultralytics-thop β
0.2.7>=0.2.5
Error Message:
AttributeError: Can't get attribute 'SCDown' on <module 'ultralytics.nn.modules.block' from '.../python3.10/site-packages/ultralytics/nn/modules/block.py'>
from ultralytics.
Hi @kadirnar,
Thank you for providing the updated environment details and the reproducible code example. It looks like you're encountering an issue with the SCDown
attribute in YOLOv10, even after updating to the latest nightly versions of torch
and torchvision
.
The error message indicates that the SCDown
attribute is not being recognized in the ultralytics.nn.modules.block
module. This could be due to a version mismatch or an issue with the model file.
Here are a few steps to help resolve this issue:
-
Verify Model File: Ensure that the
yolov10n.pt
model file is not corrupted and is compatible with the current version of the Ultralytics package. You can download the latest model file from the official repository or website. -
Update Ultralytics Package: Make sure you are using the latest version of the Ultralytics package. You can update it using the following command:
pip install --upgrade ultralytics
-
Check for Compatibility: Since you are using a nightly build of
torch
, there might be compatibility issues. Consider using the stable version oftorch
andtorchvision
to see if the issue persists:pip install torch torchvision torchaudio
-
Reinstall Dependencies: Sometimes, reinstalling the dependencies can resolve unexpected issues. You can do this by uninstalling and then reinstalling the packages:
pip uninstall ultralytics torch torchvision torchaudio pip install ultralytics torch torchvision torchaudio
If the issue persists after trying these steps, please let us know, and we will investigate further. Your patience and cooperation are greatly appreciated! π
from ultralytics.
My fault. sorry It was solved by updating the ultralytics version. Do you support yolov6 and yolov7 models? I tested it and got an error.
from ultralytics.
Hi @kadirnar,
No worries at all! I'm glad to hear that updating the Ultralytics version resolved your issue. π
Regarding your question, yes, Ultralytics does support YOLOv6 and YOLOv7 models. You can find more information about these models and how to use them in our documentation.
If you're encountering errors with YOLOv6 or YOLOv7, please ensure that you are using the latest versions of both torch
and ultralytics
. If the issue persists, providing a minimum reproducible code example would be very helpful for us to investigate further.
Feel free to share any specific error messages or issues you're facing, and we'll be happy to assist you!
from ultralytics.
I test all models. And I will write down the errors I get.
Yolov6 and Yolov7 models are not in the Ultralicts/asses library. So I downloaded it from the original github page.
Yolov6:
No module named 'yolov6.models'
Yolov7:
No module named 'models.yolo'
SAM:
from ultralytics.models.sam import Predictor as SAMPredictor
# Create SAMPredictor
overrides = dict(conf=0.25, task="segment", mode="predict", imgsz=1024, model="mobile_sam.pt")
predictor = SAMPredictor(overrides=overrides)
# Set image
predictor.set_image("input/11.png") # set with image file
results = predictor(bboxes=[318.2001, 343.3216, 351.1877, 593.3568], crop_n_layers=1, points_stride=64, save=True)
I detected it with the Yolov5 model and used the boxes values in the sam model.
from ultralytics.
Hi @kadirnar,
Thank you for your detailed report and for testing the models. Let's address each issue one by one:
YOLOv6 and YOLOv7
It appears that you're encountering module import errors for YOLOv6 and YOLOv7. These models are indeed supported by Ultralytics, but they need to be integrated correctly. Here are a few steps to help resolve this:
-
Ensure Latest Versions: Make sure you are using the latest versions of
torch
andultralytics
. You can update them using:pip install --upgrade torch ultralytics
-
Model Integration: If you have downloaded the models from their original GitHub pages, ensure that they are placed in the correct directory and that the paths are correctly set in your code.
For YOLOv6:
from yolov6.models.yolo import Model as YOLOv6Model
# Load your YOLOv6 model here
model = YOLOv6Model("path/to/yolov6_model.pt")
For YOLOv7:
from models.yolo import Model as YOLOv7Model
# Load your YOLOv7 model here
model = YOLOv7Model("path/to/yolov7_model.pt")
SAM Model
Your code for the SAM model looks mostly correct, but ensure that the mobile_sam.pt
model file is correctly placed and accessible. Hereβs a quick check:
from ultralytics.models.sam import Predictor as SAMPredictor
# Create SAMPredictor
overrides = dict(conf=0.25, task="segment", mode="predict", imgsz=1024, model="mobile_sam.pt")
predictor = SAMPredictor(overrides=overrides)
# Set image
predictor.set_image("input/11.png") # set with image file
results = predictor(bboxes=[318.2001, 343.3216, 351.1877, 593.3568], crop_n_layers=1, points_stride=64, save=True)
Additional Steps
If the issues persist, please provide a minimum reproducible code example for each error. This will help us replicate the issue on our end and provide a more accurate solution. You can find guidelines for creating a minimum reproducible example here.
Thank you for your cooperation and patience! π
from ultralytics.
I don't understand My test attempts:
v1:
Code:
from ultralytics import YOLO
# Load a model
model = YOLO("models/ultralytics/yolov6s.pt") # pretrained YOLOv8n model
Error Message:
ModuleNotFoundError: No module named 'yolov6.models'
v2:
Code:
from yolov6.models.yolo import Model as YOLOv6Model
# Load a model
model = YOLOv6Model("models/ultralytics/yolov6s.pt") # pretrained YOLOv8n model
Error Message:
from yolov6.models.yolo import Model as YOLOv6Model
ModuleNotFoundError: No module named 'yolov6.models'
I want to test meta-sam models. That's why I don't want to use the mobile-sam model.
from ultralytics.
Hi @kadirnar,
Thank you for your detailed report and for testing the models. Let's address the issues you're encountering with YOLOv6 and YOLOv7.
YOLOv6 and YOLOv7
It appears that you're encountering module import errors. To resolve this, please ensure the following:
-
Ensure Latest Versions: Make sure you are using the latest versions of
torch
andultralytics
. You can update them using:pip install --upgrade torch ultralytics
-
Correct Model Integration: If you have downloaded the models from their original GitHub pages, ensure that they are placed in the correct directory and that the paths are correctly set in your code.
For YOLOv6, you might need to clone the YOLOv6 repository and set the correct paths:
git clone https://github.com/meituan/YOLOv6.git
cd YOLOv6
pip install -r requirements.txt
Then, use the following code:
from yolov6.models.yolo import Model as YOLOv6Model
# Load your YOLOv6 model here
model = YOLOv6Model("path/to/yolov6s.pt")
For YOLOv7, the process is similar:
git clone https://github.com/WongKinYiu/yolov7.git
cd yolov7
pip install -r requirements.txt
Then, use the following code:
from models.yolo import Model as YOLOv7Model
# Load your YOLOv7 model here
model = YOLOv7Model("path/to/yolov7.pt")
Meta-SAM Model
For the Meta-SAM model, you can use the following code snippet to load and use the model:
from ultralytics.models.sam import Predictor as SAMPredictor
# Create SAMPredictor
overrides = dict(conf=0.25, task="segment", mode="predict", imgsz=1024, model="meta_sam.pt")
predictor = SAMPredictor(overrides=overrides)
# Set image
predictor.set_image("input/11.png") # set with image file
results = predictor(bboxes=[318.2001, 343.3216, 351.1877, 593.3568], crop_n_layers=1, points_stride=64, save=True)
If you encounter any further issues, please ensure you provide a minimum reproducible code example. This will help us replicate the issue on our end and provide a more accurate solution. You can find guidelines for creating a minimum reproducible example here.
Thank you for your cooperation and patience! π
from ultralytics.
I am having this same error as I try to use yolov10n.
I downloaded the pretrained model from https://www.kaggle.com/code/givkashi/yolov10-object-detection. and the version of my ultralytics is 8.0.145.
Any suggestion? As i have tried the previous suggested solutions.
from ultralytics.
I am having this same error as I try to use yolov10n. I downloaded the pretrained model from https://www.kaggle.com/code/givkashi/yolov10-object-detection. and the version of my ultralytics is 8.0.145.
Any suggestion? As i have tried the previous suggested solutions.
You must update the version of the ultralytics library.
pip install --upgrade ultralytics
from ultralytics.
Hi @kadirnar,
Thank you for reaching out and providing the details. It looks like you're encountering an issue with the YOLOv10n model. Let's work through this together.
First, please ensure that you are using the latest versions of both torch
and ultralytics
. You can update them using the following commands:
pip install --upgrade torch ultralytics
If the issue persists, could you please provide a minimum reproducible code example? This will help us replicate the issue on our end and investigate further. You can find guidelines for creating a minimum reproducible example here. Having this information is crucial for us to effectively troubleshoot and resolve the problem.
Additionally, please verify that the model file you downloaded is correctly placed and accessible in your project directory. Hereβs a quick example of how to load the model:
from ultralytics import YOLO
# Load the YOLOv10n model
model = YOLO("path/to/yolov10n.pt")
# Run inference
results = model.predict("path/to/your/image.jpg")
results.show()
If you continue to experience issues, please share the specific error messages you are encountering. This will help us provide more targeted assistance.
Thank you for your cooperation, and we look forward to helping you resolve this issue! π
from ultralytics.
This is the code i ran after installing upgrading as instructed.
import torch
from ultralytics import YOLO
model = YOLO("./yolov10n.pt")
results = model.predict("/home/ebimo/Spark NINJAS/BraTS2023_Training_Data_6/images/new_train/BraTS-SSA-00002-000-t2f_68.tif")
results
When I use yolov8 it works find but if I use yolov10n i get this error
AttributeError: Can't get attribute 'SCDown' on <module 'ultralytics.nn.modules.block' from '/home/****/.local/lib/python3.7/site-packages/ultralytics/nn/modules/block.py'>
for the dependencies
- Torch -> '1.13.1+cu117'
- ultralytics -> 8.0.145
from ultralytics.
Hi @EbimoJohnny,
Thank you for providing the code snippet and details about your environment. It looks like you're encountering an issue with the YOLOv10n model. Let's work through this together.
First, please ensure that you are using the latest versions of both torch
and ultralytics
. You can update them using the following commands:
pip install --upgrade torch ultralytics
If the issue persists, it would be very helpful if you could provide a minimum reproducible example. This will allow us to replicate the issue on our end and investigate further. You can find guidelines for creating a minimum reproducible example here.
Additionally, please verify that the model file you downloaded is correctly placed and accessible in your project directory. Hereβs a quick example of how to load the model:
from ultralytics import YOLO
# Load the YOLOv10n model
model = YOLO("path/to/yolov10n.pt")
# Run inference
results = model.predict("path/to/your/image.jpg")
results.show()
If you continue to experience issues, please share the specific error messages you are encountering. This will help us provide more targeted assistance.
Thank you for your cooperation, and we look forward to helping you resolve this issue! π
from ultralytics.
Related Issues (20)
- YOLOv8, v10, RT-DETR albumentation do not apply HOT 5
- How can i train better my project ? YOLOV8 HOT 14
- Codebase for running YoloV10 with ONNX HOT 8
- xywh returns wrong result while xyxy returns right result HOT 1
- Support distributed evaluation during training process HOT 1
- Is there an example of yolov8n-segn Android split HOT 2
- @glenn-jocher tracker is not working for custom trained models,
- multi input video to YOLOv8 and using bytetrack.yaml return same ID to different object and keep increasing HOT 2
- The engine model RTX3060 exported by RTX4070 cannot be inferred HOT 3
- YOLO(model_yaml).load(model.pt) not work. HOT 5
- Exporting after training on YoloV10 raise a ValueError with MultiGPU HOT 7
- Yolov8 classifier training: impossible to disable some augmentation options HOT 5
- Decoupled Head in YOLOv8 HOT 5
- How to increase the weight of segmentation loss in a segmentation task? HOT 11
- Why is the performance of detection task better than segmentation task? HOT 9
- Permission Denied Error in the middle/end of training. HOT 5
- Show the true label HOT 1
- The confidence difference of pt and onnx model on yolov9. HOT 3
- About Detection Speed YOLOV8 HOT 5
- why YOLO cannot load my dataset HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ultralytics.