Annotation-Consistent Diffusion Augmentation for UV Oil-Leak Detection: Code and Experimental Protocols
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
- Learning from First-Generation Qualitative Approaches in the IS Discipline: An Evolutionary View and Some Implications for Authors and Evaluators (PART 1/2)
- Commentary on the clinical and preclinical dosage limits of interstitially administered magnetic fluids for therapeutic hyperthermia based on current practice and efficacy models
- Prosthesis: New Technological Opportunities and Innovative Biomedical Devices
- The history and future of neural modeling for cochlear implants
- Ryanodine receptors: waking up from refractoriness
- Novel Transgenic Rabbit Model Sheds Light on the Puzzling Role of Matrix Metalloproteinase-12 in Atherosclerosis
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.