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

Parameters in Yolov8 #12707

Open
1 task done
VuongMinhTuan opened this issue May 15, 2024 · 2 comments
Open
1 task done

Parameters in Yolov8 #12707

VuongMinhTuan opened this issue May 15, 2024 · 2 comments
Labels
question Further information is requested

Comments

@VuongMinhTuan
Copy link

Search before asking

Question

I'm studying the architecture of yolov8 now and I'm trying to figure out why you decided to choose those parameters in each layers/blocks. Until now, I still don't understand.

For example: In SPPF block, there are Max Pooling layers. Why did you set kernel_size=k, stride=1 and padding=k with k=5?

OR

In SPPF block, why did you set c_ = c2 // 2, not another number? (c_ is hidden channel and c2 is out_channel)

Are those parameters chosen based on something or you just tested many times for figuring out

Thanks for reading (I'm sorry if my questions are not clear because I'm not good at English)

Additional

No response

@VuongMinhTuan VuongMinhTuan added the question Further information is requested label May 15, 2024
Copy link

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

@glenn-jocher
Copy link
Member

Hello! Thanks for your interest in the YOLOv8 architecture and for your questions on the parameters used in its layers.

The parameters in each layer, such as the SPPF block, are selected primarily based on empirical evidence gathered through extensive testing, which includes experiments for optimizing both speed and accuracy. Setting kernel_size=k, stride=1, and padding=k in the Max Pooling layers of the SPPF block helps in maintaining the spatial size of the features, allowing us to extract granular features at different scales effectively.

Regarding the choice of c_ = c2 // 2, this is a common strategy to reduce the number of channels by half, thereby reducing the computational complexity while still retaining sufficient information for the task at hand. This balance helps to maintain performance while improving efficiency.

Every design choice typically aims to balance between computational efficiency and performance efficacy, often refined through various stages of prototype testing and validation against benchmark datasets.

Feel free to examine the further discussions on such architectural decisions in our GitHub discussions or the relevant technical papers linked in the repository for deeper insights! 😊

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

No branches or pull requests

2 participants