Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
Next Article in Journal
The Impact of Inlet Structure on Stratification Performance in Thermal Storage Tanks: A Study through Simulation and Experimental Analysis
Previous Article in Journal
Privacy-Preserving Byzantine-Resilient Swarm Learning for E-Healthcare
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Study on the Detection Mechanism of Multi-Class Foreign Fiber under Semi-Supervised Learning

School of Electrical and Electronic Engineering, Wuhan Polytechnic University, Wuhan 430048, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(12), 5246; https://doi.org/10.3390/app14125246
Submission received: 10 May 2024 / Revised: 6 June 2024 / Accepted: 7 June 2024 / Published: 17 June 2024

Abstract

:
Foreign fibers directly impact the quality of raw cotton, affecting the prices of textile products and the economic efficiency of cotton textile enterprises. The accurate differentiation and labeling of foreign fibers require domain-specific knowledge, and labeling scattered cotton foreign fibers in images consumes substantial time and labor costs. In this study, we propose a semi-supervised foreign fiber detection approach that uses unlabeled image information and a small amount of labeled data for model training. Our proposed method, Efficient YOLOv5-cotton, introduces CBAM to address the issue of the missed detection and false detection of small-sized cotton foreign fibers against complex backgrounds. Second, the algorithm designs a multiscale feature information extraction network, SPPFCSPC, which improves its ability to generalize to fibers of different shapes. Lastly, to reduce the increased network parameters and computational complexity introduced by the SPPFCSPC module, we replace the C3 layer with the C3Ghost module. We evaluate Efficient YOLOv5 for detecting various types of foreign fibers. The results demonstrate that the improved Efficient YOLOv5-cotton achieves a 1.6% increase in [email protected] (mean average precision) compared with the original Efficient YOLOv5 and reduces model parameters by 10% compared to the original Efficient YOLOv5 with SPPFCSPC. Our experiments show that our proposed method enhances the accuracy of foreign fiber detection using Efficient YOLOv5-cotton and considers the trade-off between the model size and computational cost.

1. Introduction

Cotton is the raw material for producing clothing, towels, quilts, and other necessities. Raw cotton’s quality directly influences the quality of cotton textiles, which in turn affects textile prices and the economic performance of cotton textile enterprises [1]. Cotton often becomes intermixed with foreign fibers during growth, harvesting, and subsequent processing. If these foreign fibers cannot be removed in time, they can lead to yarn breakage during spinning and cause blemishes on the cloth surface during weaving. Foreign fibers with dark colors may influence the appearance of light-colored fabrics, while light-colored foreign fibers can result in uneven dyeing. Unremoved foreign fibers have an essential impact on the quality of textiles at all stages of cotton processing, and different foreign fibers have different degrees of harm to textiles. Efficient methods for removing these foreign fibers significantly enhance the overall quality of cotton textiles [2].
In traditional cotton production, almost all textile enterprises still rely on manual sorting for fiber impurity detection [3]. However, this approach suffers from low work efficiency due to human eye exhaust and the striking similarity between foreign and cotton fibers’ physical properties. Rapid manual sorting makes it challenging to distinguish foreign fibers from cotton accurately, resulting in slow detection work and increased production time costs. In recent years, the rapid development of artificial intelligence technology, particularly deep learning, has led to significant advancements in foreign fiber detection methods [4,5,6,7,8]. Xuehua Zhao [4] used the feature selection method to match classifiers and select the optimal feature set for detecting foreign fibers, obtaining excellent performance in foreign fiber detection with Extreme Learning Machine and Kernel Support Vector Machine, which achieved classification accuracies of 93.61% and 93.17% respectively, using feature sets of 42 and 52 features. Qingxu Li [5] designed “Cotton-YOLO” for the efficient detection of foreign fibers in seed cotton, achieving an accuracy of 99.12%, an mAP50 of 96.92%, and a detection speed of 132.2 FPS (7.6 ms per image), significantly outperforming YOLOV7. Yuhong Du [6] improved Faster RCNN for the diversity of foreign fiber size and shape characteristics. The accuracy, precision, recall, and F1 score improved by 3.21%, 0.90%, 2.51%, and 0.017, respectively, after the improvement. Wei Wei [7] proposed a foreign fiber classification model “CottonNet-Fusion” based on a residual network with feature difference fitting for the problem that foreign fibers in raw cotton are similar to cotton in terms of features, which maintains the classification accuracy at 90.3% in the complex environment sampled images. Rui Wang [8] proposed an improved object detection and classification algorithm based on the optical and polarization differences between cotton fibers, which achieves the recognition and classification of small foreign fibers with an average identification accuracy of 96.9%. These methods use the advantages of handling large data samples and have successfully detected foreign fibers. However, a common limitation is the heavy reliance on extensive labeled data during training. Additionally, foreign fiber images exhibit diverse features influenced by real-world conditions—for instance: (1) Raw cotton quality problems: Reserve cotton may appear weakly yellow, inconsistent with conventional gray–white cotton. Long-staple cotton, on the other hand, appears milky white, which can be easily mistaken for white polypropylene yarn. (2) Equipment problems: Insufficient processing of raw cotton by the cotton opener can lead to blurred foreign fiber images. Poor lighting conditions further aggravate image darkness [9]. Accurately distinguishing and labeling foreign fibers demands domain-specific knowledge, and manually labeling scattered cotton foreign fibers in images is both time-consuming and labor-intensive. Interestingly, unlabeled data are readily available and cost-effective compared to labeled data. Consequently, researchers are actively exploring ways to enhance recognition accuracy by harnessing unlabeled data, especially when dealing with limited labeled samples.
Semi-supervised methods use unlabeled image information and a few labeled images to train models, reducing the performance degradation often seen in traditional unsupervised learning due to insufficient training samples. Merz first introduced the concept of semi-supervised learning [10]. Existing semi-supervised learning algorithms primarily focus on image classification tasks and can be categorized into two main strategies: consistency regularization [11,12,13] and pseudo-labeling [14,15,16]. The consistency regularization strategy involves applying multiple random disturbances to unlabeled images and minimizing the differences between prediction results, effectively using unlabeled data for learning. The pseudo-labeling strategy, on the other hand, first trains with labeled data and subsequently predicts the unlabeled data to generate pseudo-labels, enabling self-training of the network. Semi-supervised learning combines aspects of both supervised and unsupervised learning. It utilizes a small amount of labeled data alongside unlabeled data for pattern recognition tasks and finds applications across various domains.
Currently, semi-supervised methods based on deep learning have made initial progress in agricultural detection research. In this paper, we propose a semi-supervised foreign fiber detection algorithm, Efficient YOLOv5-cotton, based on the successful application of YOLO series algorithms in previous foreign fiber detection and the feasibility of semi-supervised algorithms. This approach is promising in achieving a high classification accuracy while reducing the dependence on labelled samples. It employs CBAM and SPPFCSPC to enhance the multiscale foreign fiber detection capability of the network, while C3Ghost is used to reduce the model size for industrial applications. This study is based on the detection of cotton foreign fiber images collected under industrial reality, which provides a solid technical foundation for the automatic detection of foreign fiber in industrial production. At the same time, the semi-supervised algorithm proposed in this paper can reduce the time and workload needed among the textile industry practitioners in labelling foreign fiber images, which can be used to assist in the detection of foreign fiber in the textile industry.

