Skip to content

iamtechnoana/paving-design-system

Repository files navigation

Paving Design System — AI-Powered Stone Pattern Generator

Automated paving design pipeline that generates architectural stone patterns, photorealistic renders, bill of materials, and installation maps. Built with Streamlit, Stable Diffusion + ControlNet, and algorithmic pattern engines.

What It Does

Given a site photo and design preferences, the system:

  1. Renders photorealistic paving visualization using SD + ControlNet (maintains architectural perspective)
  2. Generates algorithmic patterns (disintegration, gradient, halftone, pixel art)
  3. Calculates Bill of Materials (paver count + m² per color)
  4. Exports IKEA-style installation grid maps
  5. Produces DXF files for CAD integration

Example Projects

Terrace Entrance Garden Pathway Plaza Center
terrace garden plaza
Garden Corner Entry Foyer
corner foyer

Architecture

Site Photo → Depth Map (MiDaS) → SD + ControlNet Render
                                         ↓
User Config → Pattern Engine → Grid Map → BoM Calculator
         (area, paver size,       ↓            ↓
          pattern style)    Installation   Material
                              Map          Report
                               ↓
                          DXF / HTML Export

Pattern Engine

  • Disintegration — radial probability field, dense center dissolving outward
  • Gradient — smooth color transitions across the surface
  • Halftone — circular dot patterns scaled by intensity
  • Pixel Art — grid-based color mapping

Render Pipeline (SD + ControlNet)

  • Depth map extraction via MiDaS preserves architectural perspective
  • ControlNet conditioning forces pattern to wrap around surface geometry
  • Not a flat overlay — pattern respects slope, foreshortening, and grout lines

Usage

pip install -r requirements.txt

# Run web app
streamlit run app.py

# Generate example projects
python generate_examples.py

# Full pipeline (programmatic)
python paving_pipeline.py

Tech Stack

Layer Technology
Web UI Streamlit
Rendering Stable Diffusion + ControlNet (RunPod API)
Pattern Engine NumPy, Pillow
CAD Export DXF (ezdxf)
Storage Local filesystem / Cloudflare R2
Database SQLite
Deployment Docker, nginx

Project Structure

├── app.py                 # Streamlit web application
├── core/
│   ├── patterns.py        # Pattern generation algorithms
│   ├── pattern_renderer.py # Pattern → image rendering
│   ├── grid_renderer.py   # Installation grid map
│   ├── bom.py             # Bill of Materials calculator
│   ├── colors.py          # Color management (97 paver colors)
│   ├── dxf_export.py      # CAD DXF export
│   ├── html_export.py     # HTML report export
│   ├── render_client.py   # SD + ControlNet API client
│   ├── storage.py         # File storage (local / R2)
│   ├── db.py              # Project database
│   ├── i18n.py            # Internationalization (TR/EN)
│   └── prompt_builder.py  # SD prompt construction
├── deploy/                # Production deployment scripts
├── tests/                 # Unit tests
└── output/examples/       # 5 complete project examples

About

AI-powered paving design system: Stable Diffusion + ControlNet renders, algorithmic pattern generation, BOM calculator, DXF export, and Streamlit web UI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors