Identification of the Big and Small Ends of Eggs by Developing a Novel Model with a Combination of RCSOSA and CSFCN Modules for Robot Packaging of Poultry Eggs
Abstract
1. Introduction
2. Materials and Methods
2.1. Data Acquisition System and Samples
2.2. Egg Surface Uneven Brightness Correction
2.2.1. Contrast Stretching and Image Annotation
2.2.2. U-Net
2.2.3. Mask with the Original Image Fusion
2.2.4. Dataset Expansion
2.3. Optimization of Big and Small Ends of the Egg Recognition Precision
2.3.1. RCS-OSA Module
2.3.2. EUCB Module
2.3.3. CSFCN Module
2.4. Model Parameters and Evaluation Metrics
2.4.1. Model Parameters
2.4.2. Evaluation Indicators
3. Results and Discussion
3.1. The Advantages and Effects of Image Brightness Correction
3.2. Analysis of Model Recognition Performance and Category Detection Results
3.3. Analysis of Performance Changes in the Three-Module Combined Model
3.4. Analysis of Model Complexity and Reasoning Efficiency
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
| CSFCN12 | YOLOv12 + CSFCN |
| EUCB12 | YOLOv12 + EUCB |
| EUCS12 | YOLOv12 + EUCB + CSFCN |
| RCCS12 | YOLOv12 + A2C2f_RCSOSA + CSFCN |
| RCEU12 | YOLOv12 + A2C2f_RCSOSA + EUCB |
| RCEUCS12 | YOLOv12 + A2C2f_RCSOSA + EUCB + CSFCN |
| RCSOSA12 | YOLOv12 + A2C2f_RCSOSA |
| RepVitASF12 | YOLOv12 + RepVit + ASF |
References
- Huang, Y.; Yang, P.; Li, S.; Fan, J.; Liu, J. Effects of laying methods on physical properties of eggs during storage. Heilongjiang Anim. Sci. Vet. Med. 2018, 6, 62–64. [Google Scholar] [CrossRef]
- Vitezslav, O.; Frantisek, M. The Influence of the Position of the Eggs Upon Their Interior Quality. Poult. Sci. 1956, 35, 1381–1384. [Google Scholar] [CrossRef] [Scilit]
- Wang, W.; He, C.; Tang, L.; Ren, Z. Total variation based variational model for the uneven illumination correction. Neurocomputing 2018, 281, 106–120. [Google Scholar] [CrossRef] [Scilit]
- Li, J.; Wei, Z.; Song, Y.; Chen, S.; Yu, M.; Wang, W.; Chen, Y. A Multi-Scale Fusion-Based Method for Ultra-Low-Light Agricultural Image Enhancement. Teh. Vjesn. 2025, 32, 2407–2419. [Google Scholar] [CrossRef] [Scilit]
- Severoglu, N.; Demir, Y.; Kaplan, N.; Kucuk, S. ACGC: Adaptive chrominance gamma correction for low-light image enhancement. J. Vis. Commun. Image Represent. 2025, 107, 104402. [Google Scholar] [CrossRef] [Scilit]
- Li, H. Low-light color image equalization based on adaptive brightness adjustment. Sci. Rep. 2025, 16, 1644. [Google Scholar] [CrossRef] [Scilit]
- Chen, G.; Liu, Y.; Yang, H.; Sun, B.; Yu, C. Adaptive brightness correction of dim-lightening color images. Opt. Precis. Eng. 2021, 29, 1999–2007. [Google Scholar] [CrossRef] [Scilit]
- Lv, J.; Fang, M.; Yao, Q.; Wu, C.; He, Y.; Bian, L.; Zhong, X. Detection model for tea buds based on region brightness adaptive correction. Trans. Chin. Soc. Agric. Eng. 2021, 37, 278–285. [Google Scholar]
- Wang, D.; Wang, J.; Xu, Z.; Liu, Y. Adaptive correction algorithm for non-uniform illumination images. Syst. Eng. Electron. 2017, 39, 1383–1390. [Google Scholar]
- Jia, F.; Wong, H.; Wang, T.; Zeng, T. A reflectance re-weighted Retinex model for non-uniform and low-light image enhancement. Pattern Recognit. 2023, 144, 109823. [Google Scholar] [CrossRef] [Scilit]
- Tian, Q.; Cohen, L. A variational-based fusion model for non-uniform illumination image enhancement via contrast optimization and color correction. Signal Process. 2018, 153, 210–220. [Google Scholar] [CrossRef] [Scilit]
- Wang, J.; Wang, X.; Zhang, P.; Xie, S.; Fu, S.; Li, Y.; Han, H. Correction of uneven illumination in color microscopic image based on fully convolutional network. Opt. Express 2021, 29, 28503–28520. [Google Scholar] [CrossRef] [Scilit]
- Wang, Q.; Liu, Y.; Hu, S.; Yan, Y.; Li, B.; Mao, H. Dynamic gamma correction-guided CNN for low-light corn tassel enhancement in intelligent detasselling systems. Comput. Electron. Agric. 2026, 244, 111436. [Google Scholar] [CrossRef] [Scilit]
- Jiang, Y.; Gong, X.; Liu, D.; Cheng, Y.; Fang, C.; Shen, X.; Wang, Z. EnlightenGAN: Deep Light Enhancement Without Paired Supervision. IEEE Trans. Image Process. 2021, 30, 2340–2349. [Google Scholar] [CrossRef] [Scilit]
- Fan, J.; Li, J.; Ren, L.; Chen, Z. Multi-scale dynamic fusion for correcting uneven illumination images. J. Vis. Commun. Image Represent. 2023, 97, 103978. [Google Scholar] [CrossRef] [Scilit]
- Lin, F.; Zhang, H.; Wang, J.; Wang, J. Unsupervised image enhancement under non-uniform illumination based on paired CNNs. Neural Netw. 2023, 170, 202–214. [Google Scholar] [CrossRef] [Scilit]
- Serdar, Ç. Adaptive Multi-Branch Feature Fusion for Low-Light Image Enhancement. Appl. Sci. 2026, 16, 2712. [Google Scholar] [CrossRef] [Scilit]
- Zhang, F.; Liu, X.; Gao, C.; Sang, N. Color and Luminance Separated Enhancement for Low-Light Images with Brightness Guidance. Sensors 2024, 24, 2711. [Google Scholar] [CrossRef] [Scilit]
- Chao, K.; Song, W.; Shao, S.; Liu, D.; Liu, X.; Zhao, X. CUI-Net: A correcting uneven illumination net for low-light image enhancement. Sci. Rep. 2023, 13, 12894. [Google Scholar] [CrossRef] [Scilit]
- Qiu, Y.; Niu, S.; Niu, T.; Li, W.; Li, B. Joint-Prior-Based Uneven Illumination Image Enhancement for Surface Defect Detection. Symmetry 2022, 14, 1473. [Google Scholar] [CrossRef] [Scilit]
- Lei, C.; Tian, Q. Low-Light Image Enhancement Algorithm Based on Deep Learning and Retinex Theory. Appl. Sci. 2023, 13, 10336. [Google Scholar] [CrossRef] [Scilit]
- Huang, W.; Li, K.; Xu, M.; Huang, R. Self-Supervised Non-Uniform Low-Light Image Enhancement Combining Image Inversion and Exposure Fusion. Electronics 2023, 12, 4445. [Google Scholar] [CrossRef] [Scilit]
- Jing, J.; Liu, S.; Wang, G.; Zhang, W.; Sun, C. Recent advances on image edge detection: A comprehensive review. Neurocomputing 2022, 503, 259–271. [Google Scholar] [CrossRef] [Scilit]
- Fang, X.; Zhang, S. Learning Local Contrast for Crisp Edge Detection. J. Comput. Sci. Technol. 2023, 38, 554–566. [Google Scholar] [CrossRef] [Scilit]
- Zhou, J.; Zhao, H.; Sun, M. SEHSNet: Stage Enhancement and Hierarchical Supervision Network for edge detection. Vis. Comput. 2024, 40, 7439–7456. [Google Scholar] [CrossRef] [Scilit]
- Wang, H.; Liu, P.; Dou, Q.; Song, Y.; Luo, M.; Han, R.; Zhang, B. Enhanced edge detection via Dual-branch attention fusion with Canny-assisted supervision. Vis. Comput. 2025, 41, 9765–9780. [Google Scholar] [CrossRef] [Scilit]
- Cai, P.; Cai, Z.; Fan, Y.; Wu, W. Image Contour Detection Based on Visual Pathway Information Transfer Mechanism. Neural Process. Lett. 2024, 56, 11063. [Google Scholar] [CrossRef] [Scilit]
- Wang, J.; Xu, Q.; Jiang, B.; Luo, B.; Tang, J. Multi-Granularity Part Sampling Attention for Fine-Grained Visual Classification. IEEE Trans. Image Process. 2024, 33, 4529–4542. [Google Scholar] [CrossRef] [Scilit]
- Liu, X.; Zhang, L.; Li, T.; Wang, D.; Wang, Z. Dual attention guided multi-scale CNN for fine-grained image classification. Inf. Sci. 2021, 573, 37–45. [Google Scholar] [CrossRef] [Scilit]
- Lu, J.; Zhang, W.; Zhao, Y.; Sun, C. Image local structure information learning for fine-grained visual classification. Sci. Rep. 2022, 12, 19205. [Google Scholar] [CrossRef] [Scilit]
- Liu, D.; Zhao, L.; Wang, Y.; Kato, J. Learn from each other to Classify better: Cross-layer mutual attention learning for fine-grained visual classification. Pattern Recognit. 2023, 140, 109550. [Google Scholar] [CrossRef] [Scilit]
- Yu, Y.; Wang, J. Hybrid Granularities Transformer for Fine-Grained Image Recognition. Entropy 2023, 25, 601. [Google Scholar] [CrossRef] [Scilit]
- Russell, B.; Torralba, A.; Murphy, K.P.; Freeman, W.T. LabelMe: A database and web-based tool for image annotation. Int. J. Comput. Vis. 2008, 77, 157–173. [Google Scholar] [CrossRef] [Scilit]
- Tian, Y.; Ye, Q.; Doermann, D. YOLOv12: Attention-centric real-time object detectors. arXiv 2025, 2502:12524. [Google Scholar]
- Li, X.; Chen, L.; Zhou, S.; Zhang, Y.; Li, J. RepVitASF12: A network of ViT and attention scale sequence modules to identify the big and small ends of eggs. Inf. Process. Agric. 2026, in press. [Google Scholar] [CrossRef] [Scilit]









| Models | Precision/% | Recall/% | mAP@0.5/% | mAP@0.5:0.95/% |
|---|---|---|---|---|
| YOLOv12 [34] | 94.7 | 89.8 | 98.0 | 65.9 |
| RepVitASF12 [35] | 95.0 | 98.3 | 99.2 | 70.5 |
| RCSOSA12 | 98.0 | 98.7 | 99.3 | 70.2 |
| EUCB12 | 94.0 | 98.1 | 98.9 | 68.2 |
| CSFCN12 | 98.9 | 99.0 | 99.4 | 72.2 |
| RCEU12 | 96.4 | 96.6 | 99.2 | 69.1 |
| RCCS12 | 99.5 | 99.4 | 99.5 | 71.7 |
| EUCS12 | 95.8 | 95.4 | 99.2 | 71.5 |
| RCEUCS12 | 99.1 | 99.4 | 99.5 | 70.9 |
| Models | Types | Precision/% | Recall/% | mAP@0.5/% | mAP@0.5:0.95/% |
|---|---|---|---|---|---|
| YOLOv12 | SGE | 98.0 | 81.1 | 98.3 | 65.5 |
| BGE | 97.7 | 100.0 | 99.5 | 65.2 | |
| SRE | 87.1 | 100.0 | 98.7 | 69.7 | |
| BRE | 85.4 | 98.3 | 97.4 | 62.0 | |
| SWE | 100.0 | 83.0 | 98.1 | 68.4 | |
| BWE | 100.0 | 76.4 | 96.3 | 64.7 | |
| RepVitASF12 | SGE | 98.5 | 100.0 | 99.5 | 69.7 |
| BGE | 98.7 | 100.0 | 99.5 | 71.5 | |
| SRE | 86.2 | 98.3 | 98.5 | 72.9 | |
| BRE | 86.7 | 98.3 | 98.8 | 64.0 | |
| SWE | 100.0 | 95.2 | 99.5 | 74.5 | |
| BWE | 100.0 | 98.0 | 99.5 | 70.3 | |
| RCSOSA12 | SGE | 98.0 | 100.0 | 99.5 | 70.1 |
| BGE | 99.2 | 100.0 | 99.5 | 69.5 | |
| SRE | 92.7 | 98.3 | 99.1 | 72.1 | |
| BRE | 98.3 | 97.9 | 99.2 | 67.7 | |
| SWE | 100.0 | 98.3 | 99.4 | 71.2 | |
| BWE | 100.0 | 97.9 | 99.4 | 70.6 | |
| EUCB12 | SGE | 96.6 | 98.3 | 98.7 | 68.2 |
| BGE | 96.1 | 100.0 | 99.5 | 67.3 | |
| SRE | 85.9 | 98.3 | 97.9 | 71.1 | |
| BRE | 89.0 | 98.3 | 98.5 | 62.5 | |
| SWE | 98.3 | 97.5 | 99.3 | 72.5 | |
| BWE | 98.3 | 96.1 | 99.3 | 67.7 | |
| CSFCN12 | SGE | 99.6 | 100.0 | 99.5 | 70.5 |
| BGE | 99.6 | 100.0 | 99.5 | 73.6 | |
| SRE | 96.4 | 98.3 | 99.3 | 75.9 | |
| BRE | 97.8 | 98.3 | 99.3 | 66.2 | |
| SWE | 100.0 | 97.2 | 99.5 | 76.4 | |
| BWE | 99.9 | 100.0 | 99.5 | 70.8 | |
| RCEU12 | SGE | 99.2 | 100.0 | 99.5 | 68.2 |
| BGE | 99.3 | 100.0 | 99.5 | 68.0 | |
| SRE | 86.4 | 98.3 | 98.6 | 72.2 | |
| BRE | 95.3 | 98.3 | 99.2 | 65.2 | |
| SWE | 100.0 | 90.1 | 99.3 | 72.5 | |
| BWE | 98.2 | 93.1 | 99.3 | 68.8 | |
| RCCS12 | SGE | 99.9 | 100.0 | 99.5 | 72.1 |
| BGE | 99.6 | 100.0 | 99.5 | 71.2 | |
| SRE | 98.8 | 98.3 | 99.4 | 74.4 | |
| BRE | 99.0 | 98.3 | 99.5 | 64.9 | |
| SWE | 100.0 | 100.0 | 99.5 | 75.6 | |
| BWE | 99.6 | 100.0 | 99.5 | 72.3 | |
| EUCS12 | SGE | 99.9 | 100.0 | 99.5 | 71.9 |
| BGE | 99.6 | 100.0 | 99.5 | 72.4 | |
| SRE | 85.2 | 98.3 | 98.3 | 73.3 | |
| BRE | 90.0 | 98.3 | 98.7 | 65.3 | |
| SWE | 100.0 | 85.2 | 99.5 | 75.6 | |
| BWE | 100.0 | 90.5 | 99.5 | 70.4 | |
| RCEUCS12 | SGE | 99.7 | 100.0 | 99.5 | 71.3 |
| BGE | 99.6 | 100.0 | 99.5 | 71.2 | |
| SRE | 97.3 | 98.3 | 99.3 | 72.3 | |
| BRE | 98.4 | 99.5 | 99.5 | 66.3 | |
| SWE | 100.0 | 98.8 | 99.5 | 73.5 | |
| BWE | 99.9 | 100.0 | 99.5 | 70.5 |
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. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Li, X.; Chen, L.; Shi, X.; Yang, W.; Zhang, Y.; Tian, S.; Ning, S.; Li, J. Identification of the Big and Small Ends of Eggs by Developing a Novel Model with a Combination of RCSOSA and CSFCN Modules for Robot Packaging of Poultry Eggs. Agriculture 2026, 16, 2003. https://doi.org/10.3390/agriculture16182003
Li X, Chen L, Shi X, Yang W, Zhang Y, Tian S, Ning S, Li J. Identification of the Big and Small Ends of Eggs by Developing a Novel Model with a Combination of RCSOSA and CSFCN Modules for Robot Packaging of Poultry Eggs. Agriculture. 2026; 16(18):2003. https://doi.org/10.3390/agriculture16182003
Chicago/Turabian StyleLi, Xin, Liping Chen, Xiaoyi Shi, Wanxia Yang, Yizhi Zhang, Shuo Tian, Shuaiying Ning, and Jiangbo Li. 2026. "Identification of the Big and Small Ends of Eggs by Developing a Novel Model with a Combination of RCSOSA and CSFCN Modules for Robot Packaging of Poultry Eggs" Agriculture 16, no. 18: 2003. https://doi.org/10.3390/agriculture16182003
APA StyleLi, X., Chen, L., Shi, X., Yang, W., Zhang, Y., Tian, S., Ning, S., & Li, J. (2026). Identification of the Big and Small Ends of Eggs by Developing a Novel Model with a Combination of RCSOSA and CSFCN Modules for Robot Packaging of Poultry Eggs. Agriculture, 16(18), 2003. https://doi.org/10.3390/agriculture16182003

