# bbox-visualizer
This is a simple library which has different functions that lets users draw different types of visualizations. Useful for visualizing objects after object detection.
The bounding box points are expected in the format: `(xmin, ymin, xmax, ymax)`
* Documentation: https://bbox-visualizer.readthedocs.io.
* Free software: MIT license
## Installation:
pip install bbox-visualizer
## Usage:
import bbox_visualizer as bbv
![cover](images/cover.jpg)
#### Photos by [Joshua Earle](https://unsplash.com/@joshuaearle), [Jonas Weckschmied](https://unsplash.com/@jweckschmied) and [Sherzod Max](https://unsplash.com/@sherzodmax) on [Unsplash](https://unsplash.com).
| **image** | **function** |
|:----------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------:|
| ![bbox with label on top](images/bbox_top.jpg "Bouding box with label on top") | bbv.draw_rectangle(img, bbox)<br>bbv.add_label(img, label, bbox, top=True) |
| ![bbox with T label](images/bbox_T.jpg "Bouding box with label inside") | bbv.draw_rectangle(img, bbox)<br>bbv.add_T_label(img, label, bbox) |
| ![label with flag](images/flag.jpg "Label that looks like a flag, pole originates from inside the object") | bbv.draw_flag_with_label(img, label, bbox) |
| ![bbox with label inside](images/bbox_inside.jpg "Bouding box with label inside") | bbv.draw_rectangle(img, bbox)<br>bbv.add_label(img, label, bbox, top=False) |
| ![label with opaque overlay](images/overlay.jpg "Opaque bounding box with label inside the box") | bbv.draw_rectangle(image, bbox, is_opaque=True)<br>bbv.add_label(img, label, bbox, draw_bg=False, top=False) |
| ![multiple bbox](images/bbox_multiple.jpg "Multiple bounding boxes") | bbv.draw_multiple_rectangles(img, bboxes)<br>bbv.add_multiple_labels(img, labels, bboxes) |
| ![multiple flags](images/bbox_multiple_flags.jpg "Multiple flags") | bbv.draw_multiple_flags_with_labels(img, labels, bboxes) |
| ![multiple T bbox](images/bbox_multiple_T.jpg "Multiple bounding boxes with T labels") | bbv.draw_multiple_rectangles(img, bboxes)<br>bbv.add_multiple_T_labels(img, labels, bboxes) |
## There are *optional* functions that can draw multiple bounding boxes and/or write multiple labels on the same image, but it is advisable to use the above functions in a loop in order to have full control over your visualizations.
* bbv.draw_multiple_rectangles(img, bboxes)
* bbv.add_multiple_labels(img, labels, bboxes)
* bbv.add_multiple_T_labels(img, labels, bboxes)
* bbv.draw_multiple_flags_with_labels(img, labels, bboxes)
`bboxes` and `labels` are lists in the above examples.
### Credits
This package was created with Cookiecutter and the `audreyr/cookiecutter-pypackage` project template.
Raw data
{
"_id": null,
"home_page": "https://github.com/shoumikchow/bbox-visualizer",
"name": "bbox-visualizer",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "",
"keywords": "bbox_visualizer",
"author": "Shoumik Sharar Chowdhury",
"author_email": "shoumikchow@gmail.com",
"download_url": "",
"platform": "",
"description": "# bbox-visualizer\n\nThis is a simple library which has different functions that lets users draw different types of visualizations. Useful for visualizing objects after object detection.\n\nThe bounding box points are expected in the format: `(xmin, ymin, xmax, ymax)`\n\n* Documentation: https://bbox-visualizer.readthedocs.io.\n* Free software: MIT license\n\n\n## Installation:\n pip install bbox-visualizer\n\n## Usage:\n\n import bbox_visualizer as bbv\n\n\n![cover](images/cover.jpg)\n\n\n#### Photos by [Joshua Earle](https://unsplash.com/@joshuaearle), [Jonas Weckschmied](https://unsplash.com/@jweckschmied) and [Sherzod Max](https://unsplash.com/@sherzodmax) on [Unsplash](https://unsplash.com). \n\n| **image** | **function** |\n|:----------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------:|\n| ![bbox with label on top](images/bbox_top.jpg \"Bouding box with label on top\") | bbv.draw_rectangle(img, bbox)<br>bbv.add_label(img, label, bbox, top=True) |\n| ![bbox with T label](images/bbox_T.jpg \"Bouding box with label inside\") | bbv.draw_rectangle(img, bbox)<br>bbv.add_T_label(img, label, bbox) |\n| ![label with flag](images/flag.jpg \"Label that looks like a flag, pole originates from inside the object\") | bbv.draw_flag_with_label(img, label, bbox) |\n| ![bbox with label inside](images/bbox_inside.jpg \"Bouding box with label inside\") | bbv.draw_rectangle(img, bbox)<br>bbv.add_label(img, label, bbox, top=False) |\n| ![label with opaque overlay](images/overlay.jpg \"Opaque bounding box with label inside the box\") | bbv.draw_rectangle(image, bbox, is_opaque=True)<br>bbv.add_label(img, label, bbox, draw_bg=False, top=False) |\n| ![multiple bbox](images/bbox_multiple.jpg \"Multiple bounding boxes\") | bbv.draw_multiple_rectangles(img, bboxes)<br>bbv.add_multiple_labels(img, labels, bboxes) |\n| ![multiple flags](images/bbox_multiple_flags.jpg \"Multiple flags\") | bbv.draw_multiple_flags_with_labels(img, labels, bboxes) |\n| ![multiple T bbox](images/bbox_multiple_T.jpg \"Multiple bounding boxes with T labels\") | bbv.draw_multiple_rectangles(img, bboxes)<br>bbv.add_multiple_T_labels(img, labels, bboxes) |\n\n## There are *optional* functions that can draw multiple bounding boxes and/or write multiple labels on the same image, but it is advisable to use the above functions in a loop in order to have full control over your visualizations.\n\n* bbv.draw_multiple_rectangles(img, bboxes)\n* bbv.add_multiple_labels(img, labels, bboxes)\n* bbv.add_multiple_T_labels(img, labels, bboxes)\n* bbv.draw_multiple_flags_with_labels(img, labels, bboxes)\n\n`bboxes` and `labels` are lists in the above examples.\n\n\n### Credits\n\n\nThis package was created with Cookiecutter and the `audreyr/cookiecutter-pypackage` project template.\n\n\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "Different ways of visualizing objects given bounding box data",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/shoumikchow/bbox-visualizer"
},
"split_keywords": [
"bbox_visualizer"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e2ed3fee03fcc9913a772a802e9407a49dfb026f78bab4f1385e8b91eb544e4a",
"md5": "d567c1821450e4cc9afe97eebceb0446",
"sha256": "c238adc3e158488c2ff8afba582ee82de2095bf7cf4cbb24ff7ef2b681d1d204"
},
"downloads": -1,
"filename": "bbox_visualizer-0.1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "d567c1821450e4cc9afe97eebceb0446",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.5",
"size": 6183,
"upload_time": "2020-09-25T03:12:28",
"upload_time_iso_8601": "2020-09-25T03:12:28.535023Z",
"url": "https://files.pythonhosted.org/packages/e2/ed/3fee03fcc9913a772a802e9407a49dfb026f78bab4f1385e8b91eb544e4a/bbox_visualizer-0.1.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-09-25 03:12:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "shoumikchow",
"github_project": "bbox-visualizer",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "bbox-visualizer"
}