Textile inspection - MEB Karachi
AI-Enabled Fabric Defect Detection
- Status
- In evaluation
- Role
- Final Year Project - lead engineer
- Organisation
- NUTECH x MEB Karachi
- Year
- 2025-2026
The problem
Fabric defects are caught by human inspectors watching moving cloth, so rare and unfamiliar defect types slip through and nothing is logged for the mill to act on.
Outcome
- mAP50
- 0.81mAP50Supervised YOLO branch on the curated defect set.
- Dataset size
- 1,400+Dataset sizeHand-curated real defect images.
- Inference
- On-cameraInferenceOAK-1W edge deployment, no server round trip.
- Grading
- 4-Point standardGradingAutomatic penalty scoring and pass/fail, on-premise.
- Status
- Multi-site evaluationStatus

One frame, four stages: raw cloth, PatchCore anomaly heatmap, YOLO detections, fused result.
Approach
- 01
Fused two complementary detectors: supervised YOLO classification for known defect classes, and PatchCore anomaly detection to catch defect types absent from the training set.
- 02
Curated a 1,400+ image dataset of real fabric defects rather than using a public benchmark.
- 03
Deployed to an OAK-1W edge camera so inspection runs at the loom instead of round-tripping to a server.
- 04
Wrapped it in a shippable product, not a script: an Electron + React desktop app over a FastAPI/SQLite backend, running entirely on-premise with no cloud dependency.
- 05
Scored rolls automatically against the 4-Point grading standard used by the industry, with pass/fail grading, role-based access for admin/operator/viewer, and audit-grade PDF reports with full traceability.
- 06
Added OEE tracking and optional MQTT telemetry, off by default.
Stack
- YOLO
- PatchCore
- OAK-1W / DepthAI
- PyTorch
- FastAPI
- Electron
- React
- SQLite
- Python

