class_docstr: Implements a text detection dataset
  
  >>> from doctr.datasets import DetectionDataset
  >>> train_set = DetectionDataset(img_folder="/path/to/images",
  >>>                              label_path="/path/to/labels.json")
  >>> img, target = train_set[0]
  
  Args:
  ----
      img_folder: folder with all the images of the dataset
      label_path: path to the annotations of each image
      use_polygons: whether polygons should be considered as rotated bounding box (instead of straight ones)
      **kwargs: keyword arguments from `AbstractDataset`.
code: def class_names(self):
      return sorted(set(self._class_names))
  
file_path: doctr/doctr/datasets/detection.py
imports: import json
  import os
  from typing import Any, Dict, List, Tuple, Type, Union
  import numpy
  from doctr.file_utils import CLASS_NAME
  from .datasets import AbstractDataset
  from .utils import pre_transform_multiclass
label_desc: Use image node_id 3 for calling the DetectionDataset obj's underlying member method code with example usage: obj.class_names() and returns: sorted