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

What is the significance of the Reg_Max parameter? How to adjust its value? #3072

Closed
1 task done
xkangKK opened this issue Jun 7, 2023 · 7 comments
Closed
1 task done
Labels
question Further information is requested Stale Stale and schedule for closing soon

Comments

@xkangKK
Copy link

xkangKK commented Jun 7, 2023

Search before asking

Question

Hello, I want to know the meaning of Reg_Max and how to adjust this parameter.
I looked at #2186, which describes "Reg_Max represents the maximum range of anchor parameters and can have an impact on small object detection in particular, but it can also help with larger objects that take up the entire image.” Unfortunately, I still don’t fully understand.
Could you please explain in detail the meaning of this parameter and its usage in different scenarios, such as 640640 image size, 12801280, or even larger or smaller resolutions, where there are large or small object?

Additional

No response

@xkangKK xkangKK added the question Further information is requested label Jun 7, 2023
@glenn-jocher
Copy link
Member

@xkangKK hello! The Reg_Max parameter is used to define the maximum range of anchor parameters. Anchor parameters are predefined bounding box sizes and aspect ratios that are used during training to detect objects of different sizes and shapes in your images.

The Reg_Max value is related to the scale of the anchors, meaning that a larger value of Reg_Max allows for larger anchor scales, which is useful for detecting larger objects. On the other hand, a smaller Reg_Max value allows for smaller anchor scales and can help with detecting smaller objects.

The optimal value for Reg_Max depends on the size and scale of the objects you want to detect in your images. Generally, larger image resolutions will require larger anchor scales, which may require increasing the Reg_Max value. You may need to experiment with different values of Reg_Max to determine the optimal value for your specific use case.

I hope this helps! Let me know if you have any further questions.

@xkangKK
Copy link
Author

xkangKK commented Jun 8, 2023

@xkangKK hello! The Reg_Max parameter is used to define the maximum range of anchor parameters. Anchor parameters are predefined bounding box sizes and aspect ratios that are used during training to detect objects of different sizes and shapes in your images.

The Reg_Max value is related to the scale of the anchors, meaning that a larger value of Reg_Max allows for larger anchor scales, which is useful for detecting larger objects. On the other hand, a smaller Reg_Max value allows for smaller anchor scales and can help with detecting smaller objects.

The optimal value for Reg_Max depends on the size and scale of the objects you want to detect in your images. Generally, larger image resolutions will require larger anchor scales, which may require increasing the Reg_Max value. You may need to experiment with different values of Reg_Max to determine the optimal value for your specific use case.

I hope this helps! Let me know if you have any further questions.

Thank you very much for your answer.

@glenn-jocher
Copy link
Member

@xkangKK you're welcome! Don't hesitate to let me know if you have any further questions or concerns.

@tongchangD
Copy link

I try in different reg_amx in my data, at last,I find 32 is best ,my data is 1024x1280. but some mini smaller objects is not detect.

@glenn-jocher
Copy link
Member

@tongchangD hello! It sounds like you have already experimented with different Reg_Max values and found that a value of 32 works best for your data, which has an image resolution of 1024x1280. However, you mentioned that some smaller objects are not being detected.

One possible reason for this could be that the anchor box sizes used during training are not well-suited for detecting small objects. Since objects of different sizes and aspect ratios require different anchor box sizes, it may be helpful to adjust the anchor box parameters to better match the size distribution of the objects in your dataset.

Another approach could be to try using a higher image resolution during training. This allows for the detection of smaller objects by providing more detailed input images, which can aid in the detection of fine details.

I hope this helps! If you have any further questions or concerns, please let me know.

@Rusab
Copy link

Rusab commented Jun 25, 2023

Hi @glenn-jocher, Isn't YOLOv8 anchor-box free? I am a bit confused why the anchor parameters that you are required in that case.

@github-actions
Copy link

👋 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:

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 ⭐

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

No branches or pull requests

4 participants