bboxconverter

Subpackages

Package Contents

Functions

read_coco(→ bboxconverter.core.bbox_parser.BboxParser)

Read bounding boxes from a coco file.

read_csv(→ bboxconverter.core.bbox_parser.BboxParser)

Read bounding boxes from a csv file using pandas.read_csv.

read_manifest(→ bboxconverter.core.bbox_parser.BboxParser)

Read bounding boxes from a manifest file using pandas.read_csv.

read_pascal_voc(...)

Reads bounding boxes from a pascal_voc folder and returns a BboxParser object.

read_xml(→ bboxconverter.core.bbox_parser.BboxParser)

Reads bounding boxes from an xml file and returns a BboxParser object.

Attributes

__version__

__doc__

bboxconverter.read_coco(path: str | Path) bboxconverter.core.bbox_parser.BboxParser

Read bounding boxes from a coco file.

Parameters:

path (str | Path) – Path to csv file

Returns:

BboxParser object containing bounding boxes

Return type:

BboxParser

bboxconverter.read_csv(path: str | Path, mapping=None, kwargs={}) bboxconverter.core.bbox_parser.BboxParser

Read bounding boxes from a csv file using pandas.read_csv.

Parameters:
  • path (str | Path) – Path to csv file

  • mapping (dict) – Dictionary to map column names to bboxconverter standard format

  • kwargs (dict) – Keyword arguments for pandas.read_csv

Returns:

BboxParser object containing bounding boxes

Return type:

BboxParser

bboxconverter.read_manifest(path: str | Path, configuration, format='auto') bboxconverter.core.bbox_parser.BboxParser

Read bounding boxes from a manifest file using pandas.read_csv.

Parameters:
  • path (str | Path) – Path to csv file

  • format (str) – Format of the manifest file. Can be one of the following: ‘auto’, ‘coco’, ‘pascal’

  • configuration (dict) – Dictionary containing the configuration of the manifest file.

Returns:

BboxParser object containing bounding boxes

Return type:

BboxParser

bboxconverter.read_pascal_voc(path: str | Path) bboxconverter.core.bbox_parser.BboxParser

Reads bounding boxes from a pascal_voc folder and returns a BboxParser object.

Parameters:

path (str | Path) – Path to the pascal_voc folder. The folder should contain the following folders: - Annotations : contains the xml files - Images : contains the images

Returns:

BboxParser object containing bounding boxes

Return type:

BboxParser

bboxconverter.read_xml(path: str | Path) bboxconverter.core.bbox_parser.BboxParser

Reads bounding boxes from an xml file and returns a BboxParser object.

Parameters:

path (str | Path) – Path to the xml folder.

Returns:

BboxParser object containing bounding boxes

Return type:

BboxParser

bboxconverter.__version__
bboxconverter.__doc__ = Multiline-String
Show Value
"""
bboxconverter - easily convert bounding boxes in different formats
=====================================================================

Main Features
-------------
Here are just a few of the things that bboxconverter does well:

- Importing PASCAL VOC XML files
- Importing YOLO TXT files
- Importing COCO JSON files
- Importing CSV files
- Importing TXT files
- Exporting PASCAL VOC XML files
- Exporting YOLO TXT files
- Exporting COCO JSON files
- Exporting CSV files

"""