GithubHelp home page GithubHelp logo

Comments (20)

glenn-jocher avatar glenn-jocher commented on July 24, 2024 2

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.

kadirnar avatar kadirnar commented on July 24, 2024 1

Thank you for the detailed explanation. I want to install the package. I will continue with other yolo models. Thanks ❀️

from ultralytics.

github-actions avatar github-actions commented on July 24, 2024

πŸ‘‹ 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):

Status

Ultralytics CI

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.

glenn-jocher avatar glenn-jocher commented on July 24, 2024

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

kadirnar avatar kadirnar commented on July 24, 2024

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.

glenn-jocher avatar glenn-jocher commented on July 24, 2024

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.

kadirnar avatar kadirnar commented on July 24, 2024

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! 😊

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.

kadirnar avatar kadirnar commented on July 24, 2024

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.

glenn-jocher avatar glenn-jocher commented on July 24, 2024

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:

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

  2. 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
  3. Check for Compatibility: Since you are using a nightly build of torch, there might be compatibility issues. Consider using the stable version of torch and torchvision to see if the issue persists:

    pip install torch torchvision torchaudio
  4. 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.

kadirnar avatar kadirnar commented on July 24, 2024

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.

glenn-jocher avatar glenn-jocher commented on July 24, 2024

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.

kadirnar avatar kadirnar commented on July 24, 2024

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)

Input Image:
image

I detected it with the Yolov5 model and used the boxes values in the sam model.

Output Image:
image

from ultralytics.

glenn-jocher avatar glenn-jocher commented on July 24, 2024

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:

  1. Ensure Latest Versions: Make sure you are using the latest versions of torch and ultralytics. You can update them using:

    pip install --upgrade torch ultralytics
  2. 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.

kadirnar avatar kadirnar commented on July 24, 2024

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.

glenn-jocher avatar glenn-jocher commented on July 24, 2024

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:

  1. Ensure Latest Versions: Make sure you are using the latest versions of torch and ultralytics. You can update them using:

    pip install --upgrade torch ultralytics
  2. 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.

EbimoJohnny avatar EbimoJohnny commented on July 24, 2024

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

kadirnar avatar kadirnar commented on July 24, 2024

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

glenn-jocher avatar glenn-jocher commented on July 24, 2024

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.

EbimoJohnny avatar EbimoJohnny commented on July 24, 2024

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

  1. Torch -> '1.13.1+cu117'
  2. ultralytics -> 8.0.145

from ultralytics.

glenn-jocher avatar glenn-jocher commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.