-
-
Subtle defects like this thin diagonal line with small bumps are easy for tired inspectors to miss.
-
Another dataset sample: a faint flaw near the lower left that is hard to see by eye.
-
Sample fabric image from our dataset: a faint diagonal mark with a small spot on the surface.
-
A tiny bright spot on the fabric. Small defects like this are why we need accurate real-time detection.
-
Straight checked fabric with a visible fold line near the top edge. Our dataset covers several fabric patterns and textures.
-
Fine checked fabric sample. Dense repeating patterns like this are a key test for detection accuracy.
-
Another diagonal checked sample. A faint crease runs across the pattern, the kind of flaw our model must tell apart from real defects.
-
Checked fabric sample from our dataset, shot at a diagonal angle. Patterned fabrics make subtle defects harder to spot.
Inspiration
Quality control in textile mills is still done mostly by human eyes. Inspectors watch fast-moving fabric for holes, stains, broken threads, misweaves, and colour variations, and tired eyes miss defects. Automated inspection systems exist, but they need expensive specialised hardware built for large mills. Small and medium textile units, especially in a textile hub like Faisalabad, usually can't afford them. We wanted to see how far a lightweight AI model can go on low-cost hardware.
What it does
How we built it
FabricVision is a real-time fabric defect detection system built around the YOLOv8-nano object detector. It takes a live or recorded camera feed of fabric, detects and localizes five defect types (holes, stains, broken threads, misweaves, colour variations), and shows the results on a web dashboard with logs and summary analytics.
Challenges we ran into
- Data: public benchmark datasets (AITEX and TILDA), preprocessed with OpenCV and annotated with bounding boxes for the five defect classes.
- Baseline model: YOLOv8-nano trained in PyTorch, evaluated with precision, recall, and mAP.
- Optimization: pruning, quantization, or reduced-resolution inference, then a direct comparison against the baseline.
- Real-time prototype: the optimized model runs on a live or recorded camera feed.
- Dashboard: React.js frontend, Flask/FastAPI backend, and MongoDB for detection logs.
- Deployment: packaged with Docker and tested on low-cost edge hardware such as a Raspberry Pi or Jetson Nano-class device, where available. ## Our Targets
- Model size under 50 MB
- 15 or more frames per second on low-cost edge hardware
These are design targets, not achieved results. The project is at an early stage and we will report the real numbers, including the accuracy, speed, and size trade-offs, once testing is done.
Challenges we expect
- Public datasets may not cover all five defect classes evenly, so we will check class balance and use augmentation.
- Public images may not match real factory lighting and camera angles.
- Keeping accuracy acceptable while shrinking the model for edge devices.
What we hope to learn
How to take a deep learning model from dataset preparation and training through optimization to a working end-to-end system, and how much accuracy we have to trade for speed and size on cheap hardware.
What's next for FabricVision: Real-Time Fabric Defect Detection
Testing on a wider range of fabrics and defect types, and trying the system in a real textile setting.
Log in or sign up for Devpost to join the conversation.