Spaces:
Sleeping
title: DDA Change Detection (Dev)
emoji: π°οΈ
colorFrom: gray
colorTo: green
sdk: docker
app_port: 7860
DDA Change Detection β Development
Satellite / drone change detection web app for the DDA Scope of Work. This repository tracks dev-only features (APP_MODE=dda): image library, GeoTIFF comparison, async jobs, geo-referenced regions, reports, and PDF export.
New to the project? Start with DEV_SETUP.md β step-by-step install and run instructions for your machine.
| Environment | URL |
|---|---|
| Dev Space (HF) | https://coderuday21-satdetect-dev.hf.space |
| Local | http://127.0.0.1:8000 after python run.py |
Quick start
git clone https://github.com/Uday-at-Vedang/Change-Detection-DEV.git
cd Change-Detection-DEV
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
pip install -r requirements.txt
python run.py
- Add GeoTIFFs to
library_sources/2025/(or other year folders). - Open Image Library β Refresh.
- Use Change Detection to compare T1 vs T2.
Full details: DEV_SETUP.md Β· SOW plan: docs/IMPLEMENTATION_PLAN_DDA.md Β· HF deploy: DEPLOYMENT.md
Satellite Change Detection β Standalone Web App
Standalone web application for satellite image change detection with database storage and a clean, modern UI. Opens directly on the detection page β no sign-in required.
Features
- DDA dev UI β Library, comparison, jobs, reports, PDF (when
APP_MODE=dda) - Direct access β upload and run detection immediately (no login)
- Database β SQLite (or set
DATABASE_URLfor PostgreSQL); stores detection runs - Change detection β AdaptFormer deep learning + hybrid / difference methods
- GeoTIFF library β Year-folder library, 5 GB upload limit, lat/lng on regions
- Object classification β Changed regions labeled (Water, Vegetation, Building, Road, etc.)
- History & reports β Past runs, PDF export, email notifications
Setup (legacy summary)
See DEV_SETUP.md for the complete guide. Minimal steps:
Create a virtual environment (recommended)
cd change_detection_webapp python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activateInstall dependencies
pip install -r requirements.txtRun the app
python run.py # or: uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Open http://localhost:8000 in your browser.
First run
- The SQLite DB and
data/(overlay images) are created automatically on first use. - DDA mode: place images in
library_sources/YYYY/and use the Library tab. - Legacy mode: upload Before/After PNGs on the detection page.
- AdaptFormer model downloads from Hugging Face on first detection (~500 MB).
Configuration
- DDA mode:
APP_MODE=dda(default when usingrun.py). Copy.env.exampleβ.envfor optional overrides. - Database: set
DATABASE_URL(e.g.postgresql://user:pass@host/db) to use another DB; otherwise SQLite underdata/satellite_app.dbis used. - JWT: set
SECRET_KEYvia env in production. - Email:
EMAIL_API_URLorSMTP_USER/SMTP_PASSβ see.env.example.
Project layout
change_detection_webapp/
βββ app/
β βββ main.py # FastAPI app, routes
β βββ dda/ # DDA dev modules (library, jobs, reports)
β βββ detection_engine.py # Change detection pipeline
βββ static/js/dda/ # DDA frontend
βββ templates/index_dda.html # DDA dev UI
βββ library_sources/ # Local GeoTIFF library (year folders)
βββ docs/IMPLEMENTATION_PLAN_DDA.md
βββ DEV_SETUP.md # Colleague setup guide
βββ requirements.txt
βββ run.py # Local launcher (APP_MODE=dda)
API (DDA highlights)
GET /healthβ app mode and versionGET /api/dda/local/imagesβ library image listPOST /api/dda/jobsβ queue async detectionGET /api/dda/reports/{id}/pdfβ PDF downloadGET /dda/reports/{id}β browser report pagePOST /api/detectβ legacy multipart upload detectGET /api/historyβ detection run history
Hugging Face: Space stuck on βRestartingβ
- Open your Space β Settings β under Build, click Clear build cache β Save. Then trigger a rebuild (push a commit or click Restart).
- Check Logs (Build logs + App logs) for Python errors or βKilledβ (out of memory).
- In Settings β Hardware, try a slightly larger CPU/memory if available.