Skip to content

auxiliary-ai/DAURA

Repository files navigation

DAURA — Detection of Disadvantaged Urban Areas

DAURA logo

Status: Under Development Version: 0.1.0 License: MIT

DAURA uses high-resolution satellite imagery to detect disadvantaged urban areas across Beirut. The project combines a data-preparation pipeline, a ResNet50 training stack, and an interactive Gradio interface for deploying predictions. Everything lives in the daura Python package for easier reuse.

Key Capabilities

  • Patch generation & labeling: daura.data_preperation runs a sliding-window extractor, balances the dataset, and serializes train/val/test splits.
  • Dataset API: daura.datasets exposes strongly typed dataloaders shared across training, evaluation, and experimentation.
  • Training pipeline: daura.resnet orchestrates end-to-end training/evaluation of a ResNet50 classifier with configurable hyper-parameters (daura.config.TrainingConfig).
  • Interactive demo: main.py launches a Gradio app that streams inference heatmaps while supporting CUDA acceleration when available.
  • Utilities: daura.utils centralizes common helpers (windowing, reconstruction, persistence, metrics) used throughout the stack.

Installation

git clone https://github.com/auxiliary-ai/DAURA.git
cd DAURA
python -m venv .venv && source .venv/bin/activate  # or conda/mamba if preferred
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .

Installing in editable mode registers the daura package so modules can be imported anywhere in your environment.

Preparing Data

Organize your raw imagery under raw_data/high_res/<class_name>/. Then run the preparation script (edit defaults inside the module or supply your own invocation):

python -m daura.data_preperation

The script saves balanced pickled splits to data/high_res/ and draws helpful distribution plots. Update the classes, window_size, and stride arguments to match your dataset.

Model Weights

Pretrained checkpoint downloads are handled via weights/download_weights.py. Place the resulting file at weights/resnet.pth (for the Gradio app) or weights/ResNet50.pth (for the training pipeline), or update the paths inside daura.config.TrainingConfig.

Running the Gradio App

python main.py

You can control the sliding-window stride and decision threshold directly from the UI. When launched with CUDA-compatible drivers, DAURA automatically uses the GPU.

Training / Evaluation

python -m daura.resnet          # trains and evaluates
python -m daura.resnet --help   # if you add custom CLIs

Tweak TrainingConfig in src/daura/config.py or instantiate your own config and pass it to daura.resnet.run_training_pipeline. The script saves the best checkpoint to weights/ResNet50.pth and renders a confusion matrix PDF for quick diagnostics.

Testing

pytest

Unit tests currently cover the sliding-window utilities and reconstruction helpers; add more as the project evolves.

Roadmap

  • Train on multi-resolution datasets and fuse predictions.
  • Release a lightweight model for low-resolution imagery.
  • Publish automated data/weights download scripts.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages