Utils
NRTK perturber CLI Entrypoint
nrtk-perturber
Generate NRTK perturbed images and detections from a given set of source images and COCO-format annotations.
Generate NRTK perturbed images and detections from a given set of source images and COCO-format annotations and write them to an output folder in disk. The perturbed images are stored in subfolders named after the chosen perturbation parameter keys and values.
DATASET_DIR - Root directory of dataset. OUTPUT_DIR - Directory to write the perturbed images to. CONFIG_FILE - Configuration file specifying the PerturbImageFactory configuration.
- param dataset_dir:
Root directory of dataset.
- param output_dir:
Directory to write the perturbed images to.
- param config_file:
Configuration file specifying the PerturbImageFactory configuration.
- param generate_config_file:
File to write default config file, only written if specified.
- param verbose:
Display progress messages. Default is false.
nrtk-perturber [OPTIONS] DATASET_DIR OUTPUT_DIR CONFIG_FILE
Options
- -g, --generate-config-file <generate_config_file>
write default config to specified file
- -v, --verbose
print progress messages
Arguments
- DATASET_DIR
Required argument
- OUTPUT_DIR
Required argument
- CONFIG_FILE
Required argument
Augmented MAITE dataset(s) generator
This module contains nrtk_perturber, which generates augemented MAITE dataset(s) based on a pertrber factory configuration
- nrtk.interop.maite.utils.nrtk_perturber.nrtk_perturber(maite_dataset: Dataset, perturber_factory: PerturbImageFactory) Iterable[tuple[str, Dataset]]
Generate augmented dataset(s) of type maite.protocols.object_detection.Dataset.
Generate augmented dataset(s) of type maite.protocols.object_detection.Dataset given an input dataset of the same type and a perturber factory implementation. Each perturber dcombination will result in a newly generated dataset.
- Parameters:
maite_dataset – A dataset object of type maite.protocols.object_detection.Dataset
perturber_factory – PerturbImageFactory implementation.