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

Fixed Classify offsets #9155

Merged
merged 1 commit into from
Aug 25, 2022
Merged

Fixed Classify offsets #9155

merged 1 commit into from
Aug 25, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 25, 2022

@AyushExel resolves classifier offsets on images

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancements in text annotation positioning for image classification and plotting.

πŸ“Š Key Changes

  • Changed the position of classification result text from (64, 64) to (32, 32) in classify/predict.py.
  • Added an anchor parameter to text method in utils/plots.py to position text based on its bottom edge when required.
  • Updated text positioning within the plotting function to align it with the top edge of the visualized image for clarity.

🎯 Purpose & Impact

  • Purpose: To improve visual clarity in image annotations by adjusting text positions.
  • Impact:
    • Better user experience when viewing annotated images, with clear, neatly positioned text.
    • Allows developers more control over text annotations, and users will benefit from enhanced readability in resulting images. 🌟

@glenn-jocher glenn-jocher self-assigned this Aug 25, 2022
@glenn-jocher
Copy link
Member Author

glenn-jocher commented Aug 25, 2022

zidane
bus

@glenn-jocher
Copy link
Member Author

We should probably add a background box at some point.

Hero-Ultimate-Thing-To-Do-Spain-shutterstock_362200070

@glenn-jocher glenn-jocher merged commit 729dc16 into master Aug 25, 2022
@glenn-jocher glenn-jocher deleted the fix/classify_pred branch August 25, 2022 13:04
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant