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

,


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][2][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]. ese 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]. e 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. e 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][27][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][32][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. e 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. ese scans were fed into a neural architecture search framework in order to accomplish fiber type identification from OCT images with automated deep learning.

Materials and Methods
e experimental setup is schematically illustrated in Figure 1. A laser diode with central wavelength at 930 nm generates broadband photons that allow for speckle-free imaging [36,37]. e fabric samples to be measured are placed in the sample arm. e photons reflect from the sample surface and interfere in the fiber coupler with the beam coming from the reference arm. e 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. e 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 OCTscans are performed, the burn test and microscopic viewing initially determined the fiber contents of the fabrics. e 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]. e OCT scans are raw OCT-B images saved through the image capture software program, and no extra image processing or filtering was performed. e fabric data were separated into three categories. Groups 1, 2, and 3 consisted of fabrics made out of only cotton, wool, and polyester, respectively. ese 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]. e flow of the procedure for the automated deep learning application for fiber type identification is given in Figure 2. 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. e 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. e 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. e model accuracy is monitored and utilized as a reward/ punishment signal for the RL algorithm that in return renews the RNN parameters.
is procedure optimizes the model by rewarding models with high accuracy and punishing those with less accuracy. e theoretical details of how the algorithm works are given in [42].
Additionally, as shown in Figure 2, 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. rough the Vision AutoML API program, we created two models, one that worked on the cloud and one model that operated on mobile devices. e training times for the cloud and mobile device model were 6 and 0.78 node hours, respectively. e created trained models then can be downloaded from the cloud server.

Results and Discussion
e 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. e 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. e first model that was deployed as a cloud-based model had the confusion matrix given in Figure 3(a). e precision and the recall were both 98.64% indicating that the model could classify fabric fiber material type from OCT scans successively. e model generated for mobile device operation had a 100% precision and 98.64% recall. e confusion matrix for this model is given in Figure 3 e 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 Figure 4, 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.
is 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.

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.
ese 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. ese 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].
Data Availability e raw image data used to support the findings of this study have been deposited in the figshare repository: OCT image data of cotton-, polyester-, and wool-based fabrics to train and test deep learning algorithms for automated material classification (https://doi.org/10.6084/m9.figshare. 16732591.v1).