Evidence Hub

Annotation-Consistent Diffusion Augmentation for UV Oil-Leak Detection: Code and Experimental Protocols

Jung-sang Yoo

Zenodo (CERN European Organization for Nuclear Research), 2026

Abstract

# UV Fluorescence Oil-Leak Image Generation Code and parameters for fluorescence-guided diffusion image generation and HSV-based selection of synthetic image–annotation pairs. ## Files - `image_generation.py`: prepares conditioning images and masks, generates images, and screens inherited annotations. - `generation_parameters.json`: input paths, generation settings, prompts, and HSV selection parameters. ## Requirements Python 3.10+, CUDA-enabled PyTorch, DiffSynth-Studio, NumPy, OpenCV, Pillow, and tqdm. Supply real **training-split** images, normalized YOLO bounding-box labels, and a trained rank-16 LoRA adapter. Data and model weights are provided separately. ## Usage Edit `paths.training_images`, `paths.training_labels`, `paths.output_directory`, and `models.adapter_path` in the JSON file. Relative paths are resolved from the JSON file's directory. ```bash # Check the configuration without generating images python image_generation.py --config generation_parameters.json --dry-run # Prepare masks, generate images, and apply HSV selection python image_generation.py --config generation_parameters.json --stage all ``` The stages can also be run separately using `--stage prepare`, `--stage generate`, or `--stage filter`. Outputs include conditioning inputs, raw images with candidate labels, and selected images with screened labels. Use a fresh output directory for each new run. CPU checks passed. GPU generation and reproduction of manuscript results were not performed during…

Read the paper

Related studies

Go deeper in Evidence Hub

Evidence Hub adds a study data sheet (design, sample size, evidence level, key numbers), an AI summary and a chat grounded in the paper's text.

Open this study Sign up free