Comments (8)
👋 Hello @Hestinorwu, 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.
My problem is that i hope use "from ultralytics import YOLO" to load two different model.or use 'import YOLOv10'. because the precess and postcess of ultralytics is convenient.I can eastily get results.
from ultralytics.
Hello @Hestinorwu,
Thank you for reaching out! It's great to hear that you find the Ultralytics YOLO models convenient for your tasks. Let's address the issue you're encountering with loading both YOLOv9 and YOLOv10 models simultaneously.
The error you're seeing, AttributeError: Can't get attribute 'YOLOv10DetectionModel'
, suggests that there might be a compatibility issue with the specific versions of the models and the ultralytics
package you are using.
Here are a few steps to help resolve this:
-
Ensure Latest Versions: First, make sure you are using the latest versions of both
torch
andultralytics
. You can upgrade them using the following commands:pip install --upgrade torch ultralytics
-
Separate Environments: If the issue persists, it might be due to the fact that YOLOv9 and YOLOv10 models require different versions of the
ultralytics
package. In such cases, using separate virtual environments for each model can be a good solution. Here’s how you can set it up:- Create Virtual Environments:
# Create a virtual environment for YOLOv9 python -m venv yolov9_env # Activate the environment yolov9_env\Scripts\activate # On Windows source yolov9_env/bin/activate # On macOS/Linux # Install the required packages pip install ultralytics==<specific_version_for_v9> torch # Create a virtual environment for YOLOv10 python -m venv yolov10_env # Activate the environment yolov10_env\Scripts\activate # On Windows source yolov10_env/bin/activate # On macOS/Linux # Install the required packages pip install ultralytics==<specific_version_for_v10> torch
- Create Virtual Environments:
-
Example Code: Here’s an example of how you can load and use both models in separate environments:
-
YOLOv9 Environment:
# Activate YOLOv9 environment yolov9_env\Scripts\activate # On Windows source yolov9_env/bin/activate # On macOS/Linux from ultralytics import YOLO v9_model = YOLO('yolov9c.pt') v9_results = v9_model('path/to/image.jpg') print(v9_results)
-
YOLOv10 Environment:
# Activate YOLOv10 environment yolov10_env\Scripts\activate # On Windows source yolov10_env/bin/activate # On macOS/Linux from ultralytics import YOLO v10_model = YOLO('yolov10m_handheld_20240611.pt') v10_results = v10_model('path/to/image.jpg') print(v10_results)
-
By using separate environments, you can ensure that each model has the appropriate dependencies and versions without conflicts.
If you continue to face issues, please provide a minimum reproducible example of your code so we can further investigate. You can refer to our Minimum Reproducible Example Guide for more details.
I hope this helps! If you have any further questions, feel free to ask. 😊
from ultralytics.
Thanks a lot!!! i try to download the folder'ultralytics' of yolov10,and use from ultralytics import yolov10
and successfully adapt it to my project. and i realize that v9 and v10 need different environment.So if i still to use yolov9 at the same time,i need to seperate both to exec each . Thanks again!
from ultralytics.
Hello @Hestinorwu,
You're very welcome! I'm glad to hear that you successfully adapted YOLOv10 to your project. 🎉
Indeed, separating the environments for YOLOv9 and YOLOv10 is a practical approach to avoid any compatibility issues. This way, you can ensure that each model operates with the appropriate dependencies and versions.
If you have any further questions or run into any issues, feel free to reach out. We're here to help! 😊
Happy coding and best of luck with your project!
from ultralytics.
Thanks for your reply,now i encounter a new problem. How to use Yolov9 cli to train data. it seems that in https://github.com/WongKinYiu/yolov9 the usage of cli is not supported.
Only usage like below:
python train_dual.py --workers 8 --device 0 --batch 16 --data data/coco.yaml --img 640 --cfg models/detect/yolov9-c.yaml --weights '' --name yolov9-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 500 --close-mosaic 15
from ultralytics.
Hello @HduHestin,
Thank you for your question! It appears that the YOLOv9 repository you mentioned (WongKinYiu/yolov9) does not support CLI commands in the same way as Ultralytics YOLO models. Instead, it uses Python scripts for training.
To train a YOLOv9 model using the provided script, you can follow the example command you mentioned:
python train_dual.py --workers 8 --device 0 --batch 16 --data data/coco.yaml --img 640 --cfg models/detect/yolov9-c.yaml --weights '' --name yolov9-c --hyp hyp.scratch-high.yaml --min-items 0 --epochs 500 --close-mosaic 15
Here's a brief breakdown of the command:
--workers 8
: Number of data loading workers.--device 0
: GPU device to use.--batch 16
: Batch size.--data data/coco.yaml
: Path to the dataset configuration file.--img 640
: Image size.--cfg models/detect/yolov9-c.yaml
: Path to the model configuration file.--weights ''
: Path to the weights file (empty string for training from scratch).--name yolov9-c
: Name of the training run.--hyp hyp.scratch-high.yaml
: Path to the hyperparameters file.--min-items 0
: Minimum number of items.--epochs 500
: Number of training epochs.--close-mosaic 15
: Number of epochs to disable mosaic augmentation before training ends.
If you encounter any issues or have specific questions about the training process, please provide more details or a minimum reproducible example so we can assist you better. You can refer to our Minimum Reproducible Example Guide for more information.
Feel free to reach out if you have any further questions. Happy training! 😊
from ultralytics.
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.
For additional resources and information, please see the links below:
- Docs: https://docs.ultralytics.com
- HUB: https://hub.ultralytics.com
- Community: https://community.ultralytics.com
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 YOLO 🚀 and Vision AI ⭐
from ultralytics.
Related Issues (20)
- Adobe Premiere Pro Crack Pre-Activated 2024 Download
- Autodesk AutoCAD 2024.2 Crack + Keygen Free Download
- Wondershare Filmora Crack 13.6.8 + Key Without Watermark
- IObit Driver Booster PRO 11.5.0.85 Crack + Key
- CleanMyMac X 4.15.4 Crack + Activation Code 2024 HOT 1
- AnyDesk Crack v8.0.11 + License Key Free 2025
- Macrium Reflect Crack + Lifetime License Key [2024] HOT 1
- Windows 10 Activator Crack + License Key 2024
- PC Cleaner Pro Crack & Activation Key 2024 Download
- Redshift Render Crack With Activation Key [Latest]
- HERE’S!! WAY TO WATCH Australia vs South Africa LIVE@STREAMS ON TV CHANNEL 10 August 2024 HOT 1
- CCleaner Pro Crack With License Key 2024 Free Download
- Tenorshare 4uKey 3.7.0 Crack + Registration Code 2024
- [Here’s*freE TV]**NZ All Blacks vs Argentina Rugby LIVE ON TV CHANNEL 10 August HOT 1
- (LIVE>FrEE) Australia vs South Africa Live Streams 10 Aug 2024 HOT 1
- Adobe Creative Cloud 2024 Crack Latest Version Pre-Activated
- !~HERE’S!! WAY TO WATCH NZ All Blacks vs Argentina LIVE STREAMS ON TV CHANNEL 10 August 2024
- HERE’S!!(FrEE@Streams) NZ All Blacks vs Argentina LIVE STREAMS ON TV CHANNEL 10 August 2024
- Tenorshare iCareFone 9.0.2 Crack + Keygen Free Download
- EaseUS Partition Master Crack + Activation Key Free Download 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.