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

Add sv.PercentageBarAnnotator() for confidence level bar annotation in specified position #720

Merged
merged 24 commits into from Jan 23, 2024

Conversation

xaristeidou
Copy link
Contributor

@xaristeidou xaristeidou commented Jan 11, 2024

Description

This PR Implements (Fix #695)

This annotator will draw a percentage bar with borders, based on the confidence level for each prediction.
Annotator has the following attributes:

  • height
  • width
  • color
  • border_color
  • position
  • color_lookup

Execution time of annotation process (tested on Ryzen 7 5800H):

  • Exec time for 40 objects: 0.0011143684387207031
  • Mean exec time for each object: 2.7859210968017577e-05

List any dependencies that are required for this change.

No new dependencies required for this change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested, please provide a testcase or example of how you tested the change?

I tested using walking people asset video, prediction providing by YOLOv8. An example is presented below using height = 16, width = 80.
Screenshot from 2024-01-12 01-29-43

Any specific deployment considerations

  • Add new annotator class in Documentation
  • Add image example link reference in class Description in annotators/core.py

Docs

  • Docs updated? NO

@onuralpszr onuralpszr self-requested a review January 17, 2024 16:01
@onuralpszr onuralpszr added documentation Improvements or additions to documentation enhancement New feature or request api:annotator Annotators labels Jan 17, 2024
onuralpszr and others added 5 commits January 22, 2024 21:46
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
@onuralpszr
Copy link
Collaborator

Copy link
Collaborator

@onuralpszr onuralpszr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some gitignore changes and docs typo fixes as well. I also added docs for Percentage Bar I only waiting for pics to be upload so It will render properly.

@onuralpszr
Copy link
Collaborator

cc @SkalskiP

supervision/annotators/core.py Outdated Show resolved Hide resolved
supervision/annotators/core.py Outdated Show resolved Hide resolved
supervision/annotators/core.py Show resolved Hide resolved
onuralpszr and others added 5 commits January 23, 2024 04:34
…tageBarAnnotator

fix(core.py): 🐞 Treat CENTER_OF_MASS the same as CENTER in PercentageBarAnnotator
refactor(core.py): Move border mapping logic to separate method in PercentageBarAnnotator

Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
@onuralpszr onuralpszr merged commit f5f068b into roboflow:develop Jan 23, 2024
8 checks passed
@SkalskiP
Copy link
Collaborator

Hi @xaristeidou and @onuralpszr, I just made the final changes. We are merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:annotator Annotators documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add annotator sv.PercentageBarAnnotator which shows percentage bar of confidence level in specified position
3 participants