An end-to-end Machine Learning–based Sensor Fault Detection System designed to automatically identify faulty and non-faulty sensor readings across multiple sensor types using a unified architecture.
The system supports Wafer, Gas, Temperature, Light (LDR), and Soil Moisture sensors and provides real-time predictions through a Streamlit web interface.
🔗 Live Demo: https://sensor-fault-detection-system.streamlit.app/
- ✅ Multi-sensor fault detection using Machine Learning
- ✅ All-in-One intelligent router for automatic sensor type detection
- ✅ Robust preprocessing with imputation, scaling, and class balancing
- ✅ Separate optimized models for each sensor type
- ✅ Interactive Streamlit-based web interface
- ✅ Production-ready modular project structure
-
Input Layer
- CSV file upload or manual sensor input
-
All-in-One Router
- Automatically detects sensor type based on schema
-
Preprocessing Pipeline
- Missing value handling (KNN / Simple Imputer)
- Feature scaling (RobustScaler / StandardScaler)
- Class imbalance correction (SMOTETomek)
- Feature engineering
-
ML Model Layer
- Wafer → Support Vector Classifier (SVC)
- Gas → Random Forest
- Temperature → Random Forest
- Light (LDR) → XGBoost
- Soil Moisture → XGBoost
-
Prediction & Visualization
- Fault classification
- Downloadable results
- Visual insights
| Sensor Type | Fault Labels |
|---|---|
| Wafer | 0 = Normal, 1 = Faulty |
| Gas | 0 = Normal, 1 = Faulty |
| Temperature | 0 = Faulty, 1 = Normal |
| Light (LDR) | -1 = Faulty, 1 = Normal |
| Soil Moisture | -1 = Faulty, 1 = Normal |
- Programming Language: Python
- Machine Learning: Scikit-learn, XGBoost
- Data Processing: NumPy, Pandas
- Imbalance Handling: SMOTETomek
- Model Persistence: Pickle (.pkl)
- Web Framework: Streamlit
- Version Control: Git & GitHub
Sensor-Fault-Detection/
│
├── data/ # Sensor datasets
├── models/ # Trained models (.pkl)
├── pipelines/ # Preprocessing pipelines
├── scripts/ # Training & utility scripts
├── custom_transformers.py # Feature engineering logic
├── model_utils.py # Model load/save utilities
├── all_in_one_router.py # Sensor auto-detection logic
├── streamlit_app.py # Web application
├── main.py # Training & prediction entry
├── requirements.txt # Dependencies
└── README.md # Project documentation
git clone https://github.com/debjithacks/sensor-fault-detection.git
cd sensor-fault-detectionpip install -r requirements.txtstreamlit run streamlit_app.pyThe models are evaluated using:
- Accuracy
- Precision
- Recall
- F1-Score
- ROC-AUC Curve
- Confusion Matrix
All models achieved strong performance with ROC-AUC scores above 0.85, confirming reliability for real-world usage.
This project was developed as a team project by:
- Aditya Maity
- Souvik Pramanik
- Avijit Ray
- Subhadeep Hatai
- Debjit Ghosh
- Industrial sensor health monitoring
- Smart agriculture systems
- IoT-based automation platforms
- Preventive maintenance systems
- Real-time sensor streaming (IoT integration)
- Deep learning-based fault detection
- Sensor fusion and anomaly explanation
- Cloud-native deployment
This project is released under the MIT License – free to use, modify, and distribute with attribution.
⭐ If you find this project useful, please consider giving it a star!