A machine learning-based system for detecting structural damage in a three-story aluminum building structure using vibration data.
This project was developed for the ML Forge competition as part of Shilp '25.
- Project Overview
- Dataset Description
- Installation
- Usage Guide
- Files and Directories
- Results and Visualization
- Troubleshooting
- Future Improvements
- License
- Acknowledgments
This system helps engineers detect structural damage by analyzing vibration data from a three-story aluminum structure.
It distinguishes between:
- β Normal environmental variations (e.g., temperature changes, aging)
- β Actual structural damage
- Nonlinear damage: Introduced via suspended column and adjustable bumper
- Environmental effects: Simulated using added mass or reduced stiffness
- Extracts meaningful patterns from complex vibration data
- Achieves 97% accuracy using a Random Forest model
- Easy to analyze new structural data
- Includes intuitive visualizations for clear insights
The dataset includes vibration readings from a specially built aluminum structure.
- Force Transducer: Measures input force
- Four Accelerometers: Measure response on each floor
-
Normal Baseline:
- Reference state (e.g.,
state#13)
- Reference state (e.g.,
-
Environmental Changes (Undamaged):
- Added weight
- Reduced stiffness
-
Damage Conditions:
- Varying bumper-column gaps for non-linear behavior
-
Mixed Conditions:
- Combine environmental + damage to test model robustness
Each condition contains multiple files with full sensor readings.
git clone https://github.com/your-username/structural-health-monitoring.git
cd structural-health-monitoringOn Windows:
python -m venv venv
venv\Scripts\activateOn macOS/Linux:
python -m venv venv
source venv/bin/activatepip install numpy pandas matplotlib scikit-learn scipy joblib seaborn tqdmOr use a requirements.txt:
pip install -r requirements.txtpython structural_health_monitoring.pyWhat it does:
- Loads and processes vibration data
- Extracts features
- Trains a Random Forest model
- Evaluates model and generates visualizations
- Saves trained model & processed data
You'll see:
Dataset created with 169 samples and 86 features
Test accuracy: 0.9706
Confusion Matrix:
[[18 0]
[ 1 15]]
python predict.py --auto --model structural_damage_model.pklpython predict.py --dir "path/to/data/directory" --model structural_damage_model.pklpython predict.py --file "path/to/data/file.txt" --model structural_damage_model.pkl --visualizepython predict.py --help===== Prediction Summary =====
Total files processed: 169
Overall damage detection: 50 damaged, 119 undamaged
Results saved to prediction_results.csv
python analyze_features.py --importance --model structural_damage_model.pkl --dataset processed_dataset.csvpython analyze_features.py --clustering --dataset processed_dataset.csvpython analyze_features.py --correlations --dataset processed_dataset.csvpython analyze_features.py --separability --dataset processed_dataset.csv| File | Description |
|---|---|
structural_health_monitoring.py |
Core pipeline for training and processing |
predict.py |
Main script to analyze new data |
analyze_features.py |
Explains model behavior and feature interactions |
debug_data_loading.py |
Helps troubleshoot dataset issues |
structural_damage_model.pkl |
Trained model file |
processed_dataset.csv |
Feature-rich, clean data |
feature_importance.png |
Visualization of important features |
confusion_matrix.png |
Model performance summary |
requirements.txt |
Python dependency list |
- 100% precision for undamaged states
- 93.8% precision for damaged states
- Only 1 misclassification in 34 test samples
- Feature Importance Plots
- Confusion Matrix
- PCA & t-SNE Embeddings
- Correlation Heatmaps
| Issue | Fix |
|---|---|
| File not found | Check paths and extensions (.txt) |
| Model loading issues | Ensure model file exists and matches scikit-learn version |
| Memory errors | Try smaller file batches |
| Unknown errors | Run debug_data_loading.py |
- Implement deep learning (CNNs, LSTMs)
- Real-time health monitoring
- Web dashboard for live visualization
- Damage localization (multi-class classification)
- Adaptation for different structure types
This project is under the MIT License. See the LICENSE file for more details.
Special thanks to:
- Shilp '25 / ML Forge Team β for organizing the challenge
- Open-source contributors β for the amazing tools and libraries