Skip to content
Awais Asghar.
Computer Vision2025Featured

Real-Time Fabric Defect Detection

Six classical detectors fused by IoU, running live on a Jetson Nano.

A purely classical computer vision system for textile inspection, with no deep learning. GLCM texture statistics, FFT, Gabor filters, statistical variance, background subtraction and edge-Hough analysis each propose candidate regions, and an IoU-based fusion step merges them into stable bounding boxes. The pipeline is optimized for live camera input on a low-power edge device and is the basis of a paper in progress.

Real-Time Fabric Defect Detection thumbnail

README · rendered from GitHub

Real-Time Fabric Defect Detection on Jetson Orin Nano

Project Status Platform OpenCV Jetson Language License

Image

Project Overview

This project implements a real-time fabric defect detection system using purely classical computer vision techniques, deployed and optimized on the Jetson Nano. The system avoids deep learning entirely and relies on multi-method classical analysis combined with IoU-based bounding box fusion for robust and interpretable defect localization. The solution is designed for low-power edge devices and is suitable for industrial textile inspection where cost, explainability, and real-time performance are critical.


Problem Statement

Manual fabric inspection is:

  • Time-consuming
  • Inconsistent
  • Prone to human error

While deep learning–based solutions exist, they:

  • Require large labeled datasets
  • Demand high computational resources
  • Are expensive to deploy

Objective:
Develop a low-cost, real-time, and interpretable fabric defect detection system using classical computer vision, deployable on an edge device without any training or labeled data.

Image

Methodology

The system uses multiple independent classical detectors, each capturing different defect characteristics. Their outputs are fused using an IoU-based strategy to produce stable final detections.

Image Image

Classical Techniques Used

  • GLCM Texture Analysis – detects texture irregularities
  • FFT Frequency Analysis – detects disruptions in periodic patterns
  • Gabor Wavelets – captures directional and repetitive textures
  • Statistical Local Variance – highlights abrupt anomalies
  • Background Subtraction – detects stains and fading
  • Edge Detection + Hough Transform – detects linear defects

Fusion Strategy

  • Bounding boxes from all detectors are merged using Intersection over Union (IoU)
  • Size-based and border-based filtering removes false positives

System Pipeline


Camera Frame
↓
Preprocessing (Grayscale, Normalization)
↓
Parallel Classical Detectors
↓
Bounding Box Extraction
↓
IoU-Based Box Fusion
↓
Post-Processing Filters
↓
Final Defect Localization

Image Image Image Image Image

Jetson Orin Nano Deployment

Image
  • Real-time processing using live USB camera feed
  • Resolution optimized to 640×480 for performance
  • No disk I/O during runtime
  • Lightweight classical algorithms ensure stable FPS

This makes the system suitable for on-device industrial inspection.


Performance Highlights

Image
  • Fully real-time execution on Jetson Nano
  • No model training or dataset labeling required
  • Low power consumption
  • High interpretability and explainability

Industrial Applications

Image
  • Textile manufacturing quality control
  • Automated inspection on production lines
  • Low-cost alternatives to GPU-based vision systems
  • Edge-based visual monitoring systems

Future Work

Image
  • Detector confidence voting
  • Further runtime optimization
  • Optional deep learning verifier
  • Integration with industrial conveyor systems
Image

Demo

Project Image

https://github.com/user-attachments/assets/fac8b5cb-90fb-4048-a1f4-c30167beda15

https://github.com/user-attachments/assets/c4d4eb7a-723e-45d2-abae-a23ca4ae641c

License

This project is licensed under the MIT License.


Author

Awais Asghar Electrical Engineering | Computer Vision | Edge AI

⭐ If you find this project useful, consider giving it a star! ⭐

More in Vision

Related projects

See all
  • Vision2025

    Retinal Vessel Segmentation

    A clean, reproducible U-Net pipeline for segmenting blood vessels in fundus images.

    • Python
    • PyTorch
    • OpenCV
  • Vision2025

    Stereo Depth Estimation

    Disparity and depth maps from a calibrated stereo pair, with classical vision only.

    • Python
    • OpenCV
    • NumPy