Skip to content

Quality control analytics and defect prediction dashboard for steel manufacturing using machine learning and Streamlit.

License

Notifications You must be signed in to change notification settings

akeDataAnalyst/quality-control-analytics-steel

Repository files navigation

Quality Control Analytics for Product Defect Reduction

Live Demo

Interactive dashboard for predicting and analyzing defects in steel manufacturing products (galvanized ribbed sheets, color-coated profiles, corrugated sheets, nails, wire products).

Built as part of a portfolio to demonstrate data analytics and quality control skills applicable to large-scale industrial operations in Ethiopia, such as AMG Steel Factory.

Project Overview

Description
A Streamlit-based interactive web application that analyzes production process data and visual inspection scores to predict batch defects, visualize defect trends, identify root causes, and provide actionable insights for quality improvement.
Users can input current process readings (zinc temperature, coating thickness, roller pressure, wire tension, material grade) and visual defect score (demo mode) to get real-time defect probability, risk alerts, and historical trends.

Goal
Reduce scrap, rework, and quality-related losses in steel production by enabling early defect detection, process optimization, and data-driven decision-making.

Problem Addressed

In large-scale steel manufacturing :

  • Defect rates of 8–15% in galvanizing, coating, corrugating, and wire processes lead to high scrap, rework, customer complaints, and lost revenue.
  • Manual quality checks and spreadsheet reporting are slow, inconsistent, and miss subtle patterns (e.g., zinc temperature drift, roller misalignment, coating thickness variation).
  • Root causes are often identified too late, causing avoidable material waste and energy overuse.
  • Construction boom increases demand for high-quality steel products — consistent quality is critical for market share.

Business impact

  • 8–15% material waste
  • Monthly scrap/rework costs in the range of ETB 300,000–800,000+
  • Delayed deliveries and risk of losing market share to imported steel

Solution

End-to-end quality analytics pipeline and interactive dashboard:

  1. Synthetic Data Generation

    • Simulated realistic production data (~2,190 records) for 8 production lines over 1 year
    • Key features: zinc temperature, coating thickness, roller pressure, wire tension, material grade, visual defect score
    • Binary target: defect (1 = defective batch, ~13% rate)
    • Realistic correlations (e.g., higher zinc temperature → thinner coating)
  2. Exploration & Preprocessing

    • Statistical summaries, defect rates by line, visual score comparison
    • Correlation analysis (visual score strongest predictor r ≈ 0.87)
    • Preprocessing: scaling numerical features, one-hot encoding categoricals
  3. Modeling & Prediction

    • Random Forest Classifier with class weighting
    • When visual defect score included (demo mode): recall 0.93, precision 1.00, ROC AUC 0.98
    • Process-only mode: limited performance (ROC AUC ~0.50) — highlights importance of inspection data
    • Threshold tuning for customizable sensitivity
  4. Interactive Dashboard

    • Real-time defect probability gauge
    • Risk alert card (LOW/HIGH) with recommendations
    • Adjustable threshold slider
    • Historical trends and feature importance visualization
    • Clear warnings: best results when visual inspection data is available

Technology Stack

  • Python 3.10+
  • pandas, numpy, scipy (data processing & statistics)
  • scikit-learn (Random Forest, preprocessing, metrics)
  • Streamlit (interactive dashboard)
  • Plotly (gauges, charts, trends)
  • joblib (model saving/loading)
  • seaborn/matplotlib (exploration visuals)

Key Achievements

  • Demonstrated strong predictive power when visual inspection data is included (recall 0.93, precision 1.00, AUC 0.98)
  • Highlighted limitations of process-only prediction (weak correlations, AUC ~0.50)
  • Created realistic simulation aligned with Ethiopian steel industry challenges
  • Built interactive tool directly applicable to quality teams in plants like AMG Steel Factory

Recommendations to Steel Factory

  • Prioritize automated vision inspection systems — strongest predictor of defects
  • Use process monitoring (temperature, thickness, pressure, tension) for trend analysis and preventive maintenance, not standalone prediction
  • Combine visual + process data for maximum impact (target 40–60% defect reduction)
  • Deploy dashboard on internal network for shift supervisors & quality control team
  • Start with high-volume lines (galvanized sheets, corrugated profiles)
  • Retrain quarterly with real batch data
  • Supports sustainable growth: less waste, lower energy use, stronger market position