How manavitulasyan/smart-conveyor-predictive-maintenance works
This repository implements conveyor-condition monitoring: sensor readings enter a FastAPI backend, are classified by a trained model, and become health status, explanations, alerts, trends, and persisted readings. It also includes a separate interactive prediction script and a model-training workflow. The sampled backend shows these runtime relationships; the README is empty and the frontend file was not sampled, so its role and connections are left unspecified.
Main entry points: main.py FastAPI Backend · database.py Database Session · conveyor_model.pkl Trained Model · train_model.py Model Training
Components 14
Monitoring API
- FastAPI Backend
main.py
Machine Learning
- Fault Inference
main.py - Trained Model
ml/conveyor_model.pkl - Model Training
ml/train_model.py - Training Dataset
ml/dataset.csv - Interactive Prediction
ml/predict.py
Persistence
- Database Session
database.py - Reading Schema
models.py - PostgreSQL
Live Monitoring
- Current Health
main.py - Trend History
main.py - Alert History
main.py
Other components
- Sensor Client
- Web Page
index.html
Connections 12
- Sensor Client → FastAPI Backend: sends readings
main.py - FastAPI Backend → Fault Inference: requests prediction
main.py - FastAPI Backend → Trained Model: loads model
main.py - Model Training → Training Dataset: reads data
ml/train_model.py - Interactive Prediction → Trained Model: loads model
ml/predict.py - FastAPI Backend → Reading Schema: creates reading
main.py - FastAPI Backend → Database Session: opens session
main.py - Database Session → PostgreSQL: configures engine
database.py - FastAPI Backend → PostgreSQL: commits reading
main.py - FastAPI Backend → Current Health: updates health
main.py - FastAPI Backend → Trend History: appends reading
main.py - FastAPI Backend → Alert History: appends alert
main.py