2. Materials and Methods

2.1. Materials

The dataset used for the experiment consists of cotton and foreign fibers captured in actual industrial production scenarios. These samples primarily originate from machine-harvested cotton in Xinjiang, hand-picked mainland cotton, and state storage cotton. The data were collected using specialized fiber separation machines, as depicted in the diagram below (Figure 1).
The cotton and foreign fibers undergo processing and dispersing through a cotton-opener machine. A camera captures the foreign fibers attached to the cotton, producing images of these foreign fibers. After the opener loosens the cotton, the mixed cotton and foreign fibers flow through a pipeline. Cameras capture images of this mixture, and a valve is used to eject the foreign fibers. The ejected foreign fibers are then drawn into a dedusting cotton bag by a dedusting fan for secondary processing in the spinning workshop.
In this study, we capture images using a fiber separation machine under actual production conditions. A total of 4200 images of a size of 464 pixels × 464 pixels were collected as samples. The dataset includes various types of cotton and foreign fibers, such as dirty, polypropylene filaments, plastic, cotton stalks, and cotton threads. The labeling of the foreign fibers collected from industrial production is as follows: dirt, polypropylene filaments, plastic, cotton stalks, and cotton threads are all uniformly labeled as “large fiber”. In the LabelMe software (version 3.16.2.), rectangular boxes are drawn around the areas with foreign fibers in the images, and the label is set for the foreign fibers as “large fiber”. Then, the generated formatted file is saved in the “labels” directory within the same path as the “images” directory in the dataset. After the annotation, the images of foreign fibers are converted to the YOLO dataset format. Then, the dataset is divided into training, testing, and validation sets in an 8:1:1 ratio, as shown in Table 1. Among these, 10% of the labeled images in the training set (336 labeled images) are selected as labeled data for supervised training in semi-supervised detection. The remaining 90% (3024 images without a labeled target) are used as unsupervised learning unlabeled data for training. Some sample datasets are listed below in Figure 2.
“Dirty”, “Polypropylene filaments”, “Plastic”, “Cotton stalks”, and “Cotton threads” represent the respective counts of each type of object in the dataset.

2.2. Methods

