Improving the Boundary Recognition Performance of Visual Elements on Product Packaging by Integrating the Image Segmentation Mechanism of SAM-Adapter
Main Article Content
Abstract
Accurate boundary recognition under high-noise, complex-texture, and reflective conditions remains a fundamental challenge for intelligent visual perception systems and is equally important for electromagnetic imaging and radar-based target analysis that require reliable feature localization. This study presents a boundary-aware segmentation framework by integrating a gradient-guided Adapter mechanism into the Segment Anything Model (SAM). Pixel-level boundary response maps generated by the Laplacian of Gaussian operator are combined with gradient magnitude and directional sensitivity weights to guide adaptive feature calibration, while boundary-aware cross-entropy loss and Hausdorff distance constraints jointly optimize parameter learning and geometric consistency. The proposed strategy enhances multi-scale boundary representation without sacrificing the lightweight characteristics of Adapter-based fine-tuning. Experimental results demonstrate that the method achieves a Boundary Intersection over Union (BIoU) of 0.923 under 20% noise interference and maintains a contour F1 score of 0.951 under 20% reflectivity, significantly outperforming existing comparison methods in boundary continuity and localization accuracy. The framework provides an effective solution for high-precision image segmentation and offers potential value for electromagnetic imaging, microwave sensing, and intelligent perception systems requiring robust boundary extraction under complex interference conditions.
Downloads
Article Details

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).
References
T. Abekoon, B. Buthpitiya, H. Sajindra, E. R. J. Samarakoon, J. A. D. C. A. Jayakody, K. Kantamaneni, et al., “A comprehensive review to evaluate the synergy of intelligent food packaging with modern food technology and artificial intelligence field,” Discover Sustainability, vol. 5, no. 1, pp. 160-180, 2024, doi: 10.1007/s43621-024-00371-7.
S. Liu and Z. Yu, “Modeling and efficiency analysis of blockchain agriculture products E-commerce cold chain traceability system based on Petri net,” Heliyon, vol. 9, no. 11, Art. no. e21302-e21317, 2023, doi: 10.1016/j.heliyon.2023.e21302.
T. Guan and L. Wang, “Computer-Aided Optimization Design of Intelligent Commodity Packaging Based on Generative Adversarial Network,” Computer-Aided Design and Applications, vol. 21, no. S3, pp. 107-120, 2023, doi: 10.14733/cadaps.2024.S3.107-120.
D. Zhou and M. Miao, “Research on cloud anti-counterfeiting product packaging design based on internet of things,” International Journal of Internet Manufacturing and Services, vol. 10, no. 1, pp. 60-76, 2024, doi: 10.1504/IJIMS.2024.136718.
C. Zhang, M. Han, J. Jia, and C. Kim, “Packaging Design Image Segmentation Based on Improved Full Convolutional Networks,” Applied Sciences, vol. 14, no. 22, pp. 10742-10759, 2024, doi: 10.3390/app142210742.
M. M. Rahman, S. Rahman, S. Bhatt, and M. Faezipour, “A Systematic Review on Advancement of Image Segmentation Techniques for Fault Detection Opportunities and Challenges,” Electronics, vol. 14, no. 5, pp. 974-996, 2025, doi: 10.3390/electronics14050974.
G. Wang, Z. Li, G. Weng, and Y. Chen, “An overview of industrial image segmentation using deep learning models,” Intelligence & Robotics, vol. 5, no. 1, pp. 143-180, 2025, doi: 10.20517/ir.2025.09.
U. Ulusoy, “A review of particle shape effects on material properties for various engineering applications: from macro to nanoscale,” Minerals, vol. 13, no. 1, pp. 91-171, 2023, doi: 10.3390/min13010091.
J. Liu, S. Liu, W. Zhou, H. Ren, W. Zhao, and Z. Li, “Zero-Reference Depth Curve Estimation-Based Low-Light Image Enhancement Method for Coating Workshop Inspection,” Coatings, vol. 15, no. 4, pp. 478-495, 2025, doi: 10.3390/coatings15040478.
A. Sonavale, M. Chakkaravarthy, S. Srinivasa Rao, H. B. M. Salleh, and J. Jadhav, “Automatic Semantic Segmentation and Classification of Remote Sensing Image Data for Flood Detection Using Novel LSTM Neural Network,” SN Computer Science, vol. 5, no. 8, pp. 992, 2024, doi: 10.1007/s42979-024-03336-9.
Y. Gong, M. Liu, X. Wang, C. Liu, and J. Hu, “Research on surface defects detection method and system in manufacturing processes based on the fusion of multi-scale features and semantic segmentation for intelligent manufacturing,” Journal of Intelligent & Fuzzy Systems, vol. 44, no. 4, pp. 6463-6481, 2023, doi: 10.3233/JIFS-223041.
V. Guimaraes, J. Nascimento, P. Viana, and P. Carvalho, “A review of recent advances and challenges in grocery label detection and recognition,” Applied Sciences, vol. 13, no. 5, pp. 2871-2908, 2023, doi: 10.3390/app13052871.
G. Duan, S. Zhang, Y. Shang, Y. Shao, and Y. Han, “Research on a Multi-Type Barcode Defect Detection Model Based on Machine Vision,” Applied Sciences, vol. 15, no. 15, pp. 8176-8196, 2025, doi: 10.3390/app15158176.
M. Abbasi, P. Vaz, J. Silva, and P. Martins, “Enhancing visual perception in immersive VR and AR environments: AI-driven color and clarity adjustments under dynamic lighting conditions,” Technologies, vol. 12, no. 11, pp. 216-230, 2024, doi: 10.3390/technologies12110216.
T. Kar, P. Kanungo, S. N. Mohanty, S. Groppe, and J. Groppe, “Video shot-boundary detection: Issues, challenges and solutions,” Artificial Intelligence Review, vol. 57, no. 4, pp. 104-141, 2024, doi: 10.1007/s10462-024-10742-1.
Y. Jiang, J. Chen, and J. Lu, “Leveraging Vision Foundation Model via PConv-Based Fine-Tuning with Automated Prompter for Defect Segmentation,” Sensors, vol. 25, no. 8, pp. 2417-2438, 2025, doi: 10.3390/s25082417.
X. Lin, X. Huang, and L. Wang, “Underwater object detection method based on learnable query recall mechanism and lightweight adapter,” PLOS One, vol. 19, no. 2, Art. no. e0298739-e0298755, 2024, doi: 10.1371/journal.pone.0298739.
Y. Lin, T. Fan, and C. Fang, “A Classification and Segmentation Model for Diamond Abrasive Grains Based on Improved Swin-Unet-SAM,” Electronics, vol. 13, no. 21, pp. 4213-4231, 2024, doi: 10.3390/electronics13214213.
Z. Zhou, W. Li, Y. Wang, H. Liu, and N. Wu, “A Feasible Domain Segmentation Algorithm for Unmanned Vessels Based on Coordinate-Aware Multi-Scale Features,” Journal of Marine Science and Engineering, vol. 13, no. 8, pp. 1387-1407, 2025, doi: 10.3390/jmse13081387.
A. A. Almazroey, S. kammoun Jarraya, and R. Alnanih, “SAM for Road Object Segmentation: Promising but Challenging,” Journal of Imaging, vol. 11, no. 6, pp. 189-219, 2025, doi: 10.3390/jimaging11060189.
A. Xie, Q. Lin, Y. He, X. Zeng, Y. Cao, Z. Man, et al., “Metastasis lesion segmentation from bone scintigrams using encoder-decoder architecture model with multi-attention and multi-scale learning,” Quantitative Imaging in Medicine and Surgery, vol. 15, no. 1, pp. 689-708, 2024, doi: 10.21037/qims-24-1246.
H. Chen, S. Zhou, K. Li, J. Yin, and J. Huang, “A Hybrid Framework for Referring Image Segmentation: Dual-Decoder Model with SAM Complementation,” Mathematics, vol. 12, no. 19, pp. 3061-3081, 2024, doi: 10.3390/math12193061.
K. Yuan, X. Li, Y. Ren, L. Zhang, W. Liu, and E. Li, “MSFE-Net: Multi-Scale Feature Enhancement Network for Remote Sensing Object Detection,” Applied Artificial Intelligence, vol. 39, no. 1, pp. 2514324-2514360, 2025, doi: 10.1080/08839514.2025.2514324.
X. Zhang, C. Zhao, W. Lu, and K. Liang, “Load Equipment Segmentation and Assessment Method Based on Multi-Source Tensor Feature Fusion,” Electronics, vol. 14, no. 5, pp. 1040-1063, 2025, doi: 10.3390/electronics14051040.
J. Xiao, T. Chen, X. Hu, G. Zhang, and S. Wang, “Boundary-guided context-aware network for camouflaged object detection,” Neural Computing and Applications, vol. 35, no. 20, pp. 15075-15093, 2023, doi: 10.1007/s00521-023-08502-3.
J. Shi, G. Chen, and Y. Chen, “Enhanced boundary perception and streamlined instance segmentation,” Scientific Reports, vol. 15, no. 1, pp. 23612-23634, 2025, doi: 10.1038/s41598-025-09139-z.
M. Tang, M. Ling, J. Tang, and J. Hu, “A micro-expression recognition algorithm based on feature enhancement and attention mechanisms,” Virtual Reality, vol. 27, no. 3, pp. 2405-2416, 2023, doi: 10.1007/s10055-023-00808-w.
L. Yang, Y. Gu, and H. Feng, “Multi-scale feature fusion and feature calibration with edge information enhancement for remote sensing object detection,” Scientific Reports, vol. 15, no. 1, pp. 15371-15392, 2025, doi: 10.1038/s41598-025-99835-7.
J. Q. Wang, T. Chen, L. Zheng, J. Tie, Y. Zhang, P. Chen, et al., “A multi-scale remote sensing semantic segmentation model with boundary enhancement based on UNetFormer,” Scientific Reports, vol. 15, no. 1, pp. 1-19, 2025, doi: 10.1038/s41598-025-99663-9.
J. Wang, N. Ding, and G. He, “A boundary enhancement loss function for semantic segmentation of land cover,” International Journal of Remote Sensing, vol. 44, no. 12, pp. 3637-3659, 2023, doi: 10.1080/01431161.2023.2224101.
I. Ahmad, F. Shang, M. S. Pathan, A. Wajahat, and Y. S. Kim, “Dual-stream hybrid architecture with adaptive multiscale boundary-aware mechanisms for robust urban change detection in smart cities,” Scientific Reports, vol. 15, no. 1, pp. 30729-30749, 2025, doi: 10.1038/s41598-025-16148-5.
M. Li, Y. Liu, D. Chen, L. Chen, and S. Liu, “Transformer with difference convolutional network for lightweight universal boundary detection,” PLOS One, vol. 19, no. 4, Art. no. e0302275-e0302301, 2024, doi: 10.1371/journal.pone.0302275.
K. Lange, “Computation of the Hausdorff distance between two compact convex sets,” Algorithms, vol. 16, no. 10, pp. 471-488, 2023, doi: 10.3390/a16100471.
Y. Wang, X. Jing, Y. Xu, L. Cui, Q. Zhang, and H. Li, “Geometry-guided semantic segmentation for post-earthquake buildings using optical remote sensing images,” Earthquake Engineering & Structural Dynamics, vol. 52, no. 11, pp. 3392-3413, 2023, doi: 10.1002/eqe.3966.
M. E. Omati and F. T. Mahmoudi, “Efficiency analysis of ITN loss function for deep semantic building segmentation,” Earth Science Informatics, vol. 17, no. 3, pp. 2011-2025, 2024, doi: 10.1007/s12145-024-01267-w.