Next Article in Journal
Design and Analysis of a Hand-Held Surgical Forceps with a Force-Holding Function
Previous Article in Journal
Research of a 0.14 THz Dual-Cavity Parallel Structure Extended Interaction Oscillator
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Application of Hyperspectral Imaging and Multi-Module Joint Hierarchical Residual Network in Seed Cotton Foreign Fiber Recognition

1
School of Mechanical and Automotive Engineering, Liaocheng University, Liaocheng 252000, China
2
Institute of Information Science and Technology, Hunan Normal University, Changsha 410081, China
*
Author to whom correspondence should be addressed.
Sensors 2024, 24(18), 5892; https://doi.org/10.3390/s24185892
Submission received: 24 July 2024 / Revised: 3 September 2024 / Accepted: 7 September 2024 / Published: 11 September 2024
(This article belongs to the Topic Hyperspectral Imaging and Signal Processing)

Abstract

:
Due to the difficulty in distinguishing transparent and white foreign fibers from seed cotton in RGB images and in order to improve the recognition ability of deep learning (DL) algorithms for white, transparent, and multi-class mixed foreign fibers with different sizes in seed cotton, this paper proposes a method of combining hyperspectral imaging technology with a multi-module joint hierarchical residue network (MJHResNet). Firstly, a series of preprocessing methods are performed on the hyperspectral image (HSI) to reduce the interference of noise. Secondly, a double-hierarchical residual (DHR) structure is designed, which can not only obtain multi-scale information, but also avoid gradient vanishing to some extent. After that, a squeeze-and-excitation network (SENet) is integrated to reduce redundant information, improve the expression of model features, and improve the accuracy of foreign fiber identification in seed cotton. Finally, by analyzing the experimental results with advanced classifiers, this method has significant advantages. The average accuracy is 98.71% and the overall accuracy is 99.28%. This method has great potential for application in the field of foreign fiber identification in seed cotton.

1. Introduction

As one of the best textile raw materials, cotton plays an important role in the textile industry and in the lives of people [1,2]. In recent years, due to the shrinking of cotton planting land in central and eastern China, the area of cotton planting in China has been gradually reduced, from 57 million mu in 2015 to 45 million mu in 2022, a decrease of about 21%. Ranging from 5.9 million tons in 2015 to 5.97 million tons in 2022, the annual output also fluctuated in this interval, albeit maintaining a relatively stable state. The stability of production benefits from the progress of science and technology and advanced management policies [3]. However, up to now, the yield of high-quality cotton in China has still been at a low level, which directly affects economic benefits and influence in the international market [4]. The production of high-quality cotton is a major problem in China’s cotton industry. The climate in Xinjiang is dry, the temperature difference between day and night is large, and water evaporation is fast. It is generally planted with colorless transparent plastic film and black plastic film. On the one hand, it can accumulate the temperature of soil and cultivated land, while on the other hand, it can effectively reduce the evaporation of surface water and improve the survival rate of cotton [5,6]. However, colorless transparent film and black film is mixed into seed cotton in the picking stage, which becomes a key factor affecting the quality of cotton. In the process of collecting bags and processing, white label paper scraps, various color plastic strapping ropes, and transparent foam boards may be mixed into them, which also becomes a factor affecting the quality of cotton. Because the impurities are mostly transparent and white, it is difficult to distinguish them from seed cotton by the naked eye, and naked eye recognition of many kinds of impurities is very time-consuming and laborious. Therefore, a method is needed to identify colorless transparent films, plastic strapping ropes, white paper scraps, foam boards and black films in seed cotton well and conveniently, so as to improve the quality of seed cotton [7].
At present, color image recognition technology has achieved good results in the field of target recognition and classification [8,9,10,11]. However, when recognizing targets with similar colors, the recognition results are unsatisfactory. This is mainly because the color information of the captured images is close, and the deep learning (DL) training model cannot learn features and distinguish well based on the input color information. Hyperspectral imaging technology can solve the problems faced by color image recognition technology. By dividing the spectral wavelength into many bands, according to the different reflectance characteristics of each material in the same or similar bands, the hyperspectral imaging system measures each continuous band to obtain the spectral information of the object in each band, so that different materials can be distinguished [12,13,14,15].
Hyperspectral images often have rich bands, and there is information redundancy between a large number of bands, which not only increases hardware pressure but also suppresses the learning ability of the model. Numerous studies have shown that dimensionality reduction in hyperspectral images can effectively improve accuracy. Zhang et al. [16] proposed a novel unsupervised BS method based on a band correlation analysis (BCA), which can accurately identify bands with a high information content and low redundancy through iteration and correlation calculation, effectively improving the recognition rate of hyperspectral images. Ou et al. [17] proposed a band selection method based on a multi-objective cuckoo search algorithm (MOCS), which improves the focus on overall features, balances the search ability between global exploration and local exploitation, and enhances the interaction ability between individuals. It has been verified that this method has better robustness. Kang et al. [18] proposed a dimensionality reduction method combining principal component analysis and edge-preserving features, which can highlight pixel separability. Experimental verification shows that this method greatly improves the accuracy of the classifier.
With the advancement of image classification and recognition technology [19,20,21,22], a large number of scholars from different fields are gradually combining hyperspectral imaging technology with DL models to extract more feature information on the measured object, effectively improving the recognition rate of targets that are difficult to distinguish with the naked eye. Ni et al. [23] proposed an online detection method for identifying cotton mulch in hyperspectral images (HSIs) by combining a variable weighted stacked autoencoder (VW-SAE), artificial neural network (ANN), and extreme learning machine. Firstly, VW-SAE was used to extract the HSI features, then ANN was used to optimize the VW-SAE parameters, and finally, an extreme learning machine was used for classification. The overall recognition accuracy of this method was 95.58%, and after morphological processing, it can achieve accurate recognition of mulch. However, this method has lower recognition of mulch in the background and requires more computing resources, requiring high equipment requirements. Du et al. [24] proposed a method combining near-infrared spectroscopy and a convolutional neural network (CNN) and temporal convolutional network to identify foreign fibers in cotton. The original data were pre-smoothed and a feature wavelength extraction was performed, with a recognition accuracy of up to 99%. This is a promising classification algorithm. Xue et al. [25] proposed a dual-branch hierarchical residual network (Hierarchical ResNet) with an attention mechanism by improving the Hierarchical ResNet, which separates spectral and spatial dimensions for calculation purposes. This method has shown significant advantages in remote sensing land feature recognition. Collins et al. [26] used hyperspectral imaging technology combined with a three-dimensional convolutional neural network (3D-CNN) to automatically identify colon cancer and esophageal gastric cancer. The recognition accuracy of this study is as high as 93%, which provides a good technical examination method for the discovery and treatment of early cancer. Huang et al. [27] proposed a 1D CNN combined with HSIs to identify and classify textile fibers. The recognition accuracy of this study is as high as 98.6%, which provides a good technical means for archaeology, public security, and other industries. Liu et al. [28] used a 2D-CNN to identify and separate the plastic film in seed cotton, achieving an accuracy of 98.5%. Hong et al. [29] proposed a SpectralFormer model specifically designed for remote sensing, which has strong global information capture capabilities. By designing CAF and GSE blocks, the extraction of local information is improved, but the acquisition of local information is still inferior to CNN. Zhu et al. [30] designed a degradation indicator species CNN combined with HSIs to identify grassland grass species. The overall recognition accuracy of grassland species reached 98.78%, which provided a technical reference for grassland degradation monitoring and small target classification and recognition. However, there are also some defects in this study; for example, the large amount of calculations, low efficiency, excess of limited conditions in the experimental environment, and the generalization and robustness of the model need to be considered.
With the advancement of DL technology and the shortcomings of traditional classifier algorithms such as high data dependence, weak multi-classification recognition for large datasets, and poor robustness, more and more DL algorithms are gradually replacing traditional classifiers in the hyperspectral field, bringing recognition accuracy to a new level. In recent years, DL models have gradually developed towards hierarchical structures, achieving multi-layer feature extraction and effectively improving efficiency and accuracy [31,32].
Due to the weak robustness of the support vector machine (SVM) [33], ordinary CNNs lack the ability to extract multi-scale information. In order to solve the poor recognition of transparent and white impurities in cotton by color image recognition, as well as improve the recognition ability of multi-class mixed foreign fibers with different sizes in seed cotton, this paper proposes a seed cotton foreign fiber recognition method combining hyperspectral imaging technology and a multi-module joint hierarchical residual network (MJHResNet) DL algorithm. Compared with the Hierarchical ResNet structure [25], this structure has the following innovations:
(1) The channel number bisection processing of the input information of the Hierarchical ResNet is cancelled to avoid the negative impact of data randomness on the recognition results.
(2) The hierarchical structure has more parallel branches. The aim is to obtain and fuse richer scale information.
(3) Constructing a double-hierarchical residual (DHR) structure block intended to obtain and integrate richer scale information while solving the problem of gradient vanishing in layered residual structures with too many branches, resulting in the inability to obtain the maximum receptive field.
(4) The DHR module integrates a squeeze-and-excitation network (SENet) attention mechanism with the aim of reducing redundant information transmission and adaptively enhancing the model expression ability.
The method is compared with SVM, ResNet-18, 2D-CNN, Fast3D-CNN, SpectralFormer, and Hierarchical ResNet algorithms. It is concluded that the method proposed in this paper has certain advantages in terms of recognition accuracy. This method has the ability to extract multi-scale information, which can extract both global and local information and has certain application potentials in cotton processing factories, the textile industry, and other fields, which can effectively improve the quality of seed cotton, economic benefits, and influence in the cotton market. Based on its structural characteristics and the ability to extract information from small and large targets, it can also be applied in fields such as remote sensing and medicine.

2. Materials and Methods

2.1. Experimental Materials and Equipment

In this experiment, 5 kg of high-quality Xinjiang cotton, transparent films of different shapes and sizes, white paper scraps, multicolored plastic strapping ropes, white foam boards, black films, and other impurities were selected, and one or more impurities were randomly placed on the seed cotton. For the experiment, we used a hyperspectral camera (GaiaField Pro-V10E, Dualix Spectral Imaging Technology Ltd., Wuxi, Jiangsu, China) with a wavelength range of 400–1000 nm, a total of 328 bands, an exposure time of 30 ms, a frame rate of 14 frames per second, and a resolution of 2.8 nm. The experimental shooting environment was in the laboratory dark box, which can better reduce the interference of external light to improve the imaging quality. Four 50 W halogen lamps and a platform tray (the tray was 500 mm away from the hyperspectral camera objective) were used in the dark box. The experimental computer used a 12×Intel® Xeon® Gold 5318Y processor, 350 G hard drive, 86 G memory, NVIDIA A40 graphics card, 48 G graphics memory, python3.9, pytorch2.1.1 DL architecture, and win11 operating system.

2.2. Experiment Workflow

This study was based on hyperspectral imaging and a multi-module joint hierarchical residual network to conduct research on the recognition algorithm of seed cotton foreign fibers. For the experiment, the process shown in Figure 1 was adopted. First, the collected images of seed cotton and transparent films, white paper scraps, black films, multicolored plastic strapping ropes, white foam boards, and other mixed images were preprocessed, including black-and-white correction, image cutting and label making, standardization processing, multiple scattering correction (MSC) processing, and principal component analysis (PCA) processing in sequence. After that, the preprocessed image was sliced to form a large number of small-size images of the same size and a data set was constructed for DL model training. The models included SVM, ResNet-18, 2D-CNN, Fast3D-CNN, Hierarchical ResNet, SpectralFormer, and MJHResNet, and then the average accuracy (AA), overall accuracy (OA), and recall and precision were evaluated to compare the performance of the models. Finally, in order to find the best parameters of the MJHResNet model proposed in this paper, 18 sets of experiments were carried out, and the best parameter values were obtained by comparing the AA and OA of the experimental results.

2.3. Preprocessing

Preprocessing is an important part of improving the accuracy of image classification and recognition. This process can remove most of the interference information, improve the quality of HSIs, and help simplify the complexity of spectral feature learning for subsequent models [34,35,36]. The preprocessing process conducted in this study was as follows.
Step 1: Black-and-white correction.
In the absence of light, the image sensor of the hyperspectral camera will also produce a small amount of electrical signal, mainly because the photodiode will release the charge, and the photodiode of each pixel acts as a capacitor at the same time, which will slowly discharge and form a so-called dark current. The dark current has a considerable influence on the imaging quality of the hyperspectral camera. The dark current will bring a lot of noise to the image, especially in a low-light environment and long-exposure environment, which greatly reduces the quality of the image. We used Formula (1) for the image black-and-white correction.
R = L B W B
where L represents the original image, B represents the image taken against a pure black background (covered by the camera cover), W represents the standard whiteboard image taken, and R represents the image after the black-and-white correction.
Step 2: Image cutting and label making.
The black-and-white corrected image was cut in three dimensions, which retained important and effective information, reduced the image size, and provided help for subsequent training. After that, ENVI5.3 was used to establish the region of interest for different categories of cut images, a spectral analysis was performed to select the band with the largest difference in reflectivity between the background, various impurities, and seed cotton, and label production was performed under this band. In these bands, various impurities had a good discrimination between them, whether in the gray single channel or the RGB pseudo color three channels, which mean that the labels produced in this band were more accurate.
Step 3: Standardization
Due to significant differences in some spectral data, it was not conducive to subsequent analysis. Standardization processing reduces the fluctuation of spectral data, which helps improve the convergence speed and learning ability of subsequent models, thereby enhancing the accuracy of subsequent processing and analysis. Using Formula (2) for standardized processing, this presents a normal distribution of spectral information with a mean of 0 and a standard deviation of 1.
Z = A μ σ
where Z represents the spectral data after standardized processing, A represents the input spectral data, μ represents the mean value of the input spectral data, and σ represents the standard deviation of the input spectral data.
Step 4: Multiple scattering correction
Multiple scattering correction is a data processing method mainly used to eliminate the spectral baseline shift and baseline offset caused by scattering effects. The goal of this method is to calibrate the measured spectrum to a reference spectrum, thereby reducing these irrelevant changes and improving the accuracy and reliability of the analysis. Firstly, we used Formula (3) to calculate the average spectrum of the image, then we used Formula (4) to perform a univariate linear regression calculation on the average spectrum and to calculate the baseline shift (regression constant) and baseline offset (regression coefficient) of each spectrum relative to the average spectrum, and finally we used Formula (5) to complete the dispersion correction [34].
Z ¯ = i = 1 n Z i , j n
Z i = m i Z ¯ + b i
Z i   ( M S C ) = Z i b i m i
where Z i , j represents the spatial position of the hyperspectral image sample of seed cotton foreign fiber, n represents the spectral band, Z ¯ represents the average spectral vector obtained by averaging the original spectral data of all samples at each wavelength, Z i is a 1 × n dimensional matrix, which represents the spectral vector of a single sample, b i and m i represent the baseline translation and offset of each sample obtained by the unary linear regression of the near-infrared spectrum Z i and the average spectrum Z ¯ , respectively, and Z i   ( M S C ) represents the hyperspectral image that has completed the multiple scattering correction.
Step 5: Principal component analysis.
The information between each band in hyperspectral images has a strong correlation, which can cause a large amount of redundant information, increase the storage and computing pressure of hardware devices, and increase the risk of overfitting. Dimensionality reduction techniques can solve the catastrophic problem of redundant and complex high-dimensional data. PCA and autoencoders are both technical methods for data dimensionality reduction. Compared with autoencoders, PCA has the advantages of fast calculation speed, low model complexity, and strong interpretability. It maps high-dimensional spatial features to low-dimensional space through linear transformation, which preserves as much original data as possible while reducing image dimensionality and noise, resulting in image compression to a large extent. The dimensionality reduction of hyperspectral data in this article is beneficial for subsequent data analysis and visualization processing. We centralized the input sample set D = z   ( 1 ) , z   ( 2 ) , , z   ( m ) using PCA, then calculated the covariance matrix Z Z T of the sample and performed eigenvalue decomposition. The eigenvector w 1 , w 2 , , w p corresponding to the largest p eigenvalues was taken out, and all the eigenvectors were standardized to form the eigenvector matrix W , and then each sample z   ( i ) was converted into a new sample x   ( i ) , and finally the output sample set X = x   ( 1 ) , x   ( 2 ) , , x   ( m ) was obtained (Formulas (6) and (7)). This paper specifies a principal component proportion threshold b . Then p can be obtained by Formula (8).
z   ( i ) = z   ( i ) 1 m j = 1 m z   ( j ) , ( i ,   j = 1,2 , , m )
x   ( i ) = W T z   ( i )
i = 1 p λ i i = 1 n λ i b
where z   ( i ) , z   ( j ) are n dimensional samples of the image to be processed, x   ( i ) is p dimensional samples, and W T represents the transpose of the eigenvector matrix W .

2.4. Multi-Module Joint Hierarchical Residual Network

At present, many CNNs mainly improve the information extraction ability of their models by increasing the number of network layers. As the number of network layers increases, there will inevitably be gradient disappearance and network degradation, which will lead to problems such as increased training difficulty and a sudden decrease in accuracy, thus hindering training. Additionally, due to the high-dimensional nature of HSIs, which contain a large amount of data information, extracting information becomes more cumbersome, making the degradation of network performance more apparent [25,31]. However, the identity mapping structure of residual structures [37] and the multi-branch structure of hierarchical structures [32] can effectively solve the problems of gradient disappearance and network degradation and single-scale information. Given the good performance of the Hierarchical ResNet composed of a residual structure and hierarchical structure in image recognition and classification, and in order to better extract multi-scale information from HSIs and solve the problem of identifying seed cotton foreign fibers, this paper proposes an innovative MJHResNet model. The model is shown in Figure 2. It contains a Conv0 block, a DHR structure, a SENet attention structure, a 7 × 7 average pooling layer, and a fully connected layer.

2.4.1. Double-Hierarchical Residual Structure

This MJHResNet designs a novel DHR structure, which concatenates two hierarchical residual structures of different sizes and adds branches of the hierarchical residual structure to improve the model’s ability to extract multi-scale features. However, research has found that increasing the number of branches in the hierarchical residual structure without restraint does not necessarily result in rich scale information, but rather increases the risk of gradient disappearance. So, after adding 5 branches to this structure, the other two branches are combined to form a second hierarchical residual structure, which is connected to the first hierarchical residual structure; each branch that performs convolution operations contains 6 BN-ReLU-Conv convolution blocks, as shown in the black dashed box in Figure 2. This structural design will reduce the risk of gradient disappearance, obtain richer scale information, and obtain feature maps with a larger receptive field. At the same time, the input information of each branch of the structure is no longer subjected to channel number split processing, which can easily generate data randomness. The key information may not be learned by the deep network, so full channel information is adopted, as shown in the red dashed box in Figure 2. The input information x is Conv0 to obtain x n , which is then passed into the DHR structure. After convolution operations C ( · ) and feature information cascading , a multi-scale feature map is obtained   Y . The information transformation is shown in the Formulas (9)–(13), and the detailed parameter information is shown in Table 1.
The relationship is as follows:
y i = x n C   ( x n ) C x n + y 1 C   ( x n + y 2 ) C   ( x n + y 3 )   ( i = 0 , 1 , 2 , 3 , 4 )
x p = i = 0 4 y i
y j = x p C   ( x p ) C   ( x p + y 6 )   ( j = 5 , 6 , 7 )
Y = i = 5 7 y j
where y i is the output information of each branch in the first hierarchical residual structure, and y j is the output information for each branch in the second hierarchical residual structure. x p represents the fusion information of the first hierarchical residual structure.

2.4.2. Squeeze-and-Excitation Network Attention

Due to the characteristics of hierarchical residual structures, the fused multi-scale feature maps contain a large amount of redundant information, which can affect the learning ability of the model [38]. SENet [39] can adaptively learn the importance of different feature channels, reducing the weight of invalid or unimportant feature maps, thereby reducing information redundancy and enhancing the model’s expression ability. The principle is to sequentially use F t r conversion, Squeeze, Excitation, and Fscale, as shown in Figure 3.
F t r conversion converts input Y to output U through a convolution operation, as shown in Formula (13).
U C = V C × Y
where V C represents the C-th convolutional kernel, U C represents the C-th input of U , and C represents the number of channels.
Squeeze is a global average pooling process that converts the input of H × W × C into an output of 1 × 1 × C, obtaining the global information of the input information U , as shown in Formula (14) [39].
z C = F s q   ( U C ) = 1 W × H i = 1 W j = 1 H U C   ( i , j )
where W represents the width of feature map U , H represents height, and U C   ( i , j ) represents the point in U C where the width is i , height is j , and z C represents the output 1 × 1 × C.
Excitation is a two-time full connection process. The first full connection is used for dimensionality reduction, and then the nonlinear transformation is performed by the ReLU activation function. The second full connection is restored to the original dimension, and is mapped to 0 and 1 by the sigmoid activation function to obtain the weight of each channel [36], as shown in Formula (15).
s = F e x z , W = σ g z , W = σ ( W 2 δ W 1 z )
where W 1 represents the dimension reduction parameter, z represents the sum of z C , W 2 represents the dimension-up parameter. δ represents ReLU, σ represents sigmoid, and s represents the weight of the output; the size is 1 × 1 × C.
The Fscale operation multiplies the obtained weight s with the original feature map U to complete the recalibration of the original features on the channel dimension [39], as shown in Formula (16).
X C ~ = F s c a l e U C , s C = s C · U C
where s C represents the weight, X C ~ represents the final output, and the size is H × W × C.
The SENet module is fused with the DHR module to form the DHR–SE module. This module can not only improve the extraction ability of multi-scale information of the network, but also avoid the disappearance of gradient, reduce information redundancy, and improve the recognition rate of foreign fibers in seed cotton.

2.5. Model Evaluation Methods

To compare the performance of network models, this paper evaluates them using methods such as R e c a l l , P r e c i s i o n , O A , and A A . Recall and precision reflects the model’s ability to recognize positive and negative samples (Formulas (20) and (21)). The A A method reflects the average level of prediction by the model for each category, which is the sum of the accuracies of all the categories divided by the number of categories (Formula (18)). The O A method reflects the overall prediction level of the model, which is determined by the proportion of correctly identified samples of all the categories to the total samples of all the categories (Formula (19)). All four perspectives presented are the most important methods for evaluating the quality of the model currently.
These evaluation methods are as follows:
R e c a l l = T P T P + F P
P r e c i s i o n = T P T P + F N
A A = i = 1 C R e c a l l C   ( i = 1,2 , , C )
O A = i = 1 C T P i = 1 C   ( T P + F P ) = i = 1 C T P i = 1 C   ( T P + F N )   ( i = 1,2 , , C )  
where i represents category, C represents the total number of categories, T P   represents the number of samples that are actually positive examples and are judged as positive examples by the classifier, F P represents the number of samples that are actually negative and judged as positive by the classifier, and F N represents the number of samples that are actually positive but judged as negative by the classifier.

3. Results and Discussion

A total of 50 HSIs of seed cotton mixed with various impurities were taken in the dark box environment. The image specification was 1800 × 1538 × 328.

3.1. Preprocessing

After preprocessing, image samples can effectively improve spectral features, reduce interference information, enhance spectral information, and improve the analytical expression ability of subsequent models.

3.1.1. Image Cutting and Label Making

The black-and-white corrected image with a size of 1800 × 1538 × 328 was subjected to redundant black background cutting. The processing procedure is shown in Figure 4. After cutting, images with different spatial sizes and the same spectral size, such as 971 × 841 × 328, 1161 × 761 × 328, and 1241 × 1081 × 328, were obtained, and the cut images were labeled. After cutting, a size of 971 × 841 × 328, 1161 × 761 × 328, 1241 × 1081 × 328 and other images with different spatial dimensions and the same spectral dimension as in Figure 4 were achieved, and the cut images were labeled. There were nine label categories: seed cotton, plastic film, paper scraps, background, black film, transparent plastic rope, white plastic rope, red plastic rope, and foam board.
Regions of interest were established and spectral curves generated for each category. As shown in Figure 5, the wavelength range with the greatest difference in reflectance between various impurities and seed cotton was identified, and labels were created at wavelengths with significant differences.

3.1.2. Standardized Processing

After standardization processing, the image data had a regular distribution (Figure 6), symmetrically distributed around 0.

3.1.3. MSC Processing

Figure 7 shows the visualization of the processing for MSC. The vertical absorbance is obtained by logarithmic conversion formula log 10   ( I I 0 ) between the measured light intensity I (MSC corrected light intensity) and the reference light intensity I 0 (light intensity without absorption). It can be seen from Figure 7a that the sample data are more concentrated after MSC, which reduces the sample difference. It can be seen from Figure 7b that most of the data are concentrated near 0 after standardization and MSC. The data are simpler and more regular, which effectively eliminates the influence of scattering level difference and is conducive to the analysis and processing of sample data by later models.

3.1.4. PCA Processing

According to the analysis in Figure 8a, the variance explanatory values of the first three principal components are 97%, indicating that the first three principal components can effectively capture the variability of the original data and can be used to represent the original data. The experimental dimensions retain 4, 7, 10, 13, 16, and 19 dimensions, respectively. As shown in Figure 8b, after experimental verification, After the experimental verification shown in Figure 8b, under the same experimental conditions, the OA of each group obtained by only changing the number of retained dimensions showed that the OA varied greatly from 4 to 13 dimensions and tended to stabilize from 16 to 19 dimensions. In this study, 16 dimensions were selected as the experimental benchmark to balance accuracy and device performance, which not only retained the original information to the greatest extent but also significantly reduced the image dimension.

3.2. Ablation Experiment on Sample 1 and Sample 2

In this section, ablation experiments were carried out on sample 1 and sample 2. By increasing or decreasing the branches of the DHR structure and increasing the SENet, experiments were carried out one by one to evaluate the effectiveness of a double residual structure instead of a single residual structure and a fusion SENet module. Table 2 shows the results of the ablation experiments, and the training parameters of all the models are the same.
According to the experimental results shown in Table 2, exceeding a certain number of branches in the hierarchical residual structure does not increase the recognition accuracy, but has the opposite effect, mainly due to the gradient vanishing caused by the excessive number of convolutions used to obtain advanced features. Using a double-hierarchical residual structures instead of a single hierarchical residual structure with the same number of convolutional branches can effectively improve accuracy. The integrated SENet module is beneficial for improving recognition accuracy and enhancing the feature expression ability of the model.

3.3. Model Complexity Analysis

This section conducted a complexity analysis of deep learning models, using two metrics: parameters and FLOPs. The specific data are shown in Table 3.
According to the data shown in Table 3, MJHResNet has advantages in terms of parameter count and FLOPs compared to ResNet-18, 2D-CNN, and Fast3D CNN. However, compared to HResNet, MJHResNet has higher complexity, mainly due to having more convolutional branches and modules to obtain multi-scale information.

3.4. Optimal Parameter Experiment

In order to find the optimal parameters for MJHResNet, this study conducted 18 experiments on sample (4) by changing the size of the convolution kernels (3 × 3, 5 × 5, 7 × 7) and patch sizes (9 × 9, 11 × 11, 13 × 13, 15 × 15, 17 × 17, 19 × 19). The experimental results shown in Figure 9 and Figure 10 show that the highest AA value (99.36%) is achieved at the convolution kernel of 7 × 7 and the patch size of 13 × 13, with a prediction time of 11.7 s. The highest OA value (99.50%) is achieved at the convolution kernel of 3 × 3 and the patch size of 17 × 17, with a prediction time of 14 s. The optimal value is evaluated comprehensively at the convolution kernel of 7 × 7 and the patch size of 13 × 13 (AA: 99.36%; OA: 99.47%). Large convolutional kernels and patch sizes not only improve accuracy, but also increase the running pressure on computers, resulting in a longer computation time and affecting efficiency. The convolution kernel is 3 × 3, the patch size is 9 × 9, and the prediction time is 5.2 s. Finally, considering the performance bottleneck of the computer in this study, we chose to sacrifice a small part of accuracy to improve the computational efficiency without affecting the target extraction. In this paper, we chose a 3 × 3 convolution kernel and a 9 × 9 patch for the experiments. Afterwards, six experiments were conducted with learning rates of 1.0, 0.1, 0.01 (1.0, 0.1), (1.0, 0.01), and (0.1, 0.01). According to the experimental results shown in Table 4, the combination of learning rates (1.0, 0.1) yielded the best results.

3.5. Model Training

In this experiment, 50 preprocessed image samples (including transparent film, paper scraps, black film, transparent plastic strapping rope, white plastic strapping rope, red plastic strapping rope, white foam board, cotton, and background) were sliced to form a large number of 9 × 9 × 16 patches, and a data set was constructed. We used 8% of the dataset samples as the training set, which was imported into SVM, ResNet-18, 2D-CNN, Fast3D-CNN, Hierarchical ResNet, SpectralFormer, and MJHResNet models for recognition and classification experiments.

3.5.1. Model Parameter Settings

This model uses an Adadelta optimizer, ReLU activation function, CrossEntropyLoss function, and has been trained for 100 epochs. The first 70 epochs have a learning rate of 1.0, and the last 30 epochs have a learning rate of 0.1. The batch size is 1024.

3.5.2. Model Training Results

In Figure 11, the recognition and classification results of the MJHResNet model proposed in this paper and the comparison models SVM [33], ResNet-18 [37], 2D-CNN [28], Fast3D-CNN, SpectralFormer [29], and Hierarchical ResNet [25] are shown. From the recognition result graph, it can be seen that the MJHResNet model has the best performance, with a more accurate recognition of various impurities and fewer false recognitions of impurities, proving that this method is scientifically effective. Each algorithm has good recognition performance for sample (1) in Figure 11A and sample (5) in Figure 11B. In the result graphs of the other samples, the recognition ability of Fast3D-CNN is weaker than that of other DL models, with more misrecognition areas. SVM has weak generalization and poor recognition of impurities such as plastic film and transparent rope.
According to the confusion matrix of the seven types of models shown in Figure 12, it can be intuitively seen that all the foreign fibers identified by the seven types of models are mistakenly identified as seed cotton, mainly because the foreign fibers are located on the seed cotton, which is caused by the inaccurate recognition of some edges. At the same time, according to the confusion matrix, the recognition results of each type of model can be calculated statistically (Table 5). In Table 5, it can be seen that, compared with other impurities, each type of model has relatively weak recognition of transparent film and transparent rope, mainly because the light will pass through them and shine on the seed cotton, which is similar to the reflectivity change of the seed cotton, and the difference is small. According to the obtained results, it can be seen that the MJHResNet model improved various indicators compared to the Hierarchical ResNet model, and compared with the advanced SpectralFormer classifier it also has advantages, proving that our improvement is successful. SVM has weak robustness and significant differences in recognition accuracy between different categories, resulting in the lowest AA of 94.98%. In addition, compared with the other six models, the MJHResNet model proposed in this paper has better performance in the experiment of seed cotton foreign fiber recognition and classification, with the AA and OA reaching 98.71%, 99.28%, respectively. Furthermore, the recall and precision of each category are both above 96%.
In Figure 13, the horizontal and vertical coordinates show the recognition recall and precision of seven types of models for nine types of samples. In Figure 13a, it can be clearly seen that each type of model has relatively weak recognition of transparent rope, red rope, and white rope, especially for the SVM model, which may be affected by the number of samples. Due to the small volume of transparent rope, white rope, and red rope, the number of samples is small, which leads to insufficient network learning. In Figure 13b, it can be seen that the precision values of the first four types of models fluctuate greatly, reflecting weaker robustness of the models, while the latter three types of models are more concentrated and have better robustness. From Figure 13a,b, it can be seen that the MJHResNet model has significant advantages compared to the other six types of models, fully demonstrating the feasibility of this model.
The experimental results show that the MJHResNet model proposed in this paper is feasible. It can complete the task well in the work of seed cotton foreign fiber classification and recognition, and the pretreatment process promotes the accurate recognition and classification of seed cotton foreign fiber to a certain extent. It has great potential for application in fields such as medicine, the textile industry, and industrial materials.

4. Conclusions

In order to solve the problem of the difficulty of identifying white paper scraps, foam boards, colorless transparent films, and other foreign fibers in seed cotton, this paper proposes a method combining hyperspectral imaging technology in the 400–1000 nm spectral range with the MJHResNet algorithm. This method performs black-and-white correction, image cutting, standardization processing, MSC processing, and PCA processing on the original image in advance to effectively enhance the spectral feature information. This method has shown good performance in identifying seed cotton foreign fibers, with an AA and OA of 98.71% and 99.28%. It can complete the recognition and classification of seed cotton foreign fibers excellently, and has good generalization ability and robustness. It has great potential for application in the field of seed cotton foreign fiber recognition. Due to the consideration of device performance, the experiment did not use large convolutional kernels, large patch sizes, and data parallel computing. In addition, whether the accuracy could be further improved by using a spatial–spectral combination will be discussed. In future research, we will expand the dataset and use more types of seed cotton fibers to design and train an optimal autoencoder for more complex tasks. Moreover, the hardware equipment will be upgraded and a spatial–spectral combination and multi-scale convolution kernel will be used. Further research will be carried out in the direction of large patch size experiments and multi-GPU parallel computing, which will increase the accuracy, shorten the prediction time, and provide a more accurate and efficient method for identifying seed cotton foreign fiber.

