Report Finalev7
Report Finalev7
OF
SUBMITTED BY
Submitted by
is a bonafide student of this institute and the work has been carried out by him/her under the
supervision of Prof. Aparna V. Mote and it is approved for the partial fulfillment of the
requirement of Savitribai Phule Pune University, for the award of the degree of Bachelor of
Engineering (Computer Engineering).
Place: Pune
Date:
We would like to give our sincere acknowledgment to everybody responsible for the successfulcompletion
of our project titled FABRIC IDENTIFICATION AND DEFECT DETECTION” It gives us great pleasure
to acknowledge with thanks the assistance and contribution of many individuals who have been actively
involved in various stages of this project to make it a success, Firstly we are very grateful to this esteemed
institute “ZEAL COLLEGE OF ENGINEERING AND RESEARCH NARHE PUNE* for providing
us an opportunity to our degree course. We wish to express our wholehearted thanks to our principal Dr.
AJIT M. KATE for providing the modernized lab facilities in our institute. Perfection is impossible to
achieve, but hard work and dedication can achieve any goal. We have tried our level best to fulfill the
requirements of the project, but we could not have achieved our goal without the able guidance of Prof:
A. V. MOTE H.O.D of the Computer Science Department. We are indebted to Prof. A. V. MOTE for
providing us with an opportunity to work under their guidance and for their constant support and
encouragement. Our gratitude towards our guide Prof. A. V. MOTE for their keen interest and boldness
of encouragement, which is received during the entire period of our project. We would also like to thank
all our lecturers. We thank one and all we would like to give our sincere acknowledgment to everybody
responsible for the successful completion of our project titled “FABRIC IDENTIFICATION AND
DEFECT DETECTION"
NIKITA JANGID
RADHA SONTAKKE
YUVRAJ KSHETRIMAYUM
SIDRA KHAN
This report discusses the implementation of a fabric defect detection and fabric identification
system using computer vision techniques. The goal of this project is to create a system that can
automatically detect fabric defects and identify the type of fabric being used. The system is
implemented using Python programming language and several libraries such as OpenCV, Pillow,
Sklearn, and Tenserflow. The fabric defect detection system uses image processing techniques to
identify defects such as holes, stains, and tears in the fabric. The system applies edge detection
algorithmsto detect the edges of the fabric and then uses contour detection to isolate the defective
areas. Finally, the system applies a classification algorithm to identify the type of defect present in
the fabric. The fabric identification system uses image processing techniques to identify the type
of fabric used in a particular garment. The system captures images of the fabric and extracts features
such as color, texture, and pattern. These features are then compared with a database of known
fabric types to determine the type of fabric being used. The implementation of the fabric defect
detection and fabric identification system has shown promising results. The system has the
potential to be used in the textile industry to improve the quality of finished products and reduce
waste. It can also be used in the retail industry to provide customers with accurate information
about the fabrics used in their garments. Future work on this project includes improving the
accuracy of the defect detection system, expanding the database of known fabric types, and
integrating the system with existing textile manufacturing processes.
01 INTRODUCTION……………………………………………. 1
1.1 Overview……………………………………………………….. 1
1.2 Motivation……………………………………………………… 1
1.3 Problem Definition and Objectives……………………………. 1
1.4 Project Scope & Limitations…………………………………… 2
1.5 Methodologies of Problem-Solving……………………………. 2
02 LITERATURE SURVEY…………………………………….. 3
03 SOFTWARE REQUIREMENTS SPECIFICATION……… 6
3.1 Assumptions and Dependencies……………………………….. 7
3.2 Functional Requirements………………………………………. 7
3.2.1 System Feature 1(Functional Requirement) …………………. 7
3.2.2 System Feature 2 (Functional Requirement) .……………….. 7
3.3 External Interface Requirements (If Any)……………………… 7
3.3.1 User Interfaces……………………………………………….. 7
3.3.2 Hardware Interfaces …………………………………………. 8
3.3.3 Software Interfaces ………………………………………….. 8
3.3.4 Communication Interfaces …………………………………... 8
3.4 Nonfunctional Requirements…………………………………... 8
3.4.1 Performance Requirements …………………………………. 8
3.4.2 Safety Requirements ……………………………………….... 8
3.4.3 Security Requirements ………………………………………. 8
3.4.4 Software Quality Attributes …………………………………. 9
3.5 System Requirements…………………………………………... 9
3.5.1 Database Requirements …………………………………....... 9
3.5.2 Software Requirements (Platform Choice) ………………….. 9
3.5.3 Hardware Requirements …………………………………….. 9
07 SOFTWARE TESTING……………………………………… 31
08 RESULTS……………………………………………………... 33
8.1 Outcomes………………………………………………………. 33
8.2 Screenshots…………………………………………………….. 33
09 APPLICATIONS……………………………………………... 37
10 FUTURE SCOPE……………………………………………... 38
11 CONCLUSION……………………………………………….. 39
ABBREVIATION ILLUSTRATION
i
ZCOER, Department of Computer Engineering 2022-23
LIST OF FIGURES
ii
iii
1.1 Overview
To appreciate the significance of fabric identifications, one must comprehend the burn test
procedure, but that’s not feasible. Unknown textiles are identified via a straightforward burn test.
Only experienced burners should conduct the burn test to identify the fabric. Many fabric retailers
and designers regularly determine the precise fabric content. Some fabrics melt while others catch
fire. Burn tests cannot differentiate cotton from other cellulose fabrics. Additionally, some fabrics
have finishes that affect how they burn. One of the first tasks in textile conservation is fabric
identification. Knowing the fabric can help you select the best preservation method, as well as the
ideal place to preserve or show a textile.
1.2 Motivation
• To help small-scale industries identify fabrics
• To help small-scale industries detect defects in fabrics
• For sustainable growth in sales for small-scale industries
A maker of clothing may identify the kind of fabric and the care that has to be done to keep materials
manufactured of a certain type with the use of knowledge of recognizing textile fabrics. This is a
crucial element in the labeling of the clothing, which involves indicating the fabric component of the
item. A fabric inspection can stop final product flaws, but many more factors make it an essential part
of any manufacturing.
The following are some manufacturing issues that faulty fabric can cause for clothing manufacturers
and suppliers, whether they are lower productivity or higher costs:
Their fabric consumption and waste will be impacted by variations in the cuttable width. The product
quality is impacted by different color shading across rolls or even within a single roll, necessitating specific
management throughout the cutting, stitching, packing, and other manufacturing phases to separate by color
shades. High fabric defect rates (such as stains, and holes)
1
ZCOER, Department of Computer Engineering 2022-23
1.4 Project Scope and Limitations
The conditions of a material's final usage are ultimately connected to a fabric's performance. Several
tests are run on the fabric after it has been developed to gauge various aspects. The strength of the
cloth is assessed using a variety of strength tests. The performance of textiles in their final usage is
influenced by physical, chemical, physiological, and biological factors. Fabrics receive the most
attention since they are the most common type of textile structures used in a wide range of applications,
even though all agents have an impact on textile performance at the fabric, yarn, and fabric levels.
Limitations are the datasets and incapability of the model to match the 100% accuracy rate in
identification and defect detection
Methods include:
• Fabric Identification
LITERATURE SURVEY
Existing System:
1) "Fabric Defect Detection with Deep Learning and False Negative Reduction"
This paper suggests a quick and automated defect detection system to reduce costs. The system
uses a customized Convolutional Neural Network (CNN) trained with over 50 defect types to ensure
it is well-generalized. As false negatives are costlier than false positives, the system employs FN
reduction methods. In automatic mode, the system achieved 75% accuracy, which increased to 95%
with operator intervention using the FN reduction method. The system is fast, computationally simple,
and accurately detects various defect types.
2) "An Innovative Approach of Textile Fabrics Identification from Mobile Images using Computer
Vision based on Deep Transfer Learning"
This paper presents a novel approach for categorizing textile fabrics by developing a computer
vision system that employs Convolutional Neural Network (CNN) as a feature extractor. This is
accomplished through the use of Transfer Learning, which involves repurposing a pre-trained CNN
model for a new problem. The paper showcases the effectiveness of CNN by conducting analysis
using feature extractors described in the existing literature.
3) "Defect detection and identification in textile fabrics using Multi-Resolution Combined Statistical and
Spatial Frequency Method"
This paper introduces a new approach to identifying fabric defects using the Multi-Resolution
Combined Statistical and Spatial Frequency Method. The process of detecting defects involves two
phases: training and testing. During the training phase, reference fabric images are divided into non-
overlapping sub-windows, and MRCSF extracts the features of the textile fabrics. The features are
then saved in a database. In the testing phase, the same process is applied to test fabric, and the features
are compared to those in the database. Based on the comparison results, each sub-window is classified
as either defective or non-defective.
3
ZCOER, Department of Computer Engineering 2022-23
4) “A Review Paper on Textile Fiber Identification”
Identifying the fiber of textiles is crucial in designing purpose-specific clothing. This study
employs both technical and non-technical tests to identify different textile fibers. Technical tests
include microscopic and chemical testing, while non-technical tests involve feeling and burning.
While non-technical tests are useful, technical tests are more reliable and accurate in identifying textile
fibers.
In conclusion, fabric identification and defect detection are essential tasks in the textile
industry. Theexisting research on fabric identification and defect detection using YOLOv5 and CNN
has shown that these techniques can be effectively used for these tasks.
“Automatic Fabric Defect Rui Jin and Qiang Niu Hindawi Mathematical Problems in 2021
Detection Based on an Engineering Volume 2021,
Improved YOLOv5” https://doi.org/10.1155/2021/7321394
"An Innovative Approach of A. C. da Silva BarrosM, 2020 International Joint Conference on 2020
Textile Fabrics Identification E. Firmeza Ohata, S. P. Neural Networks (IJCNN), 2020, pp. 1-8,
from Mobile Images using P. da Silva, J. Silva doi:
Computer Vision based on Almeida and P. P. 10.1109/IJCNN48605.2020.9206901.
Deep Transfer Learning," Rebouças Filho
4
ZCOER, Department of Computer Engineering 2022-23
“A Review Paper on Textile Khan, Ayub & Abir, IOSR Journal of Polymer and Textile 2019
Fiber Identification” Nafis & Rakib, Engineering. 04. 14-20. 10.9790/019X-
Mohammad Abu Nasir 04021420
& Bhuiyan, E. &
Howlader, Md.Ramij.
"Defect detection and R. S. Sabeenian and M. 2010 IEEE 2nd International Advance 2010
identification in textile fabrics E. Paramasivam, Computing Conference (IACC), 2010,
using Multi-Resolution pp. 162-166, doi:
Combined Statistical and 10.1109/IADCC.2010.5423017
Spatial Frequency Method,"
Proposed System:
In the context of statistical modeling, "GAM" commonly refers to the "Generalized Additive
Model," which is a type of model used for regression analysis. In this work, a GAN (Generative
Adversarial Network) model is utilized to generate a larger dataset through the use of a generator and
discriminator. The TensorFlow framework is employed for implementing the GAN model. The TILDA
dataset is used as the basis for generating the synthetic data. The resulting larger dataset can be used to
train machine learning models, such as those used for fabric defect detection or classification tasks. By
employing the GAN model, it is possible to overcome the limitations of small datasets, which can
otherwise limit the performance of machine learning models.
A fabric identification proposed system works by extracting features from fabric images through
multiple layers of convolutional and pooling operations in the CNN architecture. The extracted features
are then passed through fully connected layers, which further analyze and classify the fabric based on
the learned representations. The system can be trained with labeled fabric images, allowing it to learn
the subtle differences between fabric types and improve its accuracy over time. In the defect detection
system, fabric images would be collected and labeled with different defect categories such as holes,
stains, or tears. The YOLOv5 model would then be trained using these labeled images to recognize and
localize the defects within the fabric. The model is capable of detecting multiple defects in a single
image simultaneously, making it highly efficient for real-time applications.
5
ZCOER, Department of Computer Engineering 2022-23
CHAPTER 3
REQUIREMENTS SPECIFICATION
3.1 Introduction
A software requirements specification (SRS) is a document that is created when a detailed
description of all aspects of the software to be built must be specified before the project is to
commence. It is important to note that a formal SRS is not always written. There are many
instances in which effort expended on an SRS might be better spent on other software
engineering activities.
Table 3.1
6
ZCOER, Department of Computer Engineering 2022-23
3.1.3 Assumptions and Dependencies
Until the test data will be used for providing the information for the presentations, it is
assumed that the user is familiar with apps and also familiar with handling the smartphone. Since
the application is a mobile application, it will be assumed that the users will possess decent
familiarity.
• Performance requirements:
We use better performance and fast processes based on image processing and
machinelearning technique.
• Safety requirements:
This system uses mostly all sectors of the fabric industry to provide early defect detection to
all.
7
ZCOER, Department of Computer Engineering 2022-23
3.3.2 Hardware Interfaces
a. RAM : 4GB
b. STORAGE: 2GB Free Space
For good performance, the application should be tuned to model process and most of the RAM
should be used for our application. Good storage for the packages for running the application
and model can handle the request at a time.
For the safety purpose backup of the database must be required. To avoid illegal use of the
system, while using this System.
The system should be safe because we use the python system; with secure framework
therefore, the system should have proper security so that it cannot be hacked.
8
ZCOER, Department of Computer Engineering 2022-23
3.4.4 Software Quality Attributes
Application will satisfy following software quality attributes:
a. Correctness: System is planned in such way that it will give most correct output.
b. Reusable: This software is reusable.
c. Availability: As the system are an application based it is always available and no
needof any hardware or software for its installation.
Also, system satisfies other quality attributes such as reliability, Data Integrity,
maintainability and Scalability.
c. Backend: Python
d. Database: Python
b. RAM: 4 GB (min)
9
ZCOER, Department of Computer Engineering 2022-23
c. STORAGE: 2GB free (min)
In a waterfall model, each phase must be completed before the next phase can begin and there
isno overlapping in the phases. The sequential phases in Waterfall model are
• Requirement Gathering and analysis: All possible requirements of the system Tobe
developed are captured in this phase and documented in a requirement specification
document.
• System Design: The requirement specifications from first phase are studied in this
phase and the system design is prepared. This system design helps in specifying
hardware and system requirements and helps in defining the overall system
architecture.
• Implementation: With inputs from the system design, the system is first developed in
small programs called units, which are integrated in the next phase. Each unit is
developed and tested for its functionality, which is referred to as Unit Testing.
10
All these phases are cascaded to each other in which progress is seen as flowing
steadily downwards (like a waterfall) through the phases. The next phase is started only after
the defined set of goals are achieved for previous phase and it is signed off, so the name
Waterfall Model
We have divided the implementation plan for proposed system in various set of activities which
are needed to be carried out for successful implementation. Following time-lines and tables
represents the same.
11
ZCOER, Department of Computer Engineering 2022-23
Sr. No Task Description No. of days
1. Domain Selection Deciding the domain as machine 15
learning model for the project
2. Searching Key Terms Searching Key terms related to the 20
project
3. Deciding Topic for Selecting Fabric Identification and 13
project Defect Detection as the topic
4. Literature Survey Studied Paper Related to Fabric 20
Defect and Fabric identification
5. Problem Statement Making the problem Statement 11
6. Synopsis Formation Forming the synopsis 15
7. Studying Existing Methodologies and existing system 16
System are made
8. Mathematical Modelling For the Mathematical model of the 25
project
9. Existing System Implementation of the existing 61
system
10. Proposed System Implementation of the Proposed 77
System
11. Testing Going through various types of 23
testing
12. Data Analysis Analysis of existing and proposed 34
system
13. Report Generation Report Preparation 24
Task 1 is study IEEE paper in 30 days, task 2 signify design of algorithm, task 3 represent
design of GUI, task 4 represent preprocessing, task 5 signify the coding, task 6 represent
Implementation it requires 60 days to complete a work, task 7 correspond to Integrating
modules and testing and task 8 is documentation.
12
ZCOER, Department of Computer Engineering 2022-23
CHAPTER 4
SYSTEM DESIGN
Defect
Fabric Defect
Detection
Identification Detection
Model Model
Architecture Architecture
Identification
Output Output
Upload Image
Fabric Identification Fabric Defect Detection
1. The architecture is made by cv2, sklearn, Tensorflow, Pillow, SciPy, keras, and Numpy libraries
used in python language. These libraries gives all the necessary stuff related to model design. Python
is used for mobile application development.
2. After designing of GUI, another task is for data storage. We are using file database to store data
of defects and through this, user can authenticate easily.
3. Another task is to preprocess the input image which can be done by OpenCV, and Pillow library
of python. By using this library, image is converted into grayscale image, contour image and
smoothen image and apply image processing with the help of machine learning technique.
4. In this system, we detect the defect-based fabric, and create a bounding box around it using
YOLOv5. Also, Fabric type can be identified using CNN models.
5. The output defect type or fabric type is presented to the user.
13
ZCOER, Department of Computer Engineering 2022-23
Here are the modules for detecting defect -
• Image Acquisition: Images are collected first, in order to train data images are collected from a dataset
that contains training and testing data
• Object Detection Algorithm: after the image acquisition, images are sent for the detection of object
boundaries, here the object is identified using Latest YOLO(You Only Look Once) version 5
technology that creates identifiable boundaries along the object
• Defect Classification Algorithm: These algorithms are used in textile industry to automatically
identify and categorize defects in fabric materials. They use computer vision and machine learing
techniques to analyze images or video types of defects present in the fabric.
• Defect Visualization Algorithm: Once the defects are classified, a defect visualization algorithm can
be applied to visually represent the detected defects on the fabric images. This can help in
understanding the location and extent of the defects.
• Fabric Image Dataset: This dataset contains a collection of fabric images that are used to train and
evaluate the object detection algorithm (YOLO V5). The dataset provides labeled examples of fabric
images with corresponding defect annotations.
• Pre-trained YOLO V5: YOLO V5 refers to the pre-trained version of the YOLO algorithm. It is
trained on a large-scale dataset and can be used as a starting point for fabric defect detection and
localization.
14
ZCOER, Department of Computer Engineering 2022-23
The pre-trained model can be fine-tuned or used as is depending on the specific requirements.
• Defect Detection and Localization Algorithm: This algorithm combines the pre-trained YOLO V5
model with additional layers or modifications to specifically address the task of fabric defect detection
and localization. It takes fabric images as input and produces bounding boxes or masks around the
detected defects, along with their class labels.
• Defect Detection Report: The output of the defect detection and localization algorithm is a report that
summarizes the detected defects in the fabric images. It may include information such as the location,
type, and severity of the defects.
• Fabric Defect Localization Visualization: This component takes the output of the defect detection
and localization algorithm and generates visualizations that highlight the detected defects on the fabric
images. These visualizations can be used for further analysis and decision-making.
Following is the architecture for fabric Identification using CNN and GAN model
• Dataset Collection: A dataset of fabric images is collected, including various fabric types such as acrylic, artificial
fur, artificial leather, blended fabrics, chenille, corduroy, and cotton. Each fabric type is represented by a separate
class.
• Preprocessing: The fabric images are preprocessed by resizing them to a standard size and normalizing the pixel
values. Textual descriptions or metadata associated with the fabric samples can also be incorporated.
• Generative Adversarial Networks (GANs): GANs are used to generate synthetic fabric images that closely
resemble real fabric samples. Different GAN architectures like Wasserstein GAN (WGAN) and Deep
Convolutional GAN (DCGAN) are experimented with to generate realistic fabric images.
15
• Convolutional Neural Network (CNN) Training: A CNN model is trained on the augmented dataset. The CNN
learns to recognize and classify various fabric types accurately based on visual characteristics. The merged dataset,
comprising both real and generated fabric images, helps the CNN generalize and make accurate predictions, even
with limited real fabric samples.
• Fabric Identification: The trained CNN model can accurately determine the fabric type of a given fabric image
based on its visual characteristics. This fabric identification capability contributes to improved fabric analysis and
decision-making processes.
By combining GANs for data augmentation and CNNs for fabric identification, this system architecture addresses the
challenge of limited data availability for fabric identification, enhancing the accuracy and robustness of the fabric
analysis process.
Fs = {(If data set not loaded, If not predicted, if more time required to predict}
• Identify the Success state as S
• P = {(Correct prediction within time)}
16
17
18
19
20
21
ZCOER, Department of Computer Engineering 2022-23
Fig 4.8.Flow Diagram
22
ZCOER, Department of Computer Engineering 2022-23
Fig 4.9. Component Diagram
23
Project is estimated and completed in 312 days including SEM I and SEM II
Images of numerous fabric flaws, such as holes, stains, oil stains, and more, are included in the public
ZL-U Zeaper dataset. There are 5,715 photos in the collection, all of which include bounding boxes
around the flaws. It was produced by the Zhejiang University of Technology (ZJUT).
The ZL-U Zeaper dataset offers a wide range of photos with precise annotations, making it aninvaluable
tool for academics and developers working on fabric defect identification.
Various factors which contributes are mostly security of the app or any malfunction of model caused by
external sources
24
For Risk Mitigation, Proper Hardware is recommended along with brief note of its app requirements
before any user can download and use it.
Monitoring of app can be taken by using various security measures so that no intrusion attack on app
takes place.
Management of app and its resources are done by the native file system of python
26
ZCOER, Department of Computer Engineering 2022-23
5.3.3 Timeline chart
27
ZCOER, Department of Computer Engineering 2022-23
5.4.2 Management Reporting and Communication
• A leader is decided among the team members who communicate and correlate throughout the
project duration of time.
• She is responsible for maintain the proper flow according to the norms through SDLC
process.
• Team members should actively report to the leaders of the project (Team Leader)/
28
ZCOER, Department of Computer Engineering 2022-23
CHAPTER 6
PROJECT IMPLEMENTATION
6.3.1 CNN
A Convolutional Neural Network (CNN) was employed to tackle the task of fabric identification. The CNN
model was trained using a diverse dataset comprising both real fabric images and synthetic fabric images
generated by Generative Adversarial Networks (GANs). By training the CNN on this augmented dataset,
the model was able to learn and recognize the visual characteristics and patterns associated with various
fabric types, such as acrylic, artificial fur, artificial leather, blended fabrics, chenille, corduroy, and cotton.
The CNN's ability to analyze fabric images and accurately classify them based on their visual features
contributes to improved fabric analysis and decision-making processes, even when there is limited
availability of real fabric samples. This integration of GAN-generated synthetic fabric images with the CNN
29
6.3.2 YOLOv5
The study of computer vision makes it possible for machines to mimic the human visual system. It's a
branch of artificial intelligence that gathers data from digital photos or videos and then manipulates it
to create qualities. Image acquisition, screening, analysis, identification, and information extraction are
all part of the process. Computers can comprehend any visual material and respond appropriately thanks
to this thorough processing. You may also enroll in a free computer vision course to learn the
fundamentals of the artificial intelligence field.
To collect multi-dimensional data, computer vision projects convert digital visual input into clear
descriptions. Then, in order to facilitate decision-making, this data is translated into computer-
understandable language.
The Generative Adversarial Network (GAN) is a key component of our fabric identification research. It
is used to generate synthetic fabric images that closely resemble real fabric samples. By training the
generator and discriminator models in an adversarial manner, the GAN learns to produce fabric images
with visual characteristics and patterns similar to real fabrics. This allows us to expand our dataset and
improve the accuracy and performance of our fabric identification system, even when real fabric samples
are limited.
30
After training the model from the ZL-U Zeaper Datasets, A part of testing data is taken from the
datasets to check its correctness
Testing includes
• Native dataset Testing
• Real world data Testing
31
ZCOER, Department of Computer Engineering 2022-23
Fig.7.2 Accuracy Curve
32
8.1 Outcomes
Model successfully identifies the stains, dirt, line defect of threads and other defects with an accuracy
of 95% defect detection and 98% fabric identification
8.2 Screenshots
33
ZCOER, Department of Computer Engineering 2022-23
Fig.8.2 various other defects
34
ZCOER, Department of Computer Engineering 2022-23
Fig.8.4 UI for Fabric Detection
35
36
ZCOER, Department of Computer Engineering 2022-23
CHAPTER 9
APPLICATIONS
1. Quality Control in Textile Manufacturing - The fabric identification and defect detection methods
developed in this project can be used to ensure that only high-quality fabrics are produced and reach
the market, reducing the risk of product returns and recalls.
2. Automated Fabric Inspection - The fabric defect detection methods developed in this project can be
integrated into an automated fabric inspection system, reducing the need for manual inspection and
increasing productivity.
3. Textile Recycling - The fabric identification methods developed in this project can be used to identify
the type of fabric used in a textile product, making it easier to recycle and repurpose.
4. Fashion Design - The fabric identification methods developed in this project can be used by fashion
designers to identify the type of fabric used in a garment and ensure that it meets their design
requirements.
5. Retail Industry - The fabric defect detection methods developed in this project can be used by retailers
to ensure that only high-quality products are sold to customers, reducing the risk of product returns
and improving customer satisfaction.
37
ZCOER, Department of Computer Engineering 2022-23
CHAPTER 10
FUTURE SCOPE
1. Improving the accuracy of the fabric defect detection system by increasing the size of the
training dataset and fine-tuning the YOLOv5 algorithm.
2. Expanding the types of defects that can be detected by the system, such as loose threads, fabric
pilling, and color bleeding.
3. Integrating the defect detection system into the textile manufacturing process to identify defects
in real-time and prevent the production of defective products.
4. Developing a user-friendly interface for the fabric identification system to enable easy access for
customers.
5. Adding more features to the fabric identification system, such as detecting the fabric's country of
origin, fiber content, and care instructions.
6. Developing a mobile application that uses the fabric identification system to allow customers to
scan the barcode of a garment and retrieve information about the fabric used.
7. Investigating the use of other deep learning algorithms, such as ResNet and VGGNet, for fabric
identification and defect detection.
8. Testing the systems on a larger scale and in real-world scenarios to evaluate their performance and
effectiveness.
38
ZCOER, Department of Computer Engineering 2022-23
CHAPTER 11
CONCLUSION
In this report, we have presented the implementation of a fabric defect detection system using
YOLOv5 and a fabric identification system using CNN. The two systems aim to improve the quality
of textile products and provide accurate information to customers about the fabrics used in their
garments. The fabric defect detection system achieved high accuracy in detecting various typesof
defects such as holes, stains, and tears. The YOLOv5 algorithm was effective in detecting the defects
and drawing a bounding box around them.
The system can be integrated into the textile manufacturing process to improve quality control and
reduce the number of defective products. The fabric identification system achieved high accuracy
in identifying the type of fabric used in a garment. The CNN algorithm was effective in extracting
features such as color, texture, and pattern from the fabric images and using them to classify the
fabric type. The system can be used in the retail industry to provide customers with accurate
information about the fabrics used in their garments. The implementation of the fabric defect
detection and fabric identification systems has shown promising results.
Appendix A: Problem statement feasibility assessment using, satisfied analysis and NP Hard, NP-
• NP-Hard class of problems: A problem is in NP-Hard class if an already proved NP-Hard problem
reduces to it
39
ZCOER, Department of Computer Engineering 2022-23
• NP-Complete class of problems: A problem is NP-Complete if it is NP-Hard and it is NP (i.e. there
exists a non-deterministic algorithm running in polynomial time which solves it).
Appendix B: This research paper focused on fabric defect detection and fabric identification using
computer vision techniques. The YOLOv5 algorithm was used for defect detection, and a convolutional
neural network (CNN) was used for fabric identification. The research paper included a detailed
description of the methodologies used, as well as the datasets and tools employed in the process. The
results of the experiments showed that both the defect detection and fabric identification systems
performed with high accuracy, demonstrating the effectiveness of the proposed methodologies. The report
also discussed the limitations of the systems and potential future work to improve their performance and
expand their capabilities. Overall, the research paper demonstrated the potential of computer vision
techniques for improving the efficiency and accuracy of fabric manufacturing and product identification.
Grammar 9
Spelling 5
Punctuation 8
Conciseness 4
Readability 0
Word choice 0
Additional writing issues 7
40
ZCOER, Department of Computer Engineering 2022-23
References
1) R. S. Sabeenian and M. E. Paramasivam, "Defect detection and identification in textile fabrics using
Multi Resolution Combined Statistical and Spatial Frequency Method," 2010 IEEE 2nd International
Advance Computing Conference (IACC), 2010, pp. 162-166, doi: 10.1109/IADCC.2010.5423017.
2) T. Almeida, F. Moutinho and J. P. Matos-Carvalho, "Fabric Defect Detection With Deep Learning
and False Negative Reduction," in IEEE Access, vol. 9,pp.81936-81945,2021,doi:
10.1109/ACCESS.2021.3086028.
3) Khan, Ayub & Abir, Nafis & Rakib, Mohammad Abu Nasir & Bhuiyan, E. & Howlader, Md.Ramij.
(2017). A Review Paper on Textile Fiber Identification. IOSR Journal of Polymer and Textile
Engineering. 04. 14-20. 10.9790/019X-04021420.
5) Rui Jin 1,2 and Qiang Niu School of Computer Science and Technology, China University of Mining
and Technology, Xuzhou, China Changzhou Vocational Institute of Textile and Garment, Changzhou,
China; “Automatic Fabric Defect Detection Based on an Improved YOLOv5”
https://doi.org/10.1155/2021/7321394
41
ZCOER, Department of Computer Engineering 2022-23
International Journal of
Advanced Research in
Science, Communication
and Technology
Impact Factor: 7.301
Scientific Journal Impact Factor
(IJARSCT)
www.sjifactor.com
DOI: 10.48175/568
www.ijarsct.co.in
Lambert Publication’s
ISBN: 978-81-948321-7-1 Lambert Publication’s
Lambert Publication’s
Key to Avoid Pitfalls In Research (Volume I) Page1
www.ijarsct.co.in
7972611953
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
Impact Factor: 7.301 Volume 3, Issue 4, May 2023
Abstract: Due to the intricate geometries and wide diversity of fabric flaws, detecting them is a difficult task
in the fabric industry. Numerous approaches have been put out to address this issue, but they all have very
poor detection velocities and accuracy. As a traditional deep learning technique and end-to-end target
identification algorithm, YOLOv4 has quickly developed and been used in numerous sectors with positive
results. This study suggests a novel SPP structure that employs Soft-Pool rather than Max-Pool to detect
fabric defects more accurately than the YOLOv5 method. The enhanced YOLOv5 method with three Soft-
Pool has the advantage of processing the feature map efficiently, which significantly improves the detection
accuracy and lessens the negative impacts of the SPP structure. The improved YOLOv5 can identify the
location of defects accurately and quickly, and can also be applied in other defect detection industries.
I. INTRODUCTION
An essential step in the creation of fabrics in the textile industry is the inspection of fabric quality. More than 70
categories of fabric faults are established. The textile sector now relies significantly on manual visual inspection
techniques, which leads to incorrect inspection results and higher manufacturing costs overall. Defective fabric will lose
between 45% and 65% of its original cost. In order to increase the overall performance and reliability of fabric
inspection and, at the same time, increase production and efficiency in the textile sector, it is required and appropriate to
design an automatic visual inspection technique. Spectral, statistical, and model-based methods make up the three broad
groups that best describe the currently available automatic fabric flaw identification techniques.
Comparing many fabric picture patches allows statistical
algorithms to identify the distinctive statistical texture properties. Histogram character analysis, local contrast
enhancement, and the fractal method are examples of existing statistical techniques. The primary drawback of statistical
approaches is that the effectiveness of defect detection is strongly influenced by the size of the chosen sliding window
and the discrimination threshold.
Additionally, they disregard the global information since they identify defective regions by comparing the differences
between regions throughout the entire fabric image. By spectralizing the input images, spectral algorithms find the areas
of surface defects. By converting the input images to the spectrum domain and calculating the energy of the filter
responses, spectral methods identify the locations of surface defects.
Wavelet, Gabor, and Fourier transforms are a few of the spectrum techniques. When compared to statistical techniques,
spectral techniques can effectively utilize global data on fabric image data. Model-based approaches use modelling and
deconstructing techniques to address the issue of defect discovery.
Operational flowchart: -
III. MODELS:
YOLOv5
YOLO (You only look once) is an end-to-end neural network algorithm that has been continuously improved from
YOLOv1 to YOLOv5. Numerous research papers have shown that YOLO has better speed and accuracy than the other
algorithms. FPS (Frames Per Second) and precision are considered comprehensively. An improved algorithm based on
YOLOv5 is proposed in this paper, where images from the dataset are enhanced in advance, and image processing is
combined with deep learning to improve detection results. other algorithms. FPS (Frames Per Second) and precision are
considered comprehensively. An improved algorithm based on YOLOv5 is proposed in this paper, where images from
the dataset are enhanced in advance, and image processing is combined with deep learning to improve detection results.
Boetal proposed the machine vision technique in which defects are detected by the Gabor filter, which is based on
image processing, however, it has poor detection results for some types of defects. Wiener filter is used to classify
defective images by converting RGB images into binary images to improve the detection effect. In addition, there are
other methods to detect fabric defects. For example, a thermal-based defect classification method with K-nearest
neighbour algorithm and dimensionality reduction to classify textile defects respectively. Image processing and thermal
images are also used in defect detection. However, image processing and thermal image can only solve the
classification problem. For these methods, the defects in the images are obvious, and defects can only be identified and
cannot be located correctly. Most of the traditional image processing algorithms have the shortcomings that only simple
background and large object images can be processed effectively. So the neural network based methods are been
studied by some researchers. Then an activation layer embedded convolutional neural network was used to detect
defects. Also combined image processing with deep learning and proposed a method in which image enhancement is
implemented prior to using convolutional networks; accuracy was improved. Although the above algorithms are
feasible, there are some disadvantages; some have slow recognition speeds and others have low recognition precision.
Faster R-CNN is the most commonly used algorithm in fabric defect detection. Faster R-CNN, and its improvements,
have been adopted by many researchers to increase the efficiency of detecting small targets. In general, the following
are reasons for using Faster R-CNN. First, fabric defects have their own remarkable features compared to common
defects. Among all kinds of fabric defects, there are some that account for a relatively large proportion in the images,
such as WEFTS, WARPS, STAINS, FLOATS and CRACKYWEFTS, which is usually a very large spot, or the spot
has the same width as the image. Other defects have small shapes (perhaps only a few pixels), such as NEPS, HOLE,
SNAGS and KNOTS. Second, detection and recognition are relatively simple for large defects. However, detecting
defects is very difficult for small targets, especially holes with only a few pixels, because the uneven number of positive
and negative samples makes it difficult for a one-stage network to learn the features of small targets. Although this
problem can also exist in a two-stage network, a large number of negative samples has a small impact on detection
because the region proposal network (RPN) eliminates many negative samples. To solve the imbalance of the number
of positive and negative samples in a one-stage network, We also proposed the focal loss method, which can reduce the
weight of large sample losses and increases the weight of small samples in total loss. However, focal loss is not
effective in practical applications, and evenly reduces MAP (mean average precision). Therefore, the precision of a
two-stage network is generally higher than its one-stage network counterpart. However, a two-stage network
represented by Faster R-CNN is generally as lower than the others. Therefore, the two-stage network is not adopted in
this paper. As one of the typical first-order algorithms, YOLO has been improved over many generations. YOLO
algorithms have developed rapidly, including YOLOv1 with various limiting accuracy problems, which was further
improved in YOLOv2 and YOLOv3. Compared with YOLOv1, YOLOv2, YOLOv3 and YOLOv4, YOLOv5 has better
performance and uses tricks to improve the accuracy. For example, mosaic data augmentation, MISH activation
function, K-mean clustering algorithm, FPN-net, PAN-net, SPP-net and CSPdarknet53 are adopted as backbones. In
addition, ordinary researchers can use a 1080Ti GPU to train a YOLOv45 model, which is beneficial to many scholars
and is convenient for industry applications. Factories do not need to spend a large amount of time buying expensive
hardware. Compared with the second- order algorithms, one-order algorithms represented by YOLO can meet the
requirement for real-time detection. For the original YOLOv5, if 416 × 416 images are used as the input of the
backbone, the generated sizes of the feature maps are (52,52,256), (26,26,512) and (13,13,1024) [33], and will revert to
the original size in the final prediction. The bottom feature map of the backbone of the original YOLOv5 is (13,13),
which passes the SPP structure after three convolutions. The original SPP structure of YOLOv5 is different from
SPP-net, which has only three maximum pooling branches, and the results are converted to a one-
dimensional vector, which then carries out full connecting classification. The SPP structure in the original
YOLOv5 uses four branches. In the final output, the results of the four channels are superimposed, and the
final number of channels is quadrupled. After three convolutions, the number of channels is reduced and
then output to the FPN structure. The original SPP uses Maxpool that maxs pooling for each part, and solves
the problem that the size of images inputted into CNN should be fixed. The SPP structure can enlarge the
receptive field effectively, and the context features can be obtained more comprehensively by combining a
pooling layer with different kernel sizes. The SPP structure has always been an excellent solution for
classification and detection problems before the CNN appeared in. The pooling layer is the key component of
the CNN network, because the parameters required by the network are greatly reduced, which can increase
the receptive field of subsequent convolutions. Most frameworks adopt Max Pooling or AVG Pooling
(average pooling). For example, the SPP structure adopts three max pooling filters with different kernel
Copyright to IJARSCT DOI: 10.48175/IJARSCT-9833 17
www.ijarsct.co.in
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
Impact Factor: 7.301 Volume 3, Issue 4, May 2023
sizes, but max pooling will cause some problems when selecting the maximum value from a specific range
(such as 3 × 3). Although max pooling can reduce the number of parameters, a large amount of information
will be lost in the selection process. In addition, you do not know whether the information of the
background or the target is lost because it only selects the point with the most obvious features as the
representative of the neighborhood. If the background is similar to the target, it is easy to lose useful
information. In the detection of fabric defects, as the defects are very similar to the background, the use of
max pooling in SPP will affect the detection performance and has the risk of losing important features. In
contrast, although AVG pooling takes into account all the features of the neighborhood and retains more
background information, the target feature intensity of the region will be reduced, and the obvious features
will be ignored after the average is taken.
CNN
Convolutional Neural Network is a specialized neural network designed for working with image datasets. It consists of
convolutional layers where filters are applied to the input image. It improves the input’s unnoticed features. The
convolutional Neural Network analyses the paragraph it receives as input before categorizing them. It accepts input
images and returns a class. The image is compared with each class and the probabilities of each class are returned. In
CNN, the dot product of input image and kernel function is performed which in-turn decrease the size of the matrix
resulting in loss of some features. Here padding is used to avoid feature loss/reduction. Convolutional, pooling, and
fully-connected (FC) layers are the three basic types of layers that make up this neural network. With each additional
layer, the CNN becomes more complex and obscures more of the image. There can be multiple convolutional layers
and pooling layers, but fully- connected is the final layer.
FN:
AI anomalies can be handled with the proper categorization strategy. To eliminate false negatives in a targeted manner,
the efficient method employs a cascade of models. While the second layer simply searches for negatives and any
concealed positives in them, the first layer searches for both positive and negative classes. The following is a brief
overview of the steps in the classification approach:
Initiate, transform and model these are three steps involved
Initiate:
Filter the principal classifier's output to just keep the negatives, or valid, typical observations. This process
permits the reduction of some of the dataset's variation, which could result in simpler models and better learners.
Create a fresh target using the old labels. Negatives suggest the original genuine negatives in this situation, while
positives imply the original false negatives.
Since the original dataset is probably quite unbalanced, use appropriate sampling strategies to obtain balanced datasets.
Due to the nature of the input dataset, which is a dataset produced by a classifier, the fraction of positive cases that the
following method must learn (i.e., the first false negatives) will be quite small in comparison to the negatives (i.e. the
original true negatives). To make sure the algorithm can learn successfully, this step is necessary.
Transform:
Transform the feature set nonlinearly. The examples from the original dataset that were most challenging to classify are
those that were positives labelled in the previous stage. Given this situation, a non-linear transformation can be carried
out to perhaps provide a better class separation in the ensuing procedure. Techniques for dimensional reduction can also
be used to make the final model simpler. In order to avoid further complicating the flow, this enables the construction of
simpler models.
To find the positives in the balanced dataset, use a secondary classifier (i.e. the original false negatives). To guarantee
that models work as expected, regularly use model validation approaches. For classification and picture preprocessing,
CNN is employed. The obtained photos are analyzed to reveal the fabric type and enable flaw detection. Then, taking into
account all possibilities, YOLO is utilized to anticipate the detection of the defects on the cloth. In order to test different
types of picture datasets, it is also used to train the model using a specific dataset. FN aids in providing the model’s
output and aids in doing appropriate analysis
IV. APPLICATIONS
Fabric Industries
Quality Control
Fashion Industry
Fabric error prevention
REFERENCES
[1]. https://www.researchgate.net/publication/3159627 90_A_Review_Paper_on_Textile_Fiber_Identific
tionSoumi Mitra,Asoke Nath “Mind-Reading Computers: Towards A New Horizon in Medical
[2]. Science” vol-7, Issued-1, Jan 2019
[3]. https://ieeexplore.ieee.org/document/9446116
[4]. https://ieeexplore.ieee.org/document/5423017/similar#sim ilar
[5]. https://ieeexplore.ieee.org/document/9206901/authors#aut hors
[6]. https://github.com/PrimeshShamilka/fabric_defect_dete ctor
[7]. https://www.intouch-quality.com/blog/5-commonfabric- defects-prevent
[8]. https://www.hindawi.com/journals/jece/2014/240 217/
[9]. Python Machine Learning By Raschka Sebastian
[10]. Statistics For machine Learning By Dangeti Pratap, published in July 2017.
Copyright to IJARSCT DOI: 10.48175/IJARSCT-9833 19
www.ijarsct.co.in
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
Impact Factor: 7.301 Volume 3, Issue 4, May 2023
[11]. Python Deep Learning By Author Valentino Zocoa, Author Gianmario Spacagna, Daniel Slater, Peter Reolants,
April 2017.
[12]. Gupta, V. K., Kumar, A., & Shukla, M. (2019). Fabric defect detection using machine learning: A review.
Journal of Intelligent Manufacturing, 30(1), 101-117.
[13]. Huang, Y., Zhou, F., Zhao, Y., & Li, L. (2021). A fabric defect detection method based on YOLOv5 and
improved Faster R-CNN. Journal of Physics: Conference Series, 1873(1), 012018.
[14]. Liu, F., Zhang, D., Guo, S., & Wu, H. (2021). Fabric texture recognition using deep convolutional neural
networks. Neural Computing and Applications, 33(5), 1825-1838.
[15]. Mandal, R., & Ghosh, S. (2021). Fabric defect detection and classification using machine learning techniques:
A review. Journal of Textile Institute, 112(3), 338-353.
[16]. Ranjan, R., & Kumar, A. (2021). Fabric defect detection using deep learning: A comprehensive review.
Measurement, 169, 108330.
[17]. Wang, J., Yang, L., Wang, Z., & Sun, Q. (2020). Fabric defect detection based on a deep convolutional neural
network. IEEE Access, 8, 83137-83148.
IJARSCT
International Standard
Serial Number
Crossref 7.301
Certificate No: 052023-A815 DOI: 10.48175/IJARSCT-9833
www.doi.org
www.ijarsct.co.in Editor-in-Chief
www.crossref.org www.sjifactor.com
International Journal of Advanced Research in
Science, Communication and Technology
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
IJARSCT
International Standard
Serial Number
Crossref 7.301
Certificate No: 052023-A816 DOI: 10.48175/IJARSCT-9833
www.doi.org
www.ijarsct.co.in Editor-in-Chief
www.crossref.org www.sjifactor.com
International Journal of Advanced Research in
Science, Communication and Technology
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
IJARSCT
International Standard
Serial Number
Crossref 7.301
Certificate No: 052023-A817 DOI: 10.48175/IJARSCT-9833
www.doi.org
www.ijarsct.co.in Editor-in-Chief
www.crossref.org www.sjifactor.com
International Journal of Advanced Research in
Science, Communication and Technology
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
IJARSCT
International Standard
Serial Number
Crossref 7.301
Certificate No: 052023-A818 DOI: 10.48175/IJARSCT-9833
www.doi.org
www.ijarsct.co.in Editor-in-Chief
www.crossref.org www.sjifactor.com
International Journal of Advanced Research in
Science, Communication and Technology
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
IJARSCT
International Standard
Serial Number
Crossref 7.301
Certificate No: 052023-A819 DOI: 10.48175/IJARSCT-9833
www.doi.org
www.ijarsct.co.in Editor-in-Chief
www.crossref.org www.sjifactor.com
ZEAL EDUCATION SOCIETY’S
ZEAL COLLEGE OF ENGINEERING AND RESEARCH
NARHE │PUNE -41 │ INDIA
PEO 1 Learners will be able to analyze problems from a computational viewpoint, propose
algorithmic solutions, and implement them correctly and efficiently.
Learners will be able to function as a responsible member of society with the willingness
PEO 3
to mentor fellow employees and an understanding of the ethical and economic impact of
their work in a global context.
To improve their knowledge and skills through lifelong learning and graduate studies
PEO 4
for adapting to rapidly changing work environment and succeed in their careers and/or
obtain advanced degrees.