Tool for visualizing TensorFlow Object Detection API's data augmentation techniques on images with bounding boxes. This tool solves that problem by allowing you to:
- Visualize TensorFlow's augmentation functions on your images
- See how augmentations affect bounding box coordinates
- Use your existing Pascal VOC format annotations
- Customize augmentation parameters via a YAML config file
- Generate visualization images for evaluation and documentation
- TensorFlow (1.x compatible)
- OpenCV
- PIL/Pillow
- NumPy
- PyYAML
- TensorFlow Object Detection API
Configure your file directory path:
# Configuration
CONFIG_PATH = "home/aug_parameter.yaml"
IMAGE_PATH = "home/data/car.png"
OUTPUT_DIR = "home/output_image"
# XML annotation path
XML_PATH = "home/data/car.xml" # Optional: Path to XML file for bounding boxesThen customize augmentation parameters inside aug_parameter.yaml file:
...
# Color augmentations
random_adjust_brightness:
max_delta: 0.1
random_adjust_contrast:
min_delta: 0.8
max_delta: 1.1
random_adjust_hue:
max_delta: 0.1
random_adjust_saturation:
min_delta: 0.8
max_delta: 1.1
random_distort_color:
color_ordering: 1
...Run the python script:
python visualize_augmentation_tfod.pyAugmented images will be saved inside output_img folder.