Author Contributions

Writing—original draft preparation, Y.Z.; writing—review and editing, L.Z.; software, Y.Z. and L.Z.; formal analysis, L.Z., Z.G. and R.Z.; investigation, Y.Z. and R.Z.; data curation, Y.Z.; resources, Z.G.; funding acquisition, L.Z.; project administration, L.Z., Z.G. and R.Z.; visualization, Y.Z.; validation, Y.Z.; conceptualization, L.Z.; supervision, Z.G. and R.Z.; methodology, Y.Z. and L.Z. All authors have read and agreed to the published version of the manuscript.

Funding

Department of Science and Technology of Shandong Province: ZR2022MF303; Liaocheng University: No. 318012013.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data contained within the article and the data used in this study are available from the corresponding author on reasonable request.

Acknowledgments

Thanks are extended to the Shandong Academy of Agricultural Machinery Sciences for providing equipment support, and the authors would also like to thank the editors and anonymous reviewers for their valuable comments and suggestions.

Conflicts of Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

References

  1. He, Z.; Liu, Y. Fourier Transform Infrared Spectroscopic Analysis in Applied Cotton Fiber and Cottonseed Research: A Review. JCS 2021, 25, 167–183. [Google Scholar] [CrossRef]
  2. Shahriari-Khalaji, M.; Alassod, A.; Nozhat, Z. Cotton-Based Health Care Textile: A Mini Review. Polym. Bull. 2022, 79, 10409–10432. [Google Scholar] [CrossRef]
  3. Feng, L.; Chi, B.; Dong, H. Cotton Cultivation Technology with Chinese Characteristics Has Driven the 70-Year Development of Cotton Production in China. J. Integr. Agric. 2022, 21, 597–609. [Google Scholar] [CrossRef]
  4. Tian, J.; Zhang, X.; Yang, Y.; Yang, C.; Xu, S.; Zuo, W.; Zhang, W.; Dong, H.; Jiu, X.; Yu, Y.; et al. How to Reduce Cotton Fiber Damage in the Xinjiang China. Ind. Crops Prod. 2017, 109, 803–811. [Google Scholar] [CrossRef]
  5. Ning, S.; Zhou, B.; Shi, J.; Wang, Q. Soil Water/Salt Balance and Water Productivity of Typical Irrigation Schedules for Cotton under Film Mulched Drip Irrigation in Northern Xinjiang. Agric. Water Manag. 2021, 245, 106651. [Google Scholar] [CrossRef]
  6. Wang, K.; Su, L.; Wang, Q. Cotton Growth Model under Drip Irrigation with Film Mulching: A Case Study of Xinjiang, China. Agron. J. 2021, 113, 2417–2436. [Google Scholar] [CrossRef]
  7. Chen, Y.J.; Wu, T.R.; Shi, S.W.; Zhao, B.; Yang, S.H. Review of cotton foreign fiber detection method using optical imaging. Laser Optoelectron. Prog. 2021, 58, 1600007. [Google Scholar] [CrossRef]
  8. Dang, F.; Chen, D.; Lu, Y.; Li, Z. YOLOWeeds: A Novel Benchmark of YOLO Object Detectors for Multi-Class Weed Detection in Cotton Production Systems. Comput. Electron. Agric. 2023, 205, 107655. [Google Scholar] [CrossRef]
  9. Lin, D.; Cheng, C. Research on Flower Image Recognition Algorithm. In Proceedings of the 2022 International Conference on Big Data, Information and Computer Network (BDICN), Sanya, China, 20–22 January 2022; IEEE: New York, NY, USA, 2022; pp. 646–649. [Google Scholar]
  10. Zhang, Y.; Ma, B.; Hu, Y.; Li, C.; Li, Y. Accurate Cotton Diseases and Pests Detection in Complex Background Based on an Improved YOLOX Model. Comput. Electron. Agric. 2022, 203, 107484. [Google Scholar] [CrossRef]
  11. Apacionado, B.V.; Ahamed, T. Sooty Mold Detection on Citrus Tree Canopy Using Deep Learning Algorithms. Sensors 2023, 23, 8519. [Google Scholar] [CrossRef]
  12. Jaiswal, G.; Rani, R.; Mangotra, H.; Sharma, A. Integration of Hyperspectral Imaging and Autoencoders: Benefits, Applications, Hyperparameter Tunning and Challenges. Comput. Sci. Rev. 2023, 50, 100584. [Google Scholar] [CrossRef]
  13. Lone, Z.A.; Pais, A.R. Object Detection in Hyperspectral Images. Digit. Signal Process. 2022, 131, 103752. [Google Scholar] [CrossRef]
  14. Liu, X.; Gong, W.; Shang, L.; Li, X.; Gong, Z. Remote Sensing Image Target Detection and Recognition Based on YOLOv5. Remote Sens. 2023, 15, 4459. [Google Scholar] [CrossRef]
  15. Li, H.; Chen, L.; Yao, Z.; Li, N.; Long, L.; Zhang, X. Intelligent Identification of Pine Wilt Disease Infected Individual Trees Using UAV-Based Hyperspectral Imagery. Remote Sens. 2023, 15, 3295. [Google Scholar] [CrossRef]
  16. Zhang, W.; Li, X.; Zhao, L. A Fast Hyperspectral Feature Selection Method Based on Band Correlation Analysis. IEEE Geosci. Remote Sens. Lett. 2018, 15, 1750–1754. [Google Scholar] [CrossRef]
  17. Ou, X.; Wu, M.; Tu, B.; Zhang, G.; Li, W. Multi-Objective Unsupervised Band Selection Method for Hyperspectral Images Classification. IEEE Trans. Image Process. 2023, 32, 1952–1965. [Google Scholar] [CrossRef]
  18. Kang, X.; Xiang, X.; Li, S.; Benediktsson, J.A. PCA-Based Edge-Preserving Features for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2017, 55, 7140–7151. [Google Scholar] [CrossRef]
  19. Awni, M.; Khalil, M.I.; Abbas, H.M. Offline Arabic Handwritten Word Recognition: A Transfer Learning Approach. J. King Saud Univ.-Comput. Inf. Sci. 2022, 34, 9654–9661. [Google Scholar] [CrossRef]
  20. Kaur, R.; Singh, S. A Comprehensive Review of Object Detection with Deep Learning. Digit. Signal Process. 2023, 132, 103812. [Google Scholar] [CrossRef]
  21. Liu, J.; Zhao, Y.; Jia, W.; Ji, Z. DLNet: Accurate Segmentation of Green Fruit in Obscured Environments. J. King Saud Univ.-Comput. Inf. Sci. 2022, 34, 7259–7270. [Google Scholar] [CrossRef]
  22. Diaz-Martinez, V.; Orozco-Sandoval, J.; Manian, V.; Dhatt, B.K.; Walia, H. A Deep Learning Framework for Processing and Classification of Hyperspectral Rice Seed Images Grown under High Day and Night Temperatures. Sensors 2023, 23, 4370. [Google Scholar] [CrossRef] [PubMed]
  23. Ni, C.; Li, Z.; Zhang, X.; Sun, X.; Huang, Y.; Zhao, L.; Zhu, T.; Wang, D. Online Sorting of the Film on Cotton Based on Deep Learning and Hyperspectral Imaging. IEEE Access 2020, 8, 93028–93038. [Google Scholar] [CrossRef]
  24. Du, Y.H.; Li, X.; Ren, W.; Zuo, H. Application of Near-Infrared Spectroscopy and CNN-TCN for the Identification of Foreign Fibers in Cotton Layers. J. Nat. Fibers 2023, 20, 2172638. [Google Scholar] [CrossRef]
  25. Xue, Z.; Yu, X.; Liu, B.; Tan, X.; Wei, X. HResNetAM: Hierarchical Residual Network with Attention Mechanism for Hyperspectral Image Classification. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2021, 14, 3566–3580. [Google Scholar] [CrossRef]
  26. Collins, T.; Maktabi, M.; Barberio, M.; Bencteux, V.; Jansen-Winkeln, B.; Chalopin, C.; Marescaux, J.; Hostettler, A.; Diana, M.; Gockel, I. Automatic Recognition of Colon and Esophagogastric Cancer with Machine Learning and Hyperspectral Imaging. Diagnostics 2021, 11, 1810. [Google Scholar] [CrossRef]
  27. Huang, J.; He, H.; Lv, R.; Zhang, G.; Zhou, Z.; Wang, X. Non-Destructive Detection and Classification of Textile Fibres Based on Hyperspectral Imaging and 1D-CNN. Anal. Chim. Acta 2022, 1224, 340238. [Google Scholar] [CrossRef]
  28. Liu, Z.; Zhao, L.; Yu, X.; Zhang, Y.; Cui, J.; Ni, C.; Zhang, L. Intelligent Identification of Film on Cotton Based on Hyperspectral Imaging and Convolutional Neural Network. Sci. Prog. 2022, 105, 00368504221137461. [Google Scholar] [CrossRef] [PubMed]
  29. Hong, D.; Han, Z.; Yao, J.; Gao, L.; Zhang, B.; Plaza, A.; Chanussot, J. SpectralFormer: Rethinking Hyperspectral Image Classification with Transformers. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5518615. [Google Scholar] [CrossRef]
  30. Zhu, X.; Bi, Y.; Du, J.; Gao, X.; Zhang, T.; Pi, W.; Zhang, Y.; Wang, Y.; Zhang, H. Research on Deep Learning Method Recognition and a Classification Model of Grassland Grass Species Based on Unmanned Aerial Vehicle Hyperspectral Remote Sensing. Grassl. Sci. 2023, 69, 3–11. [Google Scholar] [CrossRef]
  31. Gao, S.-H.; Cheng, M.-M.; Zhao, K.; Zhang, X.-Y.; Yang, M.-H.; Torr, P. Res2Net: A New Multi-Scale Backbone Architecture. IEEE Trans. Pattern Anal. Mach. Intell. 2021, 43, 652–662. [Google Scholar] [CrossRef]
  32. Li, S.; Zhu, X.; Bao, J. Hierarchical Multi-Scale Convolutional Neural Networks for Hyperspectral Image Classification. Sensors 2019, 19, 1714. [Google Scholar] [CrossRef] [PubMed]
  33. Tan, K.; Du, P.-J. Hyperspectral remote sensing image classification based on support vector machine. J. Infrared Millim. Waves 2008, 27, 123–128. [Google Scholar] [CrossRef]
  34. Cozzolino, D.; Williams, P.J.; Hoffman, L.C. An Overview of Pre-Processing Methods Available for Hyperspectral Imaging Applications. Microchem. J. 2023, 193, 109129. [Google Scholar] [CrossRef]
  35. Fan, J.; Zhang, X.; Chen, Y.; Sun, C. Classification of Hyperspectral Image by Preprocessing Method Based Relation Network. Int. J. Remote Sens. 2023, 44, 6929–6953. [Google Scholar] [CrossRef]
  36. Liu, Y.; Pan, X.; Liu, J.; Zhang, S.; Yan, W. Research on Near-Ground Forage Hyperspectral Imagery Classification Based on Fusion Preprocessing Process. Int. J. Digit. Earth 2023, 16, 4707–4725. [Google Scholar] [CrossRef]
  37. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; IEEE: New York, NY, USA, 2016; pp. 770–778. [Google Scholar]
  38. Fan, C.; Xue, J.; Tao, J.; Yi, J.; Wang, C.; Zheng, C.; Lv, Z. Spatial Reconstructed Local Attention Res2Net with F0 Subband for Fake Speech Detection. Neural Netw. 2024, 175, 106320. [Google Scholar] [CrossRef]
  39. Hu, J.; Shen, L.; Albanie, S.; Sun, G.; Wu, E. Squeeze-and-Excitation Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 42, 2011–2023. [Google Scholar] [CrossRef]
