Abstract
In anchor-based object detection algorithms, achieving a balance between positive and negative samples during training is crucial. Many improved sampling methods have been proposed to address this issue. In our work, we propose an edge-detection guided balanced sampling (EBS) method that introduces edge and contour information from objects to guide the sampling of candidate negative samples and increase the number of hard negative samples to improve sample balance. The EBS method employs a Gaussian filter convolution on the binary image in HSV space to reduce local corner information, and furtherly applies K-means++ clustering to the bounding boxes to reduce redundancy. In the hard negative sample sampling stage of anchor-based detection algorithms, the EBS model selects negative samples with higher IoU values with GT from both the normal candidate negative sample set and the special candidate negative sample set. The latter set contains more hard negative samples, which further improves the sample balance. We conducted comparison experiments using random sampling (RS) and IoU-balanced sampling (IBS) in the RPN network on MSCOCO-2017. Our EBS method achieved a 1.7-point higher higher \(AR_{1000}\) than PRN. In particular, the proposed algorithm performs better on the small-target dataset, which achieves 2.4-point higher \(AR_{S}\) than RPN. The inference fps of RPN and EBS are 22.3 and 22.4, respectively.
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11063-023-11342-w/MediaObjects/11063_2023_11342_Fig1_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11063-023-11342-w/MediaObjects/11063_2023_11342_Fig2_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11063-023-11342-w/MediaObjects/11063_2023_11342_Fig3_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11063-023-11342-w/MediaObjects/11063_2023_11342_Fig4_HTML.png)
Similar content being viewed by others
References
Pang J, Chen K, Shi J, Feng H, Ouyang W, Lin D (2019) Libra r-cnn: towards balanced learning for object detection. In: 2019 IEEE/CVF conference on computer vision and pattern recognition (CVPR), pp 821–830. https://doi.org/10.1109/CVPR.2019.00091
Wang X, Zhang R, Zhang Z (2022) A novel hybrid sampling method ESMOTE+SSLM for handling the problem of class imbalance with overlap in financial distress detection. Neural Process Lett. https://doi.org/10.1007/s11063-022-10998-0
Zeng F, Chen N, Yang D, Meng Z (2022) Simplified-boosting ensemble convolutional network for text classification. Neural Process Lett. https://doi.org/10.1007/s11063-022-10843-4
Hazarika BB, Gupta D (2022) Density weighted twin support vector machines for binary class imbalance learning. Neural Process Lett 54(2):1091–1130. https://doi.org/10.1007/s11063-021-10671-y
Zhou W, Lian C, Zeng Z, Xu B, Su Y (2021) Improve semi-supervised learning with metric learning clusters and auxiliary fake samples. Neural Process Lett 53:3427–3443. https://doi.org/10.1007/s11063-021-10556-0
Li W, Huang F, Li X, Pan G, Wu F (2019) State distribution-aware sampling for deep q-learning. Neural Process Lett 50:1649–1660. https://doi.org/10.1007/s11063-018-9944-z
Peng C, Liao B (2022) Heavy-head sampling for fast imitation learning of machine learning based combinatorial auction solver. Neural Process Lett. https://doi.org/10.1007/s11063-022-10900-y
Zhu Y, Tan M, Wei J (2022) Robust multi-view classification with sample constraints. Neural Process Lett 54:2589–2612. https://doi.org/10.1007/s11063-021-10483-0
Yang Z, Zhu Y, Liu T, Zhao S, Tao D (2020) Output layer multiplication for class imbalance problem in convolutional neural networks. Neural Process Lett 52:2637–2653. https://doi.org/10.1007/s11063-020-10366-w
Zhao G, Wu Y (2019) Efficient large margin-based feature extraction. Neural Process Lett 50:1257–1279. https://doi.org/10.1007/s11063-018-9920-7
Wang J, Tian L (2019) Stability of inertial neural network with time-varying delays via sampled-data control. Neural Process Lett 50:1123–1138. https://doi.org/10.1007/s11063-018-9905-6
Sanz J, Andina D (2002) Importance sampling and mean-square error in neural detector training. Neural Process Lett 9:259–276. https://doi.org/10.1023/A:1021766820005
Sanz-González J, Andina D (1999) Performance analysis of neural network detectors by importance sampling techniques. Neural Process Lett 9:257–269. https://doi.org/10.1023/A:1018612207016
Gonzalez AI, Graña M, D’Anjou A, Cottrell F (1997) A sensitivity analysis of the self organizing maps as an adaptive one-pass non-stationary clustering algorithm: the case of color quantization of image sequences. Neural Process Lett 6:77–89. https://doi.org/10.1023/A:1009663723152
Jiang F, Zhu Q, Tian T (2022) Breast cancer detection based on modified Harris Hawks optimization and extreme learning machine embedded with feature weighting. Neural Process Lett. https://doi.org/10.1007/s11063-021-10700-w
Basnet J, Alsadoon A, Prasad P, Aloussi SA, Alsadoon OH (2020) A novel solution of using deep learning for white blood cells classification: enhanced loss function with regularization and weighted loss (ELFRWL). Neural Process Lett 52:1517–1553. https://doi.org/10.1007/s11063-020-10321-9
Liu Z, Pu J, Xu M, Qiu Y (2015) Face recognition via weighted two phase test sample sparse representation. Neural Process Lett 41:43–53. https://doi.org/10.1007/s11063-013-9333-6
Shrivastava A, Gupta A, Girshick R (2016) Training region-based object detectors with online hard example mining. In: 2016 IEEE conference on computer vision and pattern recognition (CVPR), pp 761–769. https://doi.org/10.1109/CVPR.2016.89
Wang X, Gupta A (2015) Unsupervised learning of visual representations using videos. In: 2015 IEEE international conference on computer vision (ICCV), pp 2794–2802. https://doi.org/10.1109/ICCV.2015.320
Yin J, Xia P, He J (2019) Online hard region mining for semantic segmentation. Neural Process Lett 50:2665–2679. https://doi.org/10.1007/s11063-019-10047-3
Lin T-Y, Goyal P, Girshick R, He K, Dollár P (2020) Focal loss for dense object detection. IEEE Trans Pattern Anal Mach Intell 42(2):318–327. https://doi.org/10.1109/TPAMI.2018.2858826
Cui Y, Jia M, Lin T-Y, Song Y, Belongie S (2019) Class-balanced loss based on effective number of samples. In: 2019 IEEE/CVF conference on computer vision and pattern recognition (CVPR), pp 9260–9269. https://doi.org/10.1109/CVPR.2019.00949
Li Y, Wang T, Kang B, Tang S, Wang C, Li J, Feng J (2020) Overcoming classifier imbalance for long-tail object detection with balanced group softmax. In: 2020 IEEE/CVF conference on computer vision and pattern recognition (CVPR), pp 10988–10997. https://doi.org/10.1109/CVPR42600.2020.01100
Wang X, Wang H, Zhang C, He Q, Huo L (2022) A sample balance-based regression module for object detection in construction sites. Appl Sci 12(13):6752. https://doi.org/10.3390/app12136752
Huang C, Ding Y, Xu H, Jiao Y, Chen S (2023) An improved class-balanced training sample assignment method for object detection. In: Ninth symposium on novel photoelectronic detection technology and applications, vol. 12617, pp 1044–1049. https://doi.org/10.1117/12.2666120. SPIE
Oksuz K, Cam BC, Kalkan S, Akbas E (2021) Imbalance problems in object detection: a review. IEEE Trans Pattern Anal Mach Intell 43(10):3388–3415. https://doi.org/10.1109/TPAMI.2020.2981890
Malhotra R, Lata K (2023) Analysis of hybridized techniques with class imbalance learning for predicting software maintainability. Int J Reliab Qual Saf Eng 30(02):3388–3415. https://doi.org/10.1142/S0218539323500067
Girshick R, Donahue J, Darrell T, Malik J (2014) Rich feature hierarchies for accurate object detection and semantic segmentation. In: 2014 IEEE conference on computer vision and pattern recognition, pp 580–587. https://doi.org/10.1109/CVPR.2014.81
Girshick R (2015) Fast r-cnn. In: 2015 IEEE international conference on computer vision (ICCV), pp 1440–1448. https://doi.org/10.1109/ICCV.2015.169
Ren S, He K, Girshick R, Sun J (2017) Faster r-cnn: towards real-time object detection with region proposal networks. IEEE Trans Pattern Anal Mach Intell 39(6):1137–1149. https://doi.org/10.1109/TPAMI.2016.2577031
Liu W, Anguelov D, Erhan D, Szegedy C, Reed S, Fu C-Y, Berg AC (2016) SSD: Single shot multibox detector. In: Leibe B, Matas J, Sebe N, Welling M (eds) Computer Vision - ECCV 2016. Springer, Cham, pp 21–37. https://doi.org/10.1007/978-3-319-46448-0_2
Redmon J, Divvala S, Girshick R, Farhadi A (2016) You only look once: unified, real-time object detection. In: 2016 IEEE conference on computer vision and pattern recognition (CVPR), pp 779–788. https://doi.org/10.1109/CVPR.2016.91
Redmon J, Farhadi A (2017) Yolo9000: Better, faster, stronger. In: 2017 IEEE conference on computer vision and pattern recognition (CVPR), pp 6517–6525. https://doi.org/10.1109/CVPR.2017.690
Li D, Yin Z, Wu Z, Liu Q (2021) Classification for tomato disease with imbalanced samples based on td-mobilenetv2. In: 2021 5th international conference on imaging, signal processing and communications (ICISPC), pp 35–39. https://doi.org/10.1109/ICISPC53419.2021.00014
Yu W, Wang J, Cheng G (2021) Object detection in optical remote sensing images based on positive sample reweighting and feature decoupling. In: 2021 IEEE international geoscience and remote sensing symposium IGARSS, pp 4790–4793. https://doi.org/10.1109/IGARSS47720.2021.9554236
Zhen P, Wang S, Zhang S, Yan X, Wang W, Ji Z, Chen H-B (2023) Towards accurate oriented object detection in aerial images with adaptive multi-level feature fusion. ACM Trans Multimedia Comput Commun Appl. https://doi.org/10.1145/3513133
Deng Y, Lan L, You L, Chen K, Peng L, Zhao W, Song B, Wang Y, Ji Z, Zhou X (2023) Automated CT pancreas segmentation for acute pancreatitis patients by combining a novel object detection approach and u-net. Biomed Signal Process Control 81:104430. https://doi.org/10.1016/j.bspc.2022.104430
Suzuki S, Abe K (1985) Topological structural analysis of digitized binary images by border following. Comput Vision Graph Image Process 29(3):396. https://doi.org/10.1016/0734-189X(85)90136-7
Arthur D, Vassilvitskii S (2007) K-means++: the advantages of careful seeding, vol. 8, pp 1027–1035. https://doi.org/10.1145/1283383.1283494
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Cang, Y., Wang, Z. Edge Detection-Guided Balanced Sampling. Neural Process Lett 55, 10639–10654 (2023). https://doi.org/10.1007/s11063-023-11342-w
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11063-023-11342-w