dataset_utils
Utility functions for training datasets in the YOLO format.
          clean_yolo_dataset(path, img_ext)
  Remove images and labels when the label file is empty.
Parameters
path : pathlib.Path The path to the dataset. img_ext : str
Returns
None
Source code in chirpdetector/dataset_utils.py
            
          load_img(path)
  Load an image from a path as a numpy array.
Parameters
path : pathlib.Path The path to the image.
Returns
img : np.ndarray The image as a numpy array.
Source code in chirpdetector/dataset_utils.py
            
          merge_yolo_datasets(dataset1, dataset2, output)
  Merge two yolo-style datasets into one.
Parameters
dataset1 : str The path to the first dataset. dataset2 : str The path to the second dataset. output : str The path to the output dataset.
Returns
None
Source code in chirpdetector/dataset_utils.py
            
          plot_yolo_dataset(path, n)
  Plot n random images YOLO-style dataset.
Parameters
path : pathlib.Path The path to the dataset.
Returns
None
Source code in chirpdetector/dataset_utils.py
            
          subset_yolo_dataset(path, img_ext, n)
  Subset a YOLO dataset.
Parameters
path : pathlib.Path The path to the dataset root. img_ext : str The image extension, e.g. .png or .jpg n : int The size of the subset
Returns
None