Starting from the perspective of using a small-scale labeled dataset for foreign fiber detection, we propose a semi-supervised object detection model based on Efficient Teacher [17]. Based on a teacher–student mutual learning framework, we enhance the pseudo-labeling method and employ the YOLOv5-cotton foreign fiber detection network as the foreign fiber detector. The overall architecture is illustrated in Figure 3.
The teacher–student network model in semi-supervised foreign fiber detection is improved in the YOLOv5-cotton network. The detailed improvement network can be seen in Figure 4. We replace the original SPPF layer in the backbone with the SPPFCSPC [18] and add the attention module CBAM [19] to the neck of the network, focusing on spatial features and channel features. In the backbone part, the C3 structure is combined with the ideas of GhostNet [20] and improved to C3Ghost [21,22]. This module can effectively extract feature information while reducing network parameters.
The Efficient YOLOv5-cotton foreign fiber detection model consists of two stages. The two-phase training can be seen in Figure 5. Supervised Training (Burn In): The teacher network model is an improved YOLOv5-cotton foreign fiber detector in this initial stage. Labeled data are used for training, and the teacher model is continuously updated to predict foreign fiber labels.
In the second stage, a teacher–student mutual learning approach inspired by the Mean Teacher [12] network structure is introduced. This stage involves two key steps. First, we train and update the student model using labeled data augmented with Mosaic augmentation and unlabeled data augmented with both Mosaic and strong augmentation. The labeled data provide ground truth labels for computing the classification loss with the student model predictions. After that, we use the pre-trained teacher model to process the unlabeled data, generating pseudo-labels for the student. The student model then optimizes its predictions based on these pseudo-labels, treating the difference between its predictions and the pseudo-labels as a consistency loss. Notably, the teacher model remains fixed while the student model is updated during this process. The overall loss function for the teacher–student mutual learning model combines supervised and unsupervised losses. The student model’s total loss comprises the supervised classification loss (computed using true labels) and the semi-supervised consistency loss. Equations (1) and (2) give the mathematical formulation for the loss.
L = L s + λ u L u ,
θ s = θ s + L s + λ u L u θ s ,
where L s and L u are the supervised loss and the semi-supervised consistency loss, respectively, λ u is the weight of the semi-supervised consistency loss, and θ s is the parameter of the student model.
The second step is updating the teacher model, at which point the student model remains unchanged. After the unlabeled data are augmented by Mosaic and strong, they are trained with pseudo-labels and input into the student network (YOLOv5-cotton) in an ensemble learning manner. The parameters of the teacher model are updated through the Exponential Moving Average (EMA), forming a flywheel effect of mutual learning. Essentially, it is the fine-tuning of the teacher model by the student model after updating the iterative parameters, thereby achieving the update of the teacher model parameters in each training. The parameter update formula is as follows:
θ t = α θ t + 1 α θ s ,
where α is the smoothing coefficient, which ranges from 0 to 1, and θ t is the parameter of the teacher model.

2.2.1. Small Object Detection

We introduce the Convolutional Block Attention Module (CBAM) [23] to address the issues of the missed detection and false detection of small-sized cotton foreign fibers against complex backgrounds such as plastic film, polypropylene thread, and cotton stalks in cotton foreign fiber detection. The CBAM is embedded after the standard convolution (Conv) in the original YOLOv5n model to enhance the network’s feature extraction capability.
CBAM is an efficient, lightweight attention module that can be integrated into any convolutional neural network architecture and trained end-to-end with the base network. It allows the model to pay more attention to the feature information of foreign fibers, suppress non-foreign fiber information features, and extract more accurate semantic information about foreign fibers. We add the attention module to the YOLOv5 neck network to recalibrate the feature map and enhance the feature representation capability. The architecture of the attention module is shown in Figure 6.
F = M c F     F ,
F = M c F     F ,

2.2.2. Multiscale Feature Extraction

In industrial scenarios, capturing images of cotton fibers with varying scales poses a significant challenge for foreign fiber detection. For instance, differences in scale exist even among the same type of foreign fibers. Variations in size between waste cotton balls, polypropylene filaments, oil stains, plastic films, cotton stalks, and cotton threads further complicate the detection process. Additionally, variations in fiber proportions due to factors like shooting angles or image segmentation contribute to the significant scale changes observed during foreign fiber detection. Figure 7 shows the variation in the labeled box scale in the foreign fiber detection.
To further enhance the ability of different scales for feature extraction to better deal with targets of different sizes [24], we adopt a novel spatial pyramid pooling module, namely, the SPPFCSPC structure, as shown in Figure 8. The SPPFCSPC module consists of two key techniques: Spatial Pyramid Pooling (SPP) and Fully Connected Spatial Pyramid Convolution (FCSPC). The SPP component enables capturing information from various-sized foreign fibers, mitigating the impact of scale variations on object detection. Meanwhile, the FCSPC component integrates and uses information across different scales, enhancing the network’s ability to handle diverse foreign fiber sizes [25].

2.2.3. Lightweight Optimization

The Ghost module in GhostNet [20] proposed by Han reduces the number of model parameters. In our experiment, some C3 modules are replaced with C3Ghost modules. The C3Ghost module draws inspiration from the structural ideas of CSPNet [26] and combines GhostConv for image convolution. When using convolutional kernels of the same size, the computational complexity and parameter count of GhostNet is approximately 1/s compared to that of traditional convolution [27]. Consequently, in this study, we integrate the GhostNet architecture into the C3 module, creating a novel C3Ghost module that is incorporated into an improved network model. The C3Ghost module is depicted in Figure 9 below.

3. Results

3.1. Implementation Details

The first stage of supervised foreign fiber detection (SUP) is based on a pre-trained YOLOv5n network. We train it using the Efficient YOLOv5-cotton method, employing the stochastic gradient descent (SGD) algorithm to update and optimize the model’s weights. To enhance the model’s performance, we apply both weak and strong data augmentation techniques. Mosaic augmentation is used for weak augmentation, Mosaic augmentation randomly crops one selected image and three other random images and then sticks them together to create a training dataset, while strong augmentation included Mosaic, horizontal flipping, large scale jitter, Gaussian blur, cropping, and color space transformations. These augmentation techniques help improve the model’s ability to generalize and reduce overfitting during training. The SGD algorithm optimizes the model’s performance by iteratively adjusting the weights based on the gradient of the loss function. Combining these strategies contributes to effective foreign fiber detection in practical production scenarios. The second stage of unsupervised foreign fiber detection (SSOD) takes the weights obtained from the first stage of training and uses it for generating pseudo labels. The other parameters are shown in Table 2 below.

3.2. Evaluation Index of the Model

In this study, the Intersection over Union (IOU) threshold is set to 0.5. Additionally, to evaluate the model’s performance in foreign fiber detection, we employ the following four metrics as assessment standards: Precision, Recall, F1 score, and Mean Average Precision (mAP). These metrics are calculated according to Formulas (6) to (10).
P = T P T P + F P × 100 % ,
R = T P T P + F N × 100 % ,
F 1 = 2 × P × R P + R × 100 % ,
A P = 0 1 p R d R ,
m A P = i = 1 N A P i N ,
where TP represents the number of samples that correctly judged the target as positive; conversely, FP represents the number of samples that incorrectly judged the target as positive. FN represents the number of samples that incorrectly judged the target as negative. Precision is defined as the ratio of the number of correctly predicted target foreign fibers to the number of target foreign fibers predicted by the model. Recall is defined as the ratio of the number of all target foreign fibers to the number of correctly predicted target foreign fibers. The F1 score combines the accuracy and recall metrics to provide a comprehensive assessment. Accuracy and recall increase as the F1 score increases. If the model has high accuracy but poor recall, the model cannot be considered valid. The F1 score indicates the robustness of the model. The higher the value of the F1 score, the better the robustness. Average precision can be defined as the average of the precision values obtained at different levels of recall. mAP stands for Mean Precision, which is an effective and more accurate way of interpreting the effect of the model. It is used to evaluate the detection accuracy of the network, and its value indicates the effectiveness of the network detection. For mAP, the P-R curve is used to determine the AP value. When the intersection and integration ratio (IoU) threshold is 0.5, the higher the [email protected], the better the model performance.

3.3. Train for Foreign Fiber Detection

The comparison between the training results of Efficient YOLOv5-cotton and Efficient YOLOv5n is depicted in Figure 10. In this figure, (a) shows the precision curve, (b) displays the recall changes, (c) illustrates the training loss, and (d) represents the [email protected] (mean average precision) variation. The training curve for Efficient YOLOv5n is in yellow, while that of Efficient YOLOv5-cotton is in blue. As shown in Figure 11, in comparison to Efficient YOLOv5n, our approach has obtained more information about the foreign fiber itself.
Efficient YOLOv5-cotton consistently exhibits slightly higher training loss values compared to Efficient YOLOv5n. This difference can be attributed to the network model improvements in Efficient YOLOv5-cotton. As the network structure becomes more complex and the model parameters increase, the training loss for Efficient YOLOv5-cotton is marginally higher than that of Efficient YOLOv5n during training. Interestingly, during the initial 50 epochs of training, Efficient YOLOv5-cotton and Efficient YOLOv5n show similar performance in terms of precision, recall, and [email protected]. However, as training progresses, Efficient YOLOv5-cotton gradually outperforms Efficient YOLOv5n in terms of precision, recall, and [email protected]. Experimental results demonstrate that the improved Efficient YOLOv5-cotton model achieves higher precision, recall, and [email protected] values compared to Efficient YOLOv5n.
Furthermore, the training loss curve of Efficient YOLOv5n gradually decreases with increasing epochs. However, around the 25th epoch, there is a slight upward trend due to the transition from the aging phase to the teacher–student mutual learning phase in the foreign fiber detection network. Despite fluctuations in precision and recall during the initial 50 epochs, Efficient YOLOv5n stabilizes and achieves good training results. In contrast, the training loss of the enhanced Efficient YOLOv5-cotton model remains smoother, and the precision, recall, and [email protected] exhibit more consistent fluctuations during the initial 50 epochs compared to Efficient YOLOv5n. Overall, the improved Efficient YOLOv5-cotton model demonstrates superior training performance.

3.4. Ablation Experiment

In the YOLOv5-cotton neck network, a CBAM attention module is introduced to address the issue of uniform feature weighting for different levels of importance. This uniform weighting approach in the YOLOv5n model does not favor the extraction of information from small-scale targets. To tackle this problem, the CBAM attention mechanism is incorporated. Additionally, the original SPPF layer in the backbone network is replaced with the SPPFCSPC layer. The SPPFCSPC module is a convolutional neural network module designed for feature extraction. It introduces parallel MaxPool operations within a sequence of convolutions, avoiding image distortion issues caused by image processing operations and addressing the challenge of extracting repetitive features from images. The SPPFCSPC module outperforms the SPPF layer but comes with an increased parameter count and computational complexity. Furthermore, the C3 layer in the backbone network is modified to the C3Ghost layer. The Ghost module within C3Ghost is a lightweight neural network architecture that effectively reduces model parameters and computational complexity while maintaining high accuracy and low-cost convolutional operations.
To further validate the impact of these improvements on foreign fiber detection, we conduct ablation experiments on the Efficient YOLOv5-cotton network. Using the same dataset and training parameters, we define three methods based on the YOLOv5n baseline: Method 1 adds the CBAM attention module to the neck network; Method 2 replaces the original SPPF layer in the backbone with the SPPFCSPC layer; and Method 3 modifies the C3 layer in the backbone to the C3Ghost layer. The results are summarized in Table 3.
Table 3 shows that the baseline model, Efficient YOLOv5n, achieves a foreign fiber detection model [email protected] of 95.4%. By analyzing the comprehensive experimental results, we find that individual improvements using methods 1, 2, and 3 lead to foreign fiber detection performance growth. Each of these modifications improves the foreign fiber detection model’s performance. Additionally, when introducing the SPPFCSPC module by replacing SPPF, we achieve a 0.7% increase in mAP. However, it is evident that the model parameters are nearly double in size. Finally, after combining all three improvement methods, the detection performance reaches an mAP of 97.0%, a 1.6% improvement over the baseline model. Furthermore, the model parameters are reduced by 10% compared to the baseline model with SPPFCSPC. This approach enhances the accuracy of foreign fiber detection using Efficient YOLOv5 and carefully considers the trade-off between the model size and computational cost.

3.5. Comparative Experiment

To further verify the detection performance of the improved model, Efficient YOLOv5-cotton, in foreign fiber detection, we conduct comparative experiments with YOLOv3 [28], YOLOv5 [8], YOLOv7 [29], Faster-RCNN [30], and DETR [31]. We also perform experiments under two sizes of the training set to better reflect the effectiveness of the semi-supervised foreign fiber detection algorithm in this paper: (1) The same 10% foreign fiber training set (336 labeled images) used in the Efficient YOLOv5-cotton experiment; (2) The entire foreign fiber training set (3360 labeled images). Similarly, we used multiple indicators for comparative evaluation, including [email protected] (mean average precision), parameter quantity, precision, and recall. The results of the comparative experiment are shown in Table 4.
It is not difficult to see that the model size of the Efficient YOLOv5-cotton trained in this paper is only 3.08 M, less than 8.6% of the model sizes of YOLOv5n trained on the 10% training set. There is a significant reduction compared to the model sizes of YOLOv3-tiny, YOLOv7, Faster RCNN, and DETR trained on the 10% training set. Moreover, the reduction in model size does not lead to a decrease in the mean average precision. Compared to the YOLOv3-tiny, YOLOv7, and Faster-RCNN models trained on the entire training set, the [email protected] of Efficient YOLOv5-cotton increases by 7.7%, 0.6%, and 5.3%, respectively. Even on the entire dataset, Efficient YOLOv5-cotton achieves the same [email protected] as DETR. However, it is slightly inferior to the [email protected] of YOLOv5n on the entire training set, but with a 51% reduction in the model size. On the same 10% labeled training set, our proposed method could surpass YOLOv3-tiny, YOLOv5n, YOLOv7, Faster-RCNN, and DETR in terms of [email protected] and model size. The model in this paper reduces the model size while taking into account the detection accuracy, and its detection accuracy is better than that of YOLOv3-tiny, YOLOv7, Faster-RCNN, and DETR. With a model size of only 3.08 M, it will be effective when deployed on mobile or embedded devices. The overall performance has obvious advantages compared to YOLOv3-tiny, YOLOv5, YOLOv7, Faster-RCNN, and DETR.