Figure 1. Experimental Flow Diagram.
Figure 1. Experimental Flow Diagram.
Sensors 24 05892 g001
Figure 2. MJHResNet structure diagram.
Figure 2. MJHResNet structure diagram.
Sensors 24 05892 g002
Figure 3. SENet structure diagram.
Figure 3. SENet structure diagram.
Sensors 24 05892 g003
Figure 4. Hyperspectral image cropping image.
Figure 4. Hyperspectral image cropping image.
Sensors 24 05892 g004
Figure 5. Spectral curve diagram.
Figure 5. Spectral curve diagram.
Sensors 24 05892 g005
Figure 6. Visualization of standardized processing.
Figure 6. Visualization of standardized processing.
Sensors 24 05892 g006
Figure 7. Visualization of MSC processing. (a) Visualization image after MSC processing only; (b) Visualization image after standardization and MSC processing in sequence.
Figure 7. Visualization of MSC processing. (a) Visualization image after MSC processing only; (b) Visualization image after standardization and MSC processing in sequence.
Sensors 24 05892 g007
Figure 8. Experimental diagram of PCA. (a) Explanation of variance of the first three principal components; (b) OA diagram of PCA experiment.
Figure 8. Experimental diagram of PCA. (a) Explanation of variance of the first three principal components; (b) OA diagram of PCA experiment.
Sensors 24 05892 g008
Figure 9. Experimental diagram of optimal parameter distribution. (a) AA values corresponding to different sizes of convolution kernels and patches; (b) OA values corresponding to different sizes of convolution kernels and patches.
Figure 9. Experimental diagram of optimal parameter distribution. (a) AA values corresponding to different sizes of convolution kernels and patches; (b) OA values corresponding to different sizes of convolution kernels and patches.
Sensors 24 05892 g009
Figure 10. Prediction time of each experimental parameter.
Figure 10. Prediction time of each experimental parameter.
Sensors 24 05892 g010
Figure 11. Classification diagram for identifying different fibers in seed cotton. (A) the original image sample (1), sample (2), sample (3) experimental results; (B) the original image sample (4), sample (5), sample (6) experimental results; (a) Original image; (b) Label; (c) SVM; (d) ResNet-18; (e) 2D-CNN; (f) Fast3D-CNN; (g) Hierarchical ResNet; (h) SpectralFormer; (i) MJHResNet.
Figure 11. Classification diagram for identifying different fibers in seed cotton. (A) the original image sample (1), sample (2), sample (3) experimental results; (B) the original image sample (4), sample (5), sample (6) experimental results; (a) Original image; (b) Label; (c) SVM; (d) ResNet-18; (e) 2D-CNN; (f) Fast3D-CNN; (g) Hierarchical ResNet; (h) SpectralFormer; (i) MJHResNet.
Sensors 24 05892 g011aSensors 24 05892 g011b
Figure 12. Confusion matrix of all models. (A) SVM; (B) ResNet-18; (C) 2D-CNN; (D) Fast3D-CNN; (E) Hierarchical ResNet; (F) SpectralFormer; (G) MJHResNet.
Figure 12. Confusion matrix of all models. (A) SVM; (B) ResNet-18; (C) 2D-CNN; (D) Fast3D-CNN; (E) Hierarchical ResNet; (F) SpectralFormer; (G) MJHResNet.
Sensors 24 05892 g012
Figure 13. Recall and Precision Description Charts of all models. (a) Recall curves of seven types of models; (b) Precision distribution map of seven types of models.
Figure 13. Recall and Precision Description Charts of all models. (a) Recall curves of seven types of models; (b) Precision distribution map of seven types of models.
Sensors 24 05892 g013
Table 1. MJHResNet parameters.
Table 1. MJHResNet parameters.
Layer NameOutput ShapeConvolution KernelStepPadding
Input9 × 9 × 16
Conv07 × 7 × 64 (1)3 × 3 × 16 (1)1(0,0)
Conv17 × 7 × 64 (6)3 × 3 × 64 (6)1(1,1)
Conv27 × 7 × 64 (6)3 × 3 × 64 (6)1(1,1)
Conv37 × 7 × 64 (6)3 × 3 × 64 (6)1(1,1)
Conv47 × 7 × 64 (6)3 × 3 × 64 (6)1(1,1)
Conv67 × 7 × 64 (6)3 × 3 × 64 (6)1(1,1)
Conv77 × 7 × 64 (6)1 × 1 × 64 (6)1(1,1)
SENet7 × 7 × 128
Avg_pool1 × 1 × 1287 × 7 × 128
OutputClass (9)
Table 2. Ablation experiment.
Table 2. Ablation experiment.
MethodSample 1Sample 2
AAOAAAOA
The first hierarchical residual structure in the DHR structure98.165398.188897.024397.3698
Single multi-branch residual structure replaced by DHR97.676998.211696.795196.129
DHR98.20998.319697.879398.2809
DHR + SENet98.429698.4398.076598.6844
With the best results highlighted in bold.
Table 3. Model complexity analysis.
Table 3. Model complexity analysis.
ModelResNet-182D-CNN3D-CNNHResNetMJHResNet
Parameters (M)11.42.162.430.461.06
FLOPs (G)561.541.340.622.833.6
Table 4. Optimal learning rate results.
Table 4. Optimal learning rate results.
GroupEpoch_aEpoch_bLearning Rate_aLearning Rate_bAAOA
170301.01.098.21%99.03%
270300.10.198.77%99.21%
370300.010.0198.62%99.12%
470301.00.198.98%99.37%
570301.00.0198.83%99.21%
670300.10.0198.67%99.28%
With the best results highlighted in bold.
Table 5. Recognition result data for all models.
Table 5. Recognition result data for all models.
FilmCottonPaperBlack FilmWhite RopeRed RopeTransparent RopeFoam BoardBackgroundAAOA
SVMRecall86.823598.045598.630198.364595.227896.760884.969697.086398.881494.976697.903
Precision90.900697.788198.945698.780895.899895.964687.571995.283998.7247
ResNet-18Recall96.159997.313497.413797.290996.379196.665194.26196.923597.428396.648397.2988
Precision93.977497.222898.331897.4394.797390.001586.265396.389297.8117
2D-CNNRecall95.815697.228797.572897.352496.445996.361993.684896.933997.466396.540397.2641
Precision93.393197.23797.927797.868196.17391.959888.274396.442797.7488
Fast3D-CNNRecall92.45896.78397.33496.99296.61396.76190.94996.27697.17495.704396.7677
Precision89.976896.698497.95297.058492.997192.284384.643695.583597.6
Hierarchical ResNetRecall96.293197.201897.536797.194496.562795.611994.342697.190397.451896.598497.2646
Precision94.326297.258797.932597.886395.102793.289788.780396.302897.6254
SpectralFormerRecall97.604498.739898.753898.812397.313597.670395.336296.351998.645697.69298.6204
Precision96.040198.489499.373398.775595.247495.970595.021598.161199.0187
MJHResNetRecall98.38699.29699.44999.58198.26598.596.10799.45399.37398.712299.2835
Precision98.09799.257399.554299.303898.068397.828896.585198.80999.4507
With the best results highlighted in bold.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, Y.; Zhang, L.; Guo, Z.; Zhang, R. Application of Hyperspectral Imaging and Multi-Module Joint Hierarchical Residual Network in Seed Cotton Foreign Fiber Recognition. Sensors 2024, 24, 5892. https://doi.org/10.3390/s24185892

AMA Style

Zhang Y, Zhang L, Guo Z, Zhang R. Application of Hyperspectral Imaging and Multi-Module Joint Hierarchical Residual Network in Seed Cotton Foreign Fiber Recognition. Sensors. 2024; 24(18):5892. https://doi.org/10.3390/s24185892

Chicago/Turabian Style

Zhang, Yunlong, Laigang Zhang, Zhijun Guo, and Ran Zhang. 2024. "Application of Hyperspectral Imaging and Multi-Module Joint Hierarchical Residual Network in Seed Cotton Foreign Fiber Recognition" Sensors 24, no. 18: 5892. https://doi.org/10.3390/s24185892

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop