The problem
Textile mills inspect fabric for weaving defects such as holes, slubs, broken picks and oil stains — work still done largely by eye on fast-moving lines, where fatigue makes human inspection inconsistent: the same defect can be caught or missed depending on the inspector and the shift. Automated visual inspection promises consistency, but fabric is a hard texture problem: genuine weaving defects must be distinguished from normal texture variation, prints and lighting artefacts in fabric photographs. This project studies that idea end to end on the public TILDA textile texture database: a CNN classifier that detects weaving defects and reports the defect class with a confidence score per image. As with the rail project, honesty is built in — the evaluation notebook collects misclassified images into a review gallery so failures are inspected openly rather than hidden behind a single accuracy number, and the model only knows the defect types and textures represented in the TILDA data.
How it works
Dataset & model:
Dataset name: TILDA — textile texture database (public research collection used in fabric defect detection studies).
Source: Public academic release of the TILDA database.
Task: Multi-class image classification (weaving defect recognition).
Classes: Defect-free plus the documented TILDA defect taxonomy — hole, oil spot/stain, thread error, foreign body/object — per the research literature's TILDA class descriptions; the exact class list used in the build is confirmed in the report.
Model: CNN classifier — custom convolutional backbone, plus an ImageNet-pretrained transfer-learning variant for comparison (TensorFlow/Keras).
Input: Fabric photographs, normalized to a fixed input size with histogram equalization.
Prediction: Probability distribution over the defect classes.
Output: Most likely defect class with a confidence score and an adjustable threshold; misclassification review gallery.
Evaluation metrics: Accuracy, precision, recall, F1 and confusion matrix on a held-out validation split — computed by the Jupyter notebook during the buyer's build. No measured performance claimed; design target approximately 85% or better accuracy on the split.
Working:
- Fabric images are loaded from the TILDA dataset structure, normalized to a fixed input size and histogram-equalized.
- Preprocessing: augmentation with rotations, flips, brightness and noise jitter tolerates mill lighting and camera variation.
- Training phase: a CNN (custom backbone, plus an optional transfer-learning variant) trains for defect classification, with accuracy and loss logged each epoch.
- Evaluation phase: the Jupyter notebook runs the full evaluation on the held-out validation split — accuracy, precision, recall, F1, confusion matrix — and collects misclassified images into a review gallery.
- Inference phase: the trained model scores new fabric images, outputting the most likely defect class with a confidence score and an adjustable threshold.
- Output: per-image defect class prediction with confidence; the notebook's misclassification gallery documents exactly which images the model gets wrong.
Specifications:
Model | CNN classifier (custom backbone + ImageNet-pretrained transfer-learning variant), TensorFlow/Keras
Dataset | TILDA textile texture database, public research collection
Task | Multi-class weaving-defect classification
Classes | Defect-free, hole, oil spot/stain, thread error, foreign body/object (documented TILDA taxonomy)
Input | Fabric photographs, fixed input size with histogram equalization
Output | Most likely defect class with confidence score and adjustable threshold
Evaluation | Accuracy, precision, recall, F1, confusion matrix on held-out validation split — computed during the buyer's build
Design target | Approximately 85% or better accuracy on the split (target, not a measured claim)
Error analysis | Misclassification review gallery documenting real failure modes
Project features
[Multi-Class Defect Recognition] (implemented) — CNN classifier recognizing the documented TILDA defect types — hole, oil spot/stain, thread error, foreign body/object — plus a defect-free class.
[Confidence-Scored Predictions] (implemented) — Per-image defect class prediction with a confidence score and an adjustable decision threshold.
[From-Scratch vs Transfer-Learning Comparison] (implemented) — A custom convolutional backbone and an ImageNet-pretrained transfer-learning variant are both included for direct comparison.
[Mill-Condition Augmentation] (implemented) — Rotations, flips, brightness and noise jitter tolerate mill lighting and sensor noise.
[Misclassification Review Gallery] (implemented) — Misclassified images are collected into a review gallery for honest, open error analysis.
[Training Curves and Confusion Matrix] (implemented) — Training/validation loss and accuracy curves plus a confusion matrix feed the report's error analysis.
[Mill-Specific Retraining] (optional) — Training on a buyer's own mill fabric data is outside the base build and can be developed as an extension, scoped at quotation.
What is included
Complete source code (data pipeline, CNN training, transfer-learning variant, inference script)
Jupyter evaluation notebook (validation metrics, confusion matrix, misclassification review)
Project report PDF (background, TILDA dataset, methodology, evaluation, error analysis)
PPT presentation for final review
Viva Q&A preparation document (CNNs, texture features, transfer learning, classification metrics, quality-control context)
Setup guide (environment, dataset download, training and inference commands)
Limitations & prerequisites
The model only knows the defect types and fabric textures represented in the TILDA data; novel fabrics, prints and unseen defect types will not be classified correctly.
This is a design-target-driven prototype evaluated on a research dataset — it is not a production-line quality system and no deployed or line-speed performance is claimed.
Mill lighting, camera setups and fabric weaves outside the training data classify worse.
Performance depends on the split, augmentation and training conditions of the buyer's own run.
Defect-type naming follows the documented TILDA taxonomy; fine-grained industrial defect grading beyond it is outside the build.
Frequently Asked Questions
Which dataset and model are used?
The public TILDA textile texture database, used in fabric defect detection research. The build trains a CNN classifier — a custom convolutional backbone plus an ImageNet-pretrained transfer-learning variant for comparison — using TensorFlow/Keras.
What defects does the model detect?
The documented TILDA defect taxonomy: hole, oil spot/stain, thread error, and foreign body/object, plus a defect-free class. The exact class list used in the build is confirmed in the report.
Is the performance guaranteed?
No measured performance is claimed. The included Jupyter notebook computes accuracy, precision, recall, F1 and the confusion matrix on a held-out validation split during the buyer's build; the design target is approximately 85% or better accuracy on that split.
Can this run on a real textile production line?
No. This is a research-dataset prototype for study and demonstration. A production-line system would need mill-specific labeled data, line-speed cameras and integration work this project does not include.
Is this project suitable for a final-year project?
Yes, for B.E./B.Tech in Computer Science, AI/ML, Data Science, Electronics and related programs. It demonstrates CNN texture classification, transfer learning vs from-scratch comparison, and honest error analysis.
What will I receive, and can it be customized?
Source code (data pipeline, CNN training, transfer-learning variant, inference script), the evaluation notebook with the misclassification review gallery, report, PPT, viva Q&A and a setup guide. Customizable: mill-specific datasets, defect-localization outputs, or an inspection-station interface, scoped at quotation.
Components & software requirements
Python 3.10, TensorFlow/Keras (CNN training and inference)
OpenCV (image loading, resizing, histogram equalization)
NumPy, pandas (dataset handling, metric computation)
Matplotlib, Seaborn (training curves, confusion matrix)
Jupyter Notebook (evaluation procedure run during the buyer's build)
scikit-learn (train/validation splitting, metric utilities)
TILDA textile texture database (download guidance in the setup guide)
GPU recommended for CNN training (cloud-GPU guidance in the setup guide)
Delivery information
Built-to-order: the source code, evaluation notebook, report, PPT and viva kit are prepared fresh for the buyer. Typical delivery spans dataset setup, the training runs (both variants), evaluation and documentation; the exact schedule is confirmed at quotation.
Support terms
Setup guidance (environment, TILDA download, training and inference commands); viva preparation covering CNNs, texture features, transfer learning, classification metrics and the quality-control context; customization discussion (mill-specific datasets, localization outputs, inspection-station interface) scoped at quotation.