4. Conclusions

This study proposes a multiscale network called Efficient YOLOv5-cotton based on the Efficient Teacher framework. It addresses the labor-intensive labeling process in foreign fiber detection and the limitations of the original Efficient Teacher model. To enhance the detection of small-sized cotton foreign fibers against complex backgrounds such as plastic, polypropylene fibers, and cotton stalks, we introduce the CBAM into the network. Given the varying sizes of foreign fiber in detection scenarios, we replace the SPPF module in the backbone network with the SPPFCSPC module to achieve multiscale feature extraction. Additionally, we reduce the parameter count and computational complexity introduced by the SPPFCSPC module by replacing the C3 layer in the backbone network with the C3Ghost module. The experimental results on the foreign fiber detection dataset demonstrate that our approach strikes a balance between accuracy and lightweight design, exhibiting good robustness. In future work, we plan to explore even lighter-weight models and address efficiency concerns when deploying the model on mobile devices. Further, we aim to incorporate additional types of foreign fiber to achieve semi-supervised foreign fiber classification.

Author Contributions

Conceptualization, X.Z.; methodology, W.W.; software, W.W.; validation, X.Z.; formal analysis, Z.H.; investigation, Z.S.; resources, W.W.; data curation, Z.H.; writing—original draft preparation, X.Z.; writing—review and editing, X.Z.; visualization, Z.H.; supervision, X.Z.; project administration, Z.S.; funding acquisition, W.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data that support the findings of this study are available from the author, Xue Zhou, upon reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Ateeq-ur, R.; Bhatti, M.M.A.; Umar, U.-u.d.; Naqvi, S.A.H. Cotton Diseases and Disorders Under Changing Climate. In Cotton Production and Uses: Agronomy, Crop Protection, and Postharvest Technologies; Ahmad, S., Hasanuzzaman, M., Eds.; Springer: Singapore, 2020; pp. 271–282. [Google Scholar]
  2. Dai, M.; Dorjoy, M.M.H.; Miao, H.; Zhang, S. A New Pest Detection Method Based on Improved YOLOv5m. Insects 2023, 14, 54. [Google Scholar] [CrossRef] [PubMed]
  3. Yang, W.; Li, D.; Zhu, L.; Kang, Y.; Li, F. A new approach for image processing in foreign fiber detection. Comput. Electron. Agric. 2009, 68, 68–77. [Google Scholar] [CrossRef]
  4. Zhao, X.; Guo, X.; Luo, J.; Tan, X. Efficient detection method for foreign fibers in cotton. Inf. Process. Agric. 2018, 5, 320–328. [Google Scholar] [CrossRef]
  5. Li, Q.; Ma, W.; Li, H.; Zhang, X.; Zhang, R.; Zhou, W. Cotton-YOLO: Improved YOLOV7 for rapid detection of foreign fibers in seed cotton. Comput. Electron. Agric. 2024, 219, 108752. [Google Scholar] [CrossRef]
  6. Du, Y.; Dong, C.; Zhao, D.; Ren, W.; Cai, W. Application of improved Faster RCNN model for foreign fiber identification in cotton. Laser Optoelectron. Prog. 2020, 57, 121007. [Google Scholar]
  7. Wei, W.; Zhou, X.; Huang, Z.; Su, Z. Feature comparison residuals for foreign fibre classification model. IET Image Process. 2024, 18, 2179–2190. [Google Scholar] [CrossRef]
  8. Wang, R.; Zhang, Z.-F.; Yang, B.; Xi, H.-Q.; Zhai, Y.-S.; Zhang, R.-L.; Geng, L.-J.; Chen, Z.-Y.; Yang, K. Detection and Classification of Cotton Foreign Fibers Based on Polarization Imaging and Improved YOLOv5. Sensors 2023, 23, 4415. [Google Scholar] [CrossRef] [PubMed]
  9. Wei, W.; Zhang, C.; Deng, D. Content Estimation of Foreign Fibers in Cotton Based on Deep Learning. Electronics 2020, 9, 1795. [Google Scholar] [CrossRef]
  10. Merz, C.J.; Clair, D.S.; Bond, W.E. Semi-supervised adaptive resonance theory (smart2). In Proceedings of the [Proceedings 1992] IJCNN International Joint Conference on Neural Networks, Baltimore, MD, USA, 7–11 June 1992; pp. 851–856. [Google Scholar]
  11. Jeong, J.; Lee, S.; Kim, J.; Kwak, N. Consistency-based semi-supervised learning for object detection. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, Vancouver, BC, Canada, 8–14 December 2019; p. 965. [Google Scholar]
  12. Tarvainen, A.; Valpola, H. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; 2017; pp. 1195–1204. [Google Scholar]
  13. Liu, Y.-C.; Ma, C.-Y.; He, Z.; Kuo, C.-W.; Chen, K.; Zhang, P.; Wu, B.; Kira, Z.; Vajda, P. Unbiased teacher for semi-supervised object detection. arXiv 2021, arXiv:2102.09480. [Google Scholar]
  14. Lee, D.-H. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Proceedings of the Workshop on Challenges in Representation Learning (ICML), Atlanta, GA, USA, 20–21 June 2013; p. 896. [Google Scholar]
  15. Xie, Q.; Luong, M.-T.; Hovy, E.; Le, Q.V. Self-training with noisy student improves imagenet classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 10687–10698. [Google Scholar]
  16. Chen, B.; Li, P.; Chen, X.; Wang, B.; Zhang, L.; Hua, X.-S. Dense learning based semi-supervised object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022; pp. 4815–4824. [Google Scholar]
  17. Xu, B.; Chen, M.; Guan, W.; Hu, L. Efficient Teacher: Semi-Supervised Object Detection for YOLOv5. arXiv 2023, arXiv:2302.07577. [Google Scholar]
  18. Yan, J.; Zhou, Z.; Zhou, D.; Su, B.; Xuanyuan, Z.; Tang, J.; Lai, Y.; Chen, J.; Liang, W. Underwater object detection algorithm based on attention mechanism and cross-stage partial fast spatial pyramidal pooling. Front. Mar. Sci. 2022, 9, 1056300. [Google Scholar] [CrossRef]
  19. Wang, W.; Tan, X.; Zhang, P.; Wang, X. A CBAM Based Multiscale Transformer Fusion Approach for Remote Sensing Image Change Detection. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2022, 15, 6817–6825. [Google Scholar] [CrossRef]
  20. Han, K.; Wang, Y.; Tian, Q.; Guo, J.; Xu, C.; Xu, C. Ghostnet: More features from cheap operations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 1580–1589. [Google Scholar]
  21. Xu, J.; Yang, H.; Wan, Z.; Mu, H.; Qi, D.; Han, S. Wood Surface Defects Detection Based on the Improved YOLOv5-C3Ghost With SimAm Module. IEEE Access 2023, 11, 105281–105287. [Google Scholar] [CrossRef]
  22. Tong, Q.; Zhang, E.; Wu, S.; Xu, K.; Sun, C. A real-time detector of chicken healthy status based on modified YOLO. Signal Image Video Process. 2023, 17, 4199–4207. [Google Scholar] [CrossRef]
  23. Woo, S.; Park, J.; Lee, J.-Y.; Kweon, I.S. Cbam: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
  24. Lei, X.; Wen, X.; Li, Z. A multi-target cow face detection model in complex scenes. Vis. Comput. 2024. [Google Scholar] [CrossRef]
  25. Ma, Z.; Wan, Y.; Liu, J.; An, R.; Wu, L. A Kind of Water Surface Multi-Scale Object Detection Method Based on Improved YOLOv5 Network. Mathematics 2023, 11, 2936. [Google Scholar] [CrossRef]
  26. Wang, C.-Y.; Liao, H.-Y.M.; Wu, Y.-H.; Chen, P.-Y.; Hsieh, J.-W.; Yeh, I.-H. CSPNet: A new backbone that can enhance learning capability of CNN. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, Seattle, WA, USA, 14–19 June 2020; pp. 390–391. [Google Scholar]
  27. Zhang, S.; Che, S.; Liu, Z.; Zhang, X. A real-time and lightweight traffic sign detection method based on ghost-YOLO. Multimed. Tools Appl. 2023, 82, 26063–26087. [Google Scholar] [CrossRef]
  28. Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
  29. Zhang, Y.; Sun, Y.; Wang, Z.; Jiang, Y. YOLOv7-RAR for Urban Vehicle Detection. Sensors 2023, 23, 1801. [Google Scholar] [CrossRef] [PubMed]
  30. Girshick, R. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Santiago, Chile, 7–13 December 2015; pp. 1440–1448. [Google Scholar]
  31. Carion, N.; Massa, F.; Synnaeve, G.; Usunier, N.; Kirillov, A.; Zagoruyko, S. End-to-end object detection with transformers. In Proceedings of the European Conference on Computer Vision, Glasgow, UK, 23–28 August 2020; pp. 213–229. [Google Scholar]
