Pipeline Integrity AI is a machine learning-powered web application designed to support oil and gas pipeline condition assessment and predictive maintenance decision-making.
The system predicts whether a pipeline is:
- 🟢 Normal
- 🟡 Moderate
- 🔴 Critical
using inspection, operating, and material-related pipeline data.
Pipeline failures can lead to environmental pollution, production downtime, safety incidents, and costly repairs. This project demonstrates how machine learning can assist engineers in identifying high-risk pipelines and prioritizing maintenance actions.
- Interactive Streamlit web application
- Pipeline condition prediction using Random Forest
- Dynamic health dashboard
- Prediction confidence display
- Class probability distribution
- Inspection history table
- Downloadable PDF inspection report
- Engineering maintenance recommendations
- Multi-page professional interface
The project follows a complete machine learning workflow:
- Data loading and inspection
- Exploratory Data Analysis
- Engineering data validation
- Categorical encoding
- Feature scaling
- Random Forest model training
- XGBoost model comparison
- Model evaluation
- SHAP explainability
- Streamlit application development
- PDF report generation
The model uses the following input features:
- Pipe size
- Pipe thickness
- Maximum pressure
- Temperature
- Corrosion impact
- Thickness loss
- Material loss
- Pipeline age
- Material type
- Pipe grade
Final selected model:
Random Forest Classifier
Performance summary:
| Metric | Value |
|---|---|
| Accuracy | 92.5% |
| Critical Precision | 97% |
| Critical Recall | 93% |
Random Forest was selected because it outperformed XGBoost on the test set while remaining easier to interpret and deploy.
SHAP was used to explain model predictions and identify the strongest drivers of pipeline condition.
The most important features were:
- Thickness Loss
- Material Loss Percentage
- Pipe Thickness
- Pipe Size
This aligns with engineering expectations that structural deterioration indicators are strong predictors of pipeline integrity risk.
piping-failure-prediction/
│
├── app.py
├── README.md
├── requirements.txt
├── .gitignore
├── data/
├── models/
├── src/
├── pages/
├── assets/
├── notebooks/
└── reports/