How vahini-1/auratrack-ai works
AuraTrack AI accepts air-quality readings through a FastAPI service and returns six pollution-source fractions with a source-specific advisory. Its runtime supports PyTorch checkpoints and ONNX edge inference; a separate training path generates synthetic data, trains the model, and exports ONNX. IoT Hub telemetry is a separate ingestion capability, not shown feeding the API because that connection is not evidenced. Azure Maps, Stream Analytics, and SQL are documented integrations, but their runtime implementations are not present in the tree.
Main entry points: app.py FastAPI endpoints · training.py Model training · iot_hub_client.py IoT Hub client · onnx_engine.py Predictor loader
Components 19
Sensor ingestion
- IoT Hub client
src/data_ingestion/iot_hub_client.py - Reading schema
src/data_ingestion/sensor_data.py
Apportionment service
- FastAPI endpoints
src/api/app.py - Apportionment result
src/data_ingestion/sensor_data.py - Actionable advisory
src/api/app.py
Model lifecycle
- Predictor loader
src/inference/onnx_engine.py - ONNX inference
src/inference/onnx_engine.py - PyTorch predictor
src/models/source_apportionment.py - Source MLP
src/models/source_apportionment.py - Feature normalizer
src/models/source_apportionment.py - Synthetic mixtures
src/models/training.py - Model training
src/models/training.py - ONNX export
src/models/training.py
External integrations
- Azure IoT Hub
- Stream Analytics
- Azure Maps
- Azure SQL
Other components
- Sensor network
- Citizens and agencies
Connections 22
- Sensor network → IoT Hub client: sends telemetry
src/data_ingestion/iot_hub_client.py - IoT Hub client → Reading schema: serializes reading
src/data_ingestion/iot_hub_client.py - IoT Hub client → Azure IoT Hub: publishes telemetry
src/data_ingestion/iot_hub_client.py - Sensor network → FastAPI endpoints: submits reading
README.md - FastAPI endpoints → Reading schema: accepts and features
src/api/app.py - FastAPI endpoints → Predictor loader: loads predictor
src/api/app.py - Predictor loader → ONNX inference: selects ONNX
src/inference/onnx_engine.py - Predictor loader → PyTorch predictor: selects PyTorch
src/inference/onnx_engine.py - PyTorch predictor → Feature normalizer: normalizes features
src/models/source_apportionment.py - PyTorch predictor → Source MLP: runs prediction
src/models/source_apportionment.py - ONNX inference → Feature normalizer: normalizes features
src/inference/onnx_engine.py - FastAPI endpoints → Apportionment result: builds result
src/api/app.py - FastAPI endpoints → Actionable advisory: builds advisory
src/api/app.py - FastAPI endpoints → Citizens and agencies: returns fractions and guidance
README.md - Synthetic mixtures → Model training: provides training data
src/models/training.py - Model training → Source MLP: trains model
src/models/training.py - Model training → Feature normalizer: fits normalizer
src/models/training.py - Model training → ONNX export: exports model
src/models/training.py - ONNX export → ONNX inference: enables edge inference
README.md - FastAPI endpoints → Stream Analytics: optional upstream processing
README.md - FastAPI endpoints → Azure Maps: visualizes fractions
README.md - Azure SQL → Model training: supports retraining data
README.md