class documentation

class YOLOAnnotationWriter(object): (source)

View In Hierarchy

Class for writing annotations in YOLO-style TXT format.

Method write Writes the labels to disk.
def write(self, label, txt_path, labels_map_rev, dynamic_classes=False, include_confidence=False): (source) ΒΆ

Writes the labels to disk.

Parameters
labela fiftyone.core.labels.Detections or fiftyone.core.labels.Polylines
txt_paththe path to write the annotation TXT file
labels_map_reva dictionary mapping class label strings to target integers
dynamic_classes:Falsewhether to dynamically add new labels to labels_map_rev
include_confidence:Falsewhether to include confidences in the export, if they exist