Multi-Conditioned Diffusion for Sand Boil Synthesis in Levee Inspection

Multi-conditioned diffusion creates synthetic sand boils for low-resource earthen levee inspection, aiding defect detection with limited data.

miércoles, 29 de julio de 2026 • 5 min read • Q2BSTUDIO Team

Síntesis de ebulliciones de arena para inspección de diques

Sand boils represent one of the most critical defects in the safety of levees and embankments. These phenomena, which indicate underground seepage, can rapidly progress to catastrophic failures if not detected in time. Traditional visual inspection requires specialized personnel and long hours of patrolling, with limited detection rates. Automated computer vision systems promise greater efficiency, but they face a key obstacle: the scarcity of pixel-level annotated images. Manually labeling each sand boil is unfeasible at scale. In this context, the generation of synthetic data through multi-conditioned diffusion models emerges as an innovative solution that enables training segmentation models without the need for thousands of real annotations.

Q2BSTUDIO, a company specialized in custom software development and technology consulting, addresses this challenge by combining artificial intelligence, cloud computing, and cybersecurity. The company offers tailored solutions that integrate image synthesis pipelines like the one described, adapted to the needs of critical infrastructure. Thanks to its expertise in cloud services AWS/Azure, it is possible to scale the training of diffusion models and deploy real-time inference systems over large levee areas.

The multi-conditioned diffusion approach relies on architectures such as Stable Diffusion XL, fine-tuned with DreamBooth to learn the specific appearance of sand boils from a small set of real images. A stack of multiple ControlNets allows conditioning the generation process with different signals: edge maps, depth maps, or segmentation masks. This provides precise control over the shape and location of the synthetic defect. To ensure visual coherence, a soft-mask inpainting protocol is used that preserves the real defect pixels while regenerating the surroundings, eliminating the artifacts typical of previous methods like seamless cloning.

A differentiating aspect is the use of a taxonomy-driven Prompt Atlas. This catalog of textual descriptions is automatically generated from a domain specification and validated via CLIP to ensure that prompts are semantically relevant. The system can transfer to new classes of defects without modifying the code, simply by updating the taxonomy. This flexibility is key for companies like Q2BSTUDIO, which develop AI agents capable of adapting to different types of anomalies in infrastructure.

After generating 1,020 synthetic candidates, a CLIP-based admissibility filter selects 815 high-quality images. Evaluation of these images using distributional, fidelity, and diversity metrics against the real set shows that no single optimal configuration exists: each preset trades off fidelity, diversity, and label reliability. Therefore, a curated mixture of configurations is recommended as the natural augmentation set, prioritizing those that guarantee label provenance. Code and an artifact manifest are released to ensure reproducibility, a principle that Q2BSTUDIO applies in all its custom software developments.

The application of this technology goes beyond levees. It can be extended to the detection of other defects in civil infrastructure (cracks, corrosion, leaks), as well as industrial or agricultural inspection. The ability to automatically generate labeled data drastically reduces annotation costs and accelerates the deployment of computer vision systems. Q2BSTUDIO integrates these pipelines into cloud platforms, offering Business Intelligence (Power BI) dashboards that visualize asset status in real time and alert for anomalies. Moreover, cybersecurity is present at every layer, from protecting training data to authenticating deployed models.

The synthesis process begins with the selection of a small set of real sand boil images, captured by drones or fixed cameras. These images are used to fine-tune a pre-trained Stable Diffusion XL model via the DreamBooth technique, which customizes the model to generate images with the characteristic texture and color of the defect. Simultaneously, a ControlNet stack is trained with different input modalities: edge detection (Canny), depth maps (Midas), and segmentation masks. During inference, the user can draw an approximate mask on a base image, and the model generates a realistic sand boil within that region, while the rest of the image remains intact thanks to soft-mask inpainting.

The soft mask is not binary; it assigns progressive weights from the center of the defect toward the edges, facilitating a smooth transition between synthetic and real pixels. This approach eliminates abrupt cuts and color differences typically seen in cloning-based compositing methods. Additionally, the same mask can be used as a segmentation label, thus generating ground truth automatically. However, the reliability of these labels depends on the quality of the input mask; therefore, the system allows opting for a preset selection of soft masks that guarantee high annotation accuracy.

To diversify generation conditions, a taxonomy-structured Prompt Atlas is used. For example, the taxonomy can include categories such as 'levee type', 'surrounding vegetation', 'time of day', 'weather conditions', or 'camera angle'. Each combination produces a specific prompt that the model interprets. CLIP evaluates the coherence between the prompt and the generated image, filtering out those that do not meet the semantic threshold. This process is fully automatic and can run on AWS or Azure clouds, leveraging GPU instances to accelerate generation. Q2BSTUDIO deploys these workflows using services like AWS SageMaker or Azure Machine Learning, integrated with CI/CD pipelines to ensure reproducibility.

From a business perspective, the ability to generate large volumes of labeled synthetic data has a direct impact on the cost and time of developing vision systems. Instead of investing months in manual annotation campaigns, organizations can obtain in days a robust dataset covering a wide variety of scenarios. Q2BSTUDIO offers consulting services to help companies define appropriate taxonomies, select base models, and optimize generation hyperparameters. Furthermore, the company integrates these systems with Business Intelligence (Power BI) dashboards that allow infrastructure managers to visualize defect distribution, temporal trends, and risk levels, all from a single platform.

Cybersecurity is not an add-on but a fundamental pillar. Critical infrastructure data is sensitive and must be protected against unauthorized access, tampering, or leaks. Q2BSTUDIO implements security measures at all stages: encryption of data at rest and in transit, role-based access control, audit logging, and periodic penetration testing. For AI models, adversarial robustness techniques and integrity verification are applied. All this ensures that deployed solutions meet industry standards and regulations such as GDPR or NIST.

In summary, the combination of multi-conditioned diffusion, cloud infrastructure, AI agents, and cybersecurity offers a complete ecosystem for early detection of sand boils and other levee defects. Q2BSTUDIO, with its expertise in custom software development, is ready to accompany companies at every step, from conceptualization to continuous operation. Its modular approach allows adapting the solution to the specific needs of each client, whether a port authority, a water resource management company, or a civil engineering firm.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.