Bboxtools
Installation
git clone https://github.com/ODAncona/bbox-tools.git
cd bbox-tools
python3 setup.py install
or
pip install bboxtools
See the installation guide for more information.
Introduction
What is a bounding box?
Bounding boxes are a crucial component of object detection algorithms, which are used to identify and classify objects within an image or video. A bounding box is a rectangle that surrounds an object of interest in the image, and is typically represented by a set of coordinates that define the box's position and size. These boxes can be used to locate and extract objects from an image, and can also provide important information about the size, shape, and orientation of the objects
Various types and format
When you work with bounding box you have severals things to consider.
First, the bounding box could be stored in different types like:
- Top-Left Bottom-Right (TLBR), (x_min, y_min, x_max, y_max)
- Top-Left Width Height (TLWH), (x_min, y_min, width, height)
- Center Width Height (CWH), (x_center, y_center, width, height)
Which are popular among different formats like :
- COCO (Common Objects in Context)
- Pascal_voc (Visual Object Classes)
- YOLO (You Only Look Once)
Furthermore, the bounding box could be stored in different file formats like:
- csv
- xml
- json
- manifest
- parquet
- pickle
Goal
The goal of this library is to seamlessly convert bounding box format using easy syntax.
It should be a breeze like...
import bboxtools as bt
# Input file path
input_path1 = './examples/example1.csv'
# Output file path
output_path2 = './examples/output/test2.json'
# Mapping between the input file and the bboxtools format
bbox_map = dict(
class_name='class',
file_path='name',
x_min='top_left_x',
y_min='top_left_y',
width='w',
height='h',
image_width='img_size_x',
image_height='img_size_y',
)
# Read the input file
parser = bt.read_csv(input_path1, mapping=bbox_map)
# Export the file to the desired format
parser.export(output_path=output_path2, format='coco')
Documentation
API Reference
How to guide
Tutorials
Explanation
Contributing
Contributions are welcome!
License
This project is licensed under the GPLV3 License - see the LICENSE file for details.
Acknowledgments
Metadata
Release files for bboxtools-2 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bboxtools_2-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for bboxtools_2-0.0.1-py3-none-any.whl |
Release files / bboxtools_2-0.0.1-py3-none-any.whl
| Download URL | bboxtools_2-0.0.1-py3-none-any.whl |
|---|---|
| Size | 26.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36b51e7ba4ba01bc6f4b288fe7078e06d18e6b1dbbd5517f71ef60d8e4a067be
|
|
BLAKE2b-256 checksum How to use checksums |
f6d6152ca3731054946b1881c5544132d80769c536ea393202c781665094c48a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for bboxtools-2 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.