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

  1. Data: public benchmark datasets (AITEX and TILDA), preprocessed with OpenCV and annotated with bounding boxes for the five defect classes.
  2. Baseline model: YOLOv8-nano trained in PyTorch, evaluated with precision, recall, and mAP.
  3. Optimization: pruning, quantization, or reduced-resolution inference, then a direct comparison against the baseline.
  4. Real-time prototype: the optimized model runs on a live or recorded camera feed.
  5. Dashboard: React.js frontend, Flask/FastAPI backend, and MongoDB for detection logs.
  6. 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
  7. Model size under 50 MB
  8. 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.

Built With

Share this project:

Updates

Submission history