Figure 1. Foreign Fiber Splitting Machine.
Figure 1. Foreign Fiber Splitting Machine.
Applsci 14 05246 g001
Figure 2. Data samples (the foreign fiber types are not divided and the same label, “large fiber”, is used).
Figure 2. Data samples (the foreign fiber types are not divided and the same label, “large fiber”, is used).
Applsci 14 05246 g002
Figure 3. Efficient YOLOv5-cotton foreign fiber detection using semi-supervised learning.
Figure 3. Efficient YOLOv5-cotton foreign fiber detection using semi-supervised learning.
Applsci 14 05246 g003
Figure 4. YOLOv5-cotton.
Figure 4. YOLOv5-cotton.
Applsci 14 05246 g004
Figure 5. Efficient YOLOv5-cotton foreign fiber detection model training process.
Figure 5. Efficient YOLOv5-cotton foreign fiber detection model training process.
Applsci 14 05246 g005
Figure 6. CBAM module: the input feature maps are successively weighted by the channel and spatial attention modules to obtain the output feature maps of CBAM.
Figure 6. CBAM module: the input feature maps are successively weighted by the channel and spatial attention modules to obtain the output feature maps of CBAM.
Applsci 14 05246 g006
Figure 7. Labeled large fiber samples.
Figure 7. Labeled large fiber samples.
Applsci 14 05246 g007aApplsci 14 05246 g007b
Figure 8. SPPFCSPC.
Figure 8. SPPFCSPC.
Applsci 14 05246 g008
Figure 9. C3Ghost module.
Figure 9. C3Ghost module.
Applsci 14 05246 g009aApplsci 14 05246 g009b
Figure 10. The training process diagram of Efficient YOLOv5-cotton vs. Efficient YOLOv5n.
Figure 10. The training process diagram of Efficient YOLOv5-cotton vs. Efficient YOLOv5n.
Applsci 14 05246 g010aApplsci 14 05246 g010b
Figure 11. The heat map of Efficient YOLOv5-cotton vs. Efficient YOLOv5n, where the red color represents the current thermal maximum region.
Figure 11. The heat map of Efficient YOLOv5-cotton vs. Efficient YOLOv5n, where the red color represents the current thermal maximum region.
Applsci 14 05246 g011aApplsci 14 05246 g011b
Table 1. The distribution of data.
Table 1. The distribution of data.
Each
Type
of
Object
DirtyPolypropylene
Filaments
PlasticCotton StalksCotton ThreadsTotal
Numbers of
images
Training
set
10%
labeled
images
14096382735336
100%
Labeled
images
14009603842643523360
Test set175120483344420
Val set175120483344420
Total175012004803304404200
Table 2. Parameters.
Table 2. Parameters.
TrainParametersValues
SUP (10% labeled images)size640
batch size16
epochs500
initial learning rate0.01
SSOD (90% unlabeled image)size640
batch size16
epochs300
initial learning rate0.01
EMA smoothing factor0.999
Table 3. Table of ablation experiments.
Table 3. Table of ablation experiments.
GroupsCBAMSPPFCSPCC3Ghost[email protected] (%)P (%)R (%)Params (M)
1 95.492.794.01.76
2 96.494.094.21.76
3 96.194.593.63.37
4 94.593.592.61.47
5 96.695.294.43.37
6 96.494.494.41.48
7 96.095.892.03.37
897.096.395.43.08
The tick indicates that this method is used.
Table 4. Table of comparative experiments.
Table 4. Table of comparative experiments.
DatasetNetwork Model[email protected] (%)Params (M)
Train on 336
labeled
pictures
YOLOv3-tiny79.416.63
YOLOv5n94.43.37
YOLOv776.471.34
Faster-RCNN77.6108.12
DETR95.1473.95
Train on
3360 labeled
pictures
YOLOv3-tiny89.316.63
YOLOv5n97.26.31
YOLOv796.471.34
Faster-RCNN91.3108.12
DETR97.0473.95
Train on 336
labeled pictures and 3024 unlabeled images
Efficient
YOLOv5-cotton
97.03.08
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

Zhou, X.; Wei, W.; Huang, Z.; Su, Z. Study on the Detection Mechanism of Multi-Class Foreign Fiber under Semi-Supervised Learning. Appl. Sci. 2024, 14, 5246. https://doi.org/10.3390/app14125246

AMA Style

Zhou X, Wei W, Huang Z, Su Z. Study on the Detection Mechanism of Multi-Class Foreign Fiber under Semi-Supervised Learning. Applied Sciences. 2024; 14(12):5246. https://doi.org/10.3390/app14125246

Chicago/Turabian Style

Zhou, Xue, Wei Wei, Zhen Huang, and Zhiwei Su. 2024. "Study on the Detection Mechanism of Multi-Class Foreign Fiber under Semi-Supervised Learning" Applied Sciences 14, no. 12: 5246. https://doi.org/10.3390/app14125246

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