This project is a submission for the hackathon challenge to ensure data integrity in smart city environmental monitoring systems.
The data from environmental sensors is the lifeblood of a smart city, but it can be manipulated. The task is to build an unsupervised machine learning model that continuously analyzes data streams from a network of sensors, learns normal operational patterns, and identifies subtle anomalies that could indicate a malfunctioning sensor or a sophisticated data tampering attack.
TriGuard is a full-stack application featuring a hybrid AI engine designed to detect a wide range of anomalies in real-time.
- Hybrid AI Engine: Utilizes three distinct unsupervised models (Isolation Forest, Autoencoder, and LSTM Autoencoder) to detect statistical, contextual, and temporal anomalies.
- Real-time API: A Flask backend serves the trained models and provides a live API endpoint for predictions.
- Data Integrity: Includes a (simulated) blockchain logging feature to create a tamper-proof audit trail of detected anomalies.
- Backend: Python, Flask, Flask-CORS
- Machine Learning: TensorFlow (Keras), Scikit-learn, Pandas
- Frontend: React.js
- Deployment Goal: Backend on Render, Frontend on Vercel
TriGuard_Final/
│
├── backend/
│ ├── models/
│ ├── app.py
│ └── requirements.txt
│
└── frontend/
├── src/
├── public/
└── package.json
- Navigate to the backend directory:
cd backend - Install the required Python packages:
pip install -r requirements.txt
- Run the Flask server:
The server will be running on
python app.py
http://127.0.0.1:5000.
- Navigate to the frontend directory in a new terminal:
cd frontend - Install the required Node packages:
npm install
- Run the React development server:
The application will be accessible in your browser, likely at
npm run dev
http://localhost:5173.