# Classification of Material Type from Optical Coherence Tomography Images Using Deep Learning

Authors: Metin Sabuncu; Hakan Ozdemir
Journal: International Journal of Optics
 (2021)

---

## Abstract

Classification of material type is crucial in the recycling industry since good quality recycling depends on the successful sorting of various materials. In textiles, the most commonly used fiber material types are wool, cotton, and polyester. When recycling fabrics, it is critical to identify and sort various fiber types quickly and correctly. The standard method of determining fabric fiber material type is the burn test followed by a microscopic examination. This traditional method is destructive, tedious, and slow since it involves cutting, burning, and examining the yarn of the fabric. We demonstrate that the identification procedure can be done nondestructively using optical coherence tomography (OCT) and deep learning. The OCT image scans of fabrics that are composed of different fiber material types such as wool, cotton, and polyester are used to train a deep neural network. We present the results of the created deep learning models’ capability to classify fabric fiber material types. We conclude that fiber material types can be identified nondestructively with high precision and recall by OCT imaging and deep learning. Because classification of material type can be performed by OCT and deep learning, this novel technique can be employed in recycling plants in sorting wool, cotton, and polyester fabrics automatically.


---

## Body

## 1. Introduction

To know the fiber content of a fabric is essential because fiber content directly determines the performance, usage, and care of the fabric [1–3]. Due to their properties, cotton, wool, and polyester are the most widely used fibers in the textile industry [4]. Cotton is a natural plant-based fiber that is strong, absorbent, comfortable, and versatile [5]. It can shrink easily unless treated and is prone to wrinkling [6]. Wool is a natural animal-based fiber that is wrinkle resistant and possesses good insulation properties [7]. Wool is therefore a natural choice when making sweaters, socks, sportswear, dresses, and blankets [8]. Polyester is a synthetic man-made fiber type [9]. It is strong and elastic and collects static electricity [10]. Polyester has excellent wash and wear performance.Traditionally, in order to determine the fiber content of a fabric, one performs a variety of different tests such as the burning test followed by inspecting the longitudinal and cross section of the fiber and a qualitative chemical analysis [11]. These methods are tedious, time consuming, and destructive and cannot be easily automated [12]. Newer methods use spectroscopy [13, 14], machine vision [15, 16], FTIR reflectance [17, 18], texture feature extraction [19], and computer-based algorithms for fiber identification. Especially in large-scale fabric separation and sorting, it is necessary to have a rapid, dependable, and automated method that classifies fiber content accurately [20]. The weaving and textile recycling industries require automated and reliable methods that can sort various fabric types efficiently [21].In this study, we address the task of determining the fiber content of fabrics from a photonic perspective and present a novel technique. We, namely, make use of optical coherence tomography (OCT) imaging modality combined with deep learning. The OCT system employs an infrared light beam to obtain photonic depth images of the fabric in a contactless and nondestructive manner [22]. Because of its unique properties, OCT has been successfully applied to a variety of problems encountered in many different industries. OCT is suitable to use in inspection systems since it allows taking sensitive and high-resolution scans in a contactless and nondestructive fashion [23]. For example, OCT can be used to inspect defects on LCDs [24] and measure coating thicknesses on printed circuit boards [25]. In the textile industry, OCT was used to automatically classify weave patterns of fabrics [26–28]. Very recently, OCT was applied to the contactless measurement of fabric thickness [29]. Deep learning, as a novel method, has also been recently utilized in the automation and textile industry, especially in material [30] and fabric pattern recognition tasks [31–33]. Some possible applications of AI are discussed in detail in [34].In this study, we utilized the photonic imaging modality of OCT, combined with automated deep learning, in order to determine the fiber content of woven fabric. The idea behind automated deep learning is letting a neural network design another neural network via neural architecture search [35]. Normally, it is very time consuming and tedious to design and choose the most suitable deep learning architecture. Reinforcement learning algorithms can make this process much quicker and smoother by enabling neural architecture search, hence automating machine learning. In this article, automated deep learning models were created that successfully identified fiber material types from OCT images. Our work involved taking OCT scans over fabrics composed solely of cotton, wool, and polyester. These scans were fed into a neural architecture search framework in order to accomplish fiber type identification from OCT images with automated deep learning.


## 2. Materials and Methods

The experimental setup is schematically illustrated in Figure1. A laser diode with central wavelength at 930 nm generates broadband photons that allow for speckle-free imaging [36, 37]. The fabric samples to be measured are placed in the sample arm. The photons reflect from the sample surface and interfere in the fiber coupler with the beam coming from the reference arm. The one-dimensional OCT-A scan of the sample fabrics can be obtained by applying a Fourier transform to the signal falling onto the CCD camera. The two-dimensional OCT-B scans are obtained by scanning the light beam over the surface of the sample and adding corresponding OCT-A images sequentially. In this study, all OCT scans correspond to the OCT-B images of the fabric samples [27]. Before the OCT scans are performed, the burn test and microscopic viewing initially determined the fiber contents of the fabrics. The fabrics that consisted of only wool, cotton, or polyester were kept. For each fiber type, 3 different fabrics were arranged giving a total number of 9 separate samples. Each sample was put into the sample arm and measured by the OCT modality individually. In order to have a successful training, the deep learning algorithm requires at least 100 images per class. We therefore took between 120 and 200 OCT scans per fabric. To have roughly uniform data across samples, the scans were fixed at 2 mm for each image and recorded in a portable network graphics format [38, 39]. The OCT scans are raw OCT-B images saved through the image capture software program, and no extra image processing or filtering was performed.Figure 1
Diagram of the experimental setup. A broadband light source is coupled with a fiber and sent to the setup that, with the use of an optical grating and CCD, takes the spectral domain OCT scans. The material is placed in the sample arm. The OCT scans of fabric samples are recorded on the computer.The fabric data were separated into three categories. Groups 1, 2, and 3 consisted of fabrics made out of only cotton, wool, and polyester, respectively. These were placed in folders that became the labeled dataset for the classes in the deep learning training. In order to initiate the training, the dataset was uploaded onto the Cloud platform [35]. All the data are uploaded with this article and can be downloaded from the data repository [40].The flow of the procedure for the automated deep learning application for fiber type identification is given in Figure2. A commercial application programming interface is used to create and train the high-quality automated deep learning model via transfer learning [41]. To perform the classification task, the program automatically matches the generic neural network architecture to a given imaging dataset. The network performance is then optimized, and the final algorithm is generated. Separate portions of the labeled OCT fabric scans are allocated to train and validate the deep learning architecture. The program Vision AutoML runs on cloud and works by using reinforcement learning (RL) and a recurrent neural network (RNN) that specifies the hyperparameters for a model. At the initial step, the RNN will propose a random set of hyperparameter specifications such as layer count, receptive fields, and nodes per layer. The model accuracy is monitored and utilized as a reward/punishment signal for the RL algorithm that in return renews the RNN parameters. This procedure optimizes the model by rewarding models with high accuracy and punishing those with less accuracy. The theoretical details of how the algorithm works are given in [42].Figure 2
Schematics of the automated deep learning procedure. The trained model classifies fabrics made from cotton, polyester, and wool fibers.Additionally, as shown in Figure2, different independent scans are used to test the deep learning algorithm and analyze results to quantify the performance objectively. In the actual experiment, 147 images were separated by the algorithm randomly and used for the test runs, from which the recall, precision, and confusion matrixes are calculated. Through the Vision AutoML API program, we created two models, one that worked on the cloud and one model that operated on mobile devices. The training times for the cloud and mobile device model were 6 and 0.78 node hours, respectively. The created trained models then can be downloaded from the cloud server.


## 3. Results and Discussion

The automated deep learning models were analyzed by objective metrics used commonly by the artificial intelligence community. Precision, recall, and the confusion matrix of the algorithms were reported since the task investigated in this work fell in the category of classification in machine learning. Precision denotes the fraction of relevant instances among the retrieved instances, meaning that a machine learning model has a precision of 100% if there are no false positives. The recall is calculated from the fraction of the total amount of relevant instances that were actually recovered. In other words, a model has 100% recall if it does not have any false negatives. In order to give the insight into the errors made by the deep learning classifier, we present the confusion matrices. Moreover, we also give the OCT scans corresponding to the false negative and false positive outcomes. Both models had a threshold of 0.5 applied. The first model that was deployed as a cloud-based model had the confusion matrix given in Figure3(a). The precision and the recall were both 98.64% indicating that the model could classify fabric fiber material type from OCT scans successively. The model generated for mobile device operation had a 100% precision and 98.64% recall. The confusion matrix for this model is given in Figure 3(b).Figure 3
Confusion matrix for the deep learning model deployed for the (a) cloud and (b) mobile device.
(a)(b)The results show that the automated deep learning models, after trained with labeled OCT scans corresponding to fabrics woven with wool, cotton, and polyester fibers, can later classify material types successfully with high precision and recall.In Figure4, we give the OCT scans corresponding to the false positive and negative results. One can notice that the height of the OCT scan on the right is not optimized, resulting in the saturation in the image, which could have been a reason why the model did not provide the correct outcome for this specific input. This indicates that using high-quality OCT images for the deep learning training and the test plays a decisive role in the quality of the material classification.Figure 4
The false positive (left OCT scan): the deep learning model incorrectly predicted polyester; false negative results (OCT scan on the right): the model should have predicted polyester.


## 4. Conclusions

In this article, we have successfully demonstrated that the fiber type of a fabric can be identified through OCT imaging and deep learning. Fabrics that were composed of wool, cotton, and polyester fibers were scanned with an OCT device. These scans were used to train automated deep learning models. We demonstrated that the material classification procedure can be done nondestructively using optical coherence tomography (OCT) and deep learning. We presented the recall, precision, and confusion matrixes of the created deep learning models. Based on these results, we conclude that fiber material classification can be achieved nondestructively with high accuracy by OCT imaging and deep learning. Deep-learning-based models can be employed in recycling plants in sorting wool, cotton, and polyester fibers automatically, making manufacturing more sustainable [43]. All the data collected and used in these experiments were uploaded on a data repository. These data can be used to train deep learning networks, test existing machine learning algorithms, or help develop new deep learning systems for automated material classification. With advances in technology, we foresee that optical imaging-based methods combined with artificial intelligence will be used more frequently in the textile industry [44, 45].



---

*Source: 2520679-2021-10-20.xml*