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.
- Patch generation & labeling:
daura.data_preperationruns a sliding-window extractor, balances the dataset, and serializes train/val/test splits. - Dataset API:
daura.datasetsexposes strongly typed dataloaders shared across training, evaluation, and experimentation. - Training pipeline:
daura.resnetorchestrates end-to-end training/evaluation of a ResNet50 classifier with configurable hyper-parameters (daura.config.TrainingConfig). - Interactive demo:
main.pylaunches a Gradio app that streams inference heatmaps while supporting CUDA acceleration when available. - Utilities:
daura.utilscentralizes common helpers (windowing, reconstruction, persistence, metrics) used throughout the stack.
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.
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_preperationThe 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.
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.
python main.pyYou can control the sliding-window stride and decision threshold directly from the UI. When launched with CUDA-compatible drivers, DAURA automatically uses the GPU.
python -m daura.resnet # trains and evaluates
python -m daura.resnet --help # if you add custom CLIsTweak 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.
pytestUnit tests currently cover the sliding-window utilities and reconstruction helpers; add more as the project evolves.
- Train on multi-resolution datasets and fuse predictions.
- Release a lightweight model for low-resolution imagery.
- Publish automated data/weights download scripts.