Comments (4)
👋 Hello @zouwen198317, 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.
Hello! 😊 In YOLOv8, the anchors can indeed be optimized for your specific scenario, especially if your detection performance varies significantly between large and small objects. You can manually adjust the anchors in the YAML configuration file.
Here’s an example snippet of how you might set your anchors:
anchors:
- [10,13, 16,30, 33,23] # Small objects
- [30,61, 62,45, 59,119] # Medium objects
- [116,90, 156,198, 373,326] # Large objects
Ensure that the number and scale of anchors match the distribution of your object sizes. Smaller anchors are generally used for smaller objects, and larger anchors for larger objects.
If manual tuning seems complex, you can also re-calculate these automatically based on your dataset by using the autoanchor
feature during training which examines your dataset and adapts the anchors accordingly:
yolo train --data your_data.yaml --cfg your_model.yaml --img-size 640 autoanchor
Feel free to experiment with different anchor sizes to find what gives the best results for both large and small objects on your data. 🚀
from ultralytics.
hi!
I am also very interested in this issue
The autoanchor effect is relatively poor on my dataset.
so, How should I cancel autoanchor .
I tried set my anchors as your suggestion, but it can't cancel autoanchor .
from ultralytics.
Hello! 👋
To disable the autoanchor
feature in YOLOv8, you can simply omit the autoanchor
flag from your training command. If you've set your anchors manually in the YAML file, they should be used as specified unless overridden by the autoanchor
recalibration.
Here's an example of how to train without using autoanchor
:
yolo train --data your_data.yaml --cfg your_model.yaml --img-size 640
Just ensure that your your_model.yaml
configuration file has the anchors explicitly defined as you want them. That should do the trick! If you encounter any more issues, feel free to ask. Happy training! 🚀
from ultralytics.
Related Issues (20)
- yolov8 flatten code
- YOLOv8 stop without reporting an error HOT 1
- Batch prediction not working with NCNN model HOT 1
- Support for Training with Mixed Datasets on YOLOv8s-worldv2 Model HOT 1
- Object detection on segment area? ( Two different model)
- advice on the use of yolov8 HOT 1
- cannot import name 'solutions' from 'ultralytics'
- training yolov8 pose-precision=0 recall=0 HOT 1
- TFlite INT8 Exports failing HOT 2
- why CPU always 100% HOT 2
- Bug in function `det.summary()` for `ultralytics>=8.2.10`: HOT 2
- Object undetectable after a while HOT 1
- TensorFlow.js: export failure HOT 1
- TensorFlow SavedModel: export failure ❌ 1.2s: permute(sparse_coo)
- [Question] How to do validation with custom dataloader HOT 2
- FPN code HOT 3
- How to run YOLOv8 predict on GPU without CUDA? HOT 2
- Why my result predicted object has no bounding box? HOT 2
- how to save and load my custom model HOT 6
- segmentation fault(core dumped) HOT 1
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.