Skip to content

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

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

Merged
merged 24 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fbcc211
added boundingboxannotator class to re-write class
xaristeidou Jan 10, 2024
b1dbeaf
changed class name and description
xaristeidou Jan 10, 2024
e809e42
added PercentageBarAnnotator() to __init__ of package
xaristeidou Jan 10, 2024
ae7360b
added new attributes of class
xaristeidou Jan 10, 2024
f94c0a4
arguments description update
xaristeidou Jan 10, 2024
a59d845
added anchor xy coordinates
xaristeidou Jan 10, 2024
39ef293
added if else statements for different anchors
xaristeidou Jan 11, 2024
5ed3430
corrected border color, added rectangle for percentage
xaristeidou Jan 11, 2024
786942b
changed default value for height
xaristeidou Jan 11, 2024
c70ee87
deleted unused coordinates and changed type of anchor coords
xaristeidou Jan 11, 2024
ce19f91
changed border thickness percentage, extract confidence level
xaristeidou Jan 11, 2024
846b337
changed if else statements to dictionary mapping
xaristeidou Jan 11, 2024
f3cb8e9
reformed fill of confidence rectangle, changed border attributes
xaristeidou Jan 11, 2024
740076d
pre-commit spacing
xaristeidou Jan 11, 2024
65eda0b
build(docs): 👷 mkdocs-material with imaging dep added for development
onuralpszr Jan 22, 2024
6e9bfc9
chore: 🧹 folder attiributes ignored
onuralpszr Jan 22, 2024
0817389
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jan 22, 2024
c0c541d
docs: 📝 PercentageBar Annotator docs and usage added.
onuralpszr Jan 22, 2024
6f87069
docs: 📝 PercentageBar Annotator image added into core.py
onuralpszr Jan 22, 2024
2bc58e7
feat(core.py): 🚀 Allow custom NumPy array for custom_values in Percen…
onuralpszr Jan 23, 2024
fa569cb
ready for tests
SkalskiP Jan 23, 2024
027b608
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jan 23, 2024
45fe3c1
small bug fix
SkalskiP Jan 23, 2024
fc22a9c
update visualization path
SkalskiP Jan 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,24 @@ dmypy.json

# Notebooks
notebooks/

# OSX folder attributes
.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Windows
Thumbs.db
Desktop.ini

# Linux
*~
.directory
.Trash-*
39 changes: 32 additions & 7 deletions docs/annotators.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ comments: true

<div class="result" markdown>

![circle-annotator-example](https://media.roboflow.com/supervision-annotator-examples/dot-annotator-example-purple.png){ align=center width="800" }
![dot-annotator-example](https://media.roboflow.com/supervision-annotator-examples/dot-annotator-example-purple.png){ align=center width="800" }

</div>

Expand Down Expand Up @@ -187,7 +187,28 @@ comments: true

<div class="result" markdown>

![ellipse-annotator-example](https://media.roboflow.com/supervision-annotator-examples/halo-annotator-example-purple.png){ align=center width="800" }
![halo-annotator-example](https://media.roboflow.com/supervision-annotator-examples/halo-annotator-example-purple.png){ align=center width="800" }

</div>

=== "PercentageBar"

```python
>>> import supervision as sv

>>> image = ...
>>> detections = sv.Detections(...)

>>> percentage_bar_annotator = sv.PercentageBarAnnotator()
>>> annotated_frame = percentage_bar_annotator.annotate(
... scene=image.copy(),
... detections=detections
... )
```

<div class="result" markdown>

![percentage-bar-annotator-example](https://media.roboflow.com/supervision-annotator-examples/percentage-bar-annotator-example-purple.png){ align=center width="800" }

</div>

Expand Down Expand Up @@ -352,14 +373,18 @@ comments: true

<div class="result" markdown>

![trace-annotator-example](https://media.roboflow.com/supervision-annotator-examples/heat-map-annotator-example-purple.png){ align=center width="800" }
![heat-map-annotator-example](https://media.roboflow.com/supervision-annotator-examples/heat-map-annotator-example-purple.png){ align=center width="800" }

</div>

## BoundingBoxAnnotator

:::supervision.annotators.core.BoundingBoxAnnotator

## RoundBoxAnnotator

:::supervision.annotators.core.RoundBoxAnnotator

## BoxCornerAnnotator

:::supervision.annotators.core.BoxCornerAnnotator
Expand Down Expand Up @@ -388,6 +413,10 @@ comments: true

:::supervision.annotators.core.HaloAnnotator

## PercentageBarAnnotator

:::supervision.annotators.core.PercentageBarAnnotator

## HeatMapAnnotator

:::supervision.annotators.core.HeatMapAnnotator
Expand Down Expand Up @@ -416,10 +445,6 @@ comments: true

:::supervision.annotators.core.TraceAnnotator

## RoundBoxAnnotator

:::supervision.annotators.core.RoundBoxAnnotator

## ColorLookup

:::supervision.annotators.utils.ColorLookup
Loading