An advanced AI-powered predictive maintenance system for industrial equipment monitoring
Features • Installation • Usage • Models • Demo
- Overview
- Key Features
- Technology Stack
- Machine Learning Models
- Installation
- Usage
- Project Structure
- Data Format
- Screenshots
- Contributing
- Troubleshooting
- License
CYBER ROBOTS AI is an intelligent predictive maintenance system that leverages state-of-the-art machine learning algorithms to predict equipment failures before they occur. The system provides real-time analytics, interactive 3D visualizations, and comprehensive health monitoring dashboards, enabling proactive maintenance decisions and reducing unexpected downtime.
- Reduce Costs: Prevent costly unexpected equipment failures
- Increase Uptime: Maintain optimal operational efficiency
- Data-Driven Decisions: Make informed maintenance scheduling decisions
- Safety: Identify potential hazards before they become critical
- Instant equipment health assessment using ML models
- Remaining Useful Life (RUL) prediction in operational hours
- Maintenance requirement classification (Normal/Needs Maintenance)
- Anomaly detection through unsupervised learning
- 3D Sensor Visualization: Explore multi-dimensional sensor relationships
- Health Gauge: Real-time system health scoring (0-100)
- Distribution Charts: Visualize maintenance status and RUL distribution
- Time Series Analysis: Track sensor trends over operational hours
- Upload CSV files for bulk equipment analysis
- Process multiple equipment records simultaneously
- Export prediction results with detailed metrics
- Support for custom sensor configurations
- 3D Scatter Plots: Interactive sensor space exploration
- Heatmaps: Correlation analysis between sensors
- Box Plots: Statistical distribution of sensor values
- Line Charts: Temporal trend analysis
| Category | Technology | Version | Purpose |
|---|---|---|---|
| Backend | Python | 3.10+ | Core programming language |
| Web Framework | Streamlit | 1.29.0 | Interactive web application |
| Data Processing | Pandas | 2.1.3 | Data manipulation |
| NumPy | 1.26.2 | Numerical computing | |
| Visualization | Matplotlib | 3.8.2 | Static plots |
| Seaborn | 0.13.0 | Statistical graphics | |
| Plotly | 5.18.0 | Interactive 3D charts | |
| Machine Learning | scikit-learn | 1.3.2 | ML models & preprocessing |
| UI Components | streamlit-option-menu | 0.3.6 | Enhanced navigation |
Model: RandomForestRegressor(n_estimators=100, random_state=42)
Features: [sensor_1, sensor_2, sensor_3, operational_hours]
Target: RUL (Remaining Useful Life)
Output: Continuous value (hours)
Preprocessing: StandardScaler normalizationPurpose: Predicts the remaining operational hours before maintenance is required.
Model: RandomForestClassifier(n_estimators=100, random_state=42)
Features: [sensor_1, sensor_2, sensor_3, operational_hours]
Target: maintenance (0=Normal, 1=Needs Maintenance)
Output: Binary classificationPurpose: Determines whether equipment requires immediate maintenance attention.
Model: KMeans(n_clusters=2, random_state=42)
Features: [sensor_1, sensor_2, sensor_3, operational_hours]
Output: Cluster assignment (0=Normal, 1=Anomaly)Purpose: Identifies unusual sensor patterns that may indicate emerging issues.
Before installation, ensure you have:
- Python 3.10 or higher
- pip (Python package manager)
- Git
- 4GB+ RAM recommended
- Modern web browser (Chrome, Firefox, Safari, Edge)
- Clone the Repository
git clone https://github.com/Mohammad-Khaliafah/Predictive-Maintenance-System.git
cd Predictive-Maintenance-System- Create Virtual Environment (Recommended)
# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activate- Install Dependencies
pip install -r requirements.txt- Verify Installation
python -c "import streamlit; print(streamlit.__version__)"- Navigate to Project Directory
cd Predictive-Maintenance-System- Launch Streamlit App
streamlit run app.py- Access the Application
- The app will automatically open in your default browser
- Default URL:
http://localhost:8501 - Network URL will be displayed in terminal for external access
- View overall system statistics
- Monitor real-time health metrics
- Explore interactive 3D visualizations
- Review system capabilities
- Browse the complete dataset
- View data statistics
- Download sample format for uploads
- Understand data structure
Option 1: Upload CSV
- Navigate to "Input Data" → "Upload CSV" tab
- Click "Drop your CSV file here"
- Select file with required columns:
- sensor_1
- sensor_2
- sensor_3
- operational_hours
- Click "Process Data"
- View results and download predictions
Option 2: Generate Random Data
- Navigate to "Input Data" → "Generate Random" tab
- Click "Generate Random Values"
- Review generated sensor values
- Click "Use These Values"
- Check Results page for predictions
Option 3: Manual Input
- Navigate to "Input Data" → "Manual Input" tab
- Adjust sliders for each sensor value
- Set operational hours
- Click "Submit"
- View predictions on Results page
- View prediction summaries
- Analyze maintenance requirements
- Review anomaly detection results
- Download detailed reports
- Explore histograms of sensor readings
- View scatter plots vs operational hours
- Analyze RUL trends over time
- Study correlation heatmaps
- Review box plots for distribution analysis
Predictive-Maintenance-System/
│
├── app.py # Main Streamlit application
├── requirements.txt # Python dependencies
├── README.md # Project documentation
│
├── Predictive Maintenance.ipynb # Jupyter notebook with model training
├── machinery_data.csv # Sample dataset
│
└── .gitignore # Git ignore file
- app.py: Main application file containing the Streamlit interface and ML model integration
- Predictive Maintenance.ipynb: Development notebook with data generation, model training, and evaluation
- machinery_data.csv: Sample industrial equipment sensor data (1000 records)
- requirements.txt: All Python package dependencies with versions
| Column | Type | Description | Range |
|---|---|---|---|
sensor_1 |
Float | Primary sensor reading | Normalized: -3 to 3 |
sensor_2 |
Float | Secondary sensor reading | Normalized: -3 to 3 |
sensor_3 |
Float | Tertiary sensor reading | Normalized: -3 to 3 |
operational_hours |
Integer | Equipment running hours | 100 - 5000 |
sensor_1,sensor_2,sensor_3,operational_hours
0.496714,-0.138264,0.647689,2256
-0.234153,1.523030,-0.234137,3993
-0.469474,0.542560,-0.463418,1811
0.241962,-1.913280,-1.724918,4859| Column | Type | Description |
|---|---|---|
Predicted_RUL |
Float | Predicted remaining useful life (hours) |
Maintenance_Status |
String | "Normal" or "Needs Maintenance" |
Anomaly_Status |
String | "Normal" or "Anomaly" |
Contributions are welcome! Please follow these guidelines:
- Fork the Repository
git fork https://github.com/Mohammad-Khaliafah/Predictive-Maintenance-System.git- Create Feature Branch
git checkout -b feature/AmazingFeature- Commit Changes
git commit -m 'Add some AmazingFeature'- Push to Branch
git push origin feature/AmazingFeature- Open Pull Request
- Follow PEP 8 style guide for Python code
- Add comments for complex logic
- Update documentation for new features
- Test thoroughly before submitting PR
- Include screenshots for UI changes
- 🐛 Bug fixes
- ✨ New features
- 📝 Documentation improvements
- 🎨 UI/UX enhancements
- ⚡ Performance optimizations
- 🧪 Additional test coverage
Issue: Port already in use
# Solution: Specify different port
streamlit run app.py --server.port 8502Issue: Module not found error
# Solution: Reinstall requirements
pip install -r requirements.txt --force-reinstallIssue: CSV upload fails
Solution: Ensure CSV has exact column names:
- sensor_1 (not Sensor_1 or sensor1)
- sensor_2
- sensor_3
- operational_hours
Issue: Predictions seem incorrect
Solution: Check that:
1. Sensor values are within reasonable ranges
2. Operational hours are positive integers
3. Data is not corrupted or contains NaN values
If the app runs slowly:
- Reduce dataset size for testing
- Close other applications
- Check available RAM
- Use virtual environment
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Mohammad Khaliafah
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- Streamlit team for the amazing framework
- scikit-learn contributors for ML tools
- Plotly team for interactive visualizations
- Open-source community
Mohammad Khaliafah
- GitHub: @Mohammad-Khaliafah
⭐ Star this repository if you find it helpful!
Made with ❤️ by Mohammad Khaliafah