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

Segment prediction labels normalization fix #10205

Merged
merged 3 commits into from
Nov 18, 2022
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Nov 18, 2022

Segment prediction labels normalization fix for #10196

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improvement of segmentation output normalization in YOLOv5's prediction pipeline.

📊 Key Changes

  • Added normalize boolean parameter to the scale_segments function.
  • Implemented normalization of segment coordinates within the scale_segments function when normalize=True is passed.
  • Normalization adjusts the segment dimensions relative to the image width and height, rather than absolute pixel values.

🎯 Purpose & Impact

  • Purpose: To provide an option for normalizing segment coordinates, making them relative to the image size (values between 0 and 1) instead of absolute pixel coordinates.
  • Impact: This can ease post-processing and is beneficial for tasks that require consistent scale-invariant representation like multi-scale training or when integrating with systems that expect normalized coordinates.
  • Potential Benefit to Users: Users now have the flexibility to choose between normalized or non-normalized segment outputs based on their specific use case or downstream application requirements.

@glenn-jocher glenn-jocher self-assigned this Nov 18, 2022
@glenn-jocher
Copy link
Member Author

@AyushExel

@glenn-jocher glenn-jocher linked an issue Nov 18, 2022 that may be closed by this pull request
1 task
@AyushExel
Copy link
Contributor

@glenn-jocher okay

@glenn-jocher glenn-jocher changed the title normalize_segments Segment prediction labels normalization fix Nov 18, 2022
@glenn-jocher glenn-jocher merged commit 467a57f into master Nov 18, 2022
@glenn-jocher glenn-jocher deleted the normalize_segments branch November 18, 2022 13:19
@glenn-jocher
Copy link
Member Author

@AyushExel ok all done. Note I had to swap the axes from the first commit. Not sure if we have this in our new work yet or not.

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.

Segmentation Prediction: Saved Text File Normalisation
2 participants