anatools.annotations.annotations module¶
- class anatools.annotations.annotations.Annotations¶
Bases:
object
Generates annotations given a dataset directory, an output directory and mapping file. The dataset directory must include the Ana annotations, images and metadata folders. Examples of mapfiles are in the example channel at /ana/channels/example/mapfiles/.
- dump_coco(datadir, outdir, mapfile)¶
Generates annotations in the format of COCO Object Detection. See https://cocodataset.org/#format-data.
- Parameters
datadir (str) – The location of the Ana dataset.
outdir (str) – The location to output the annotation files to.
mapfile (str) – The location of the mapping file.
- dump_kitti(datadir, outdir, mapfile)¶
Generates annotations in the format of KITTI. See https://docs.nvidia.com/metropolis/TLT/archive/tlt-20/tlt-user-guide/text/preparing_data_input.html.
- Parameters
datadir (str) – The location of the Ana dataset.
outdir (str) – The location to output the annotation files to.
mapfile (str) – The location of the mapping file.
- dump_pascal(datadir, outdir, mapfile)¶
Generates annotations in the format of PASCAL VOC. See https://pjreddie.com/media/files/VOC2012_doc.pdf.
- Parameters
datadir (str) – The location of the Ana dataset.
outdir (str) – The location to output the annotation files to.
mapfile (str) – The location of the mapping file.