TerraGuard is an interactive web application designed to predict and prevent sinkhole hazards using advanced machine learning and geospatial data analysis. Developed as part of the Microsoft Innovation Challenge, TerraGuard leverages the power of AI to provide real-time risk assessments and early warnings, enhancing community safety and proactive risk management.
- Introduction
- Features
- Technologies Used
- Project Structure
- Installation
- Usage
- Contributing
- License
- Acknowledgments
Sinkholes pose a significant risk to infrastructure and human safety. TerraGuard aims to address this issue by providing a robust and user-friendly platform for predicting and preventing sinkhole occurrences. By integrating geospatial data and machine learning models, TerraGuard offers accurate risk assessments and real-time monitoring capabilities.
Website: https://terraguardv1.azurewebsites.net/
- Real-Time Risk Assessment: Provides real-time predictions of sinkhole risks based on current geospatial data.
- Interactive Map: Displays risk assessments on an interactive map, allowing users to visualize potential hazards.
- Early Warning System: Sends notifications and alerts to users about potential sinkhole threats.
- User-Friendly Interface: Intuitive design makes it easy for users to interact with the application and understand the risk levels.
- Data Integration: Combines multiple data sources, including geological surveys and environmental data, to enhance prediction accuracy.
- Python: Backend development and machine learning model implementation.
- JavaScript: Frontend development for interactive features.
- HTML/CSS: User interface design.
- Flask: Web framework for developing the application.
- Azure Machine Learning: For training and deploying machine learning models.
- Azure Blob Storage: For storing large datasets and model artifacts.
- Azure Web App: For hosting and deploying the web application.
- Folium: For creating interactive maps in Python.
- Cesium: For advanced 3D geospatial visualization.
- Machine Learning: Algorithms for predictive modeling.
- Geospatial Analysis: Techniques for analyzing and visualizing geospatial data.
.
├── .github/workflows
├── static
│ └── script.js
├── templates
│ └── index.html
├── LICENSE.txt
├── TerraGuard_Hackbox_Presentation.pdf
├── app.py
├── conda_env.yml
├── del_service.py
├── deploy_model.py
├── environment.yml
├── inference.py
├── register_model.py
├── requirements.txt
├── train.py
├── train_model_with_azure_ml.py
└── utils.py
- Python 3.7+
- Conda (recommended for environment management)
- Azure Account (for deploying the application)
-
Clone the repository:
git clone https://github.com/omuili/terraguard.git cd terraguard
-
Create and activate a conda environment:
conda env create -f conda_env.yml conda activate terraguard
-
Install the required Python packages:
pip install -r requirements.txt
-
Set up Azure services:
Follow the instructions in
deploy_model.py
andregister_model.py
to set up the necessary Azure services for deployment. -
Run the application:
python app.py
The application should now be running at
http://localhost:5000
.
To train the machine learning model, use the train.py
script:
python train.py
For training with Azure ML, use the train_model_with_azure_ml.py
script:
python train_model_with_azure_ml.py
Deploy the trained model using the deploy_model.py
script:
python deploy_model.py
To run inference with the deployed model, use the inference.py
script:
python inference.py
Access the interactive map by navigating to http://localhost:5000
in your web browser or visit the deployed application at https://terraguard.azurewebsites.net/. Use the map to view real-time risk assessments and receive alerts for potential sinkhole hazards.
Contributions are welcome! Please read the contributing guidelines for more information on how to get involved in the project.
This project is licensed under the MIT License. See the LICENSE.txt file for details.
- Microsoft Innovation Challenge 2024: For providing the platform and inspiration for this project.
- Microsoft Azure: For cloud services and support.
- Open Source Community: For the tools and libraries that made this project possible.