Abstract
Image segmentation is a foundational technique in computer vision with wide-ranging applications, including its critical role in medical imaging for object identification, automatic labeling, and disease diagnosis. Advancements in deep learning have significantly improved the accuracy and efficiency of image segmentation, making it an increasingly valuable tool in various domains. Class imbalanced datasets are a frequent problem experienced when trying to train segmentation networks. Class imbalance occurs when some classes (semantic categories) in the image have significantly more instances (pixels) than others. In semantic segmentation, this often happens because certain object categories are more prevalent in the real world or dataset, while others are rarer. When training a deep learning model for semantic segmentation, this imbalance can lead to several problems. In this article, we have experimented with the class weightage parameters of binary focal loss to address the class imbalance problem in semantic segmentation. By utilizing the CANDID-PTX dataset, we have utilized U-Net architecture containing upsampling (encoder) and a downsampling (decoder) network for comparing binary focal loss rates among different alpha and gamma coefficients class weights. Doing so, we found that the adjustment of class weights in the loss function could notably help in resolving the class imbalance problems.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Megahed FM, Chen YJ, Megahed A, Ong Y, Altman N, Krzywinski M (2021) The class imbalance problem. Nat Methods 18(11):1270–1272. https://doi.org/10.1038/s41592-021-01302-4
Raghuwanshi BS, Shukla S (2018) Class-specific extreme learning machine for handling binary class imbalance problem. Neur Netw Official J Int Neur Netw Soc 105:206–217. https://doi.org/10.1016/j.neunet.2018.05.011
Desuky AS, Hussain S (2021) An improved hybrid approach for handling class imbalance problem. Arab J Sci Eng 46(4):3853–3864. https://doi.org/10.1007/s13369-021-05347-7
Wang D, Wu H (2021) IoU regression with H+L-sampling for accurate detection confidence. Sensors (Basel, Switzerland) 21(13):4433. https://doi.org/10.3390/s21134433
Al-Stouhi S, Reddy CK (2016) Transfer learning for class imbalance problems with inadequate data. Knowl Inf Syst 48(1):201–228. https://doi.org/10.1007/s10115-015-0870-3
Zhang W, Chen Y, Yang W, Wang G, Xue JH, Liao Q (2021) Class-variant margin normalized softmax loss for deep face recognition. IEEE Trans Neur Netw Learn Syst 32(10):4742–4747. https://doi.org/10.1109/TNNLS.2020.3017528
Aloo R, Mutoh A, Moriyama K, Matsui T, Inuzuka N (2022) Ensemble method using real images, metadata and synthetic images for control of class imbalance in classification. Artif Life Robot 27(4):796–803. https://doi.org/10.1007/s10015-022-00781-8
Feng LX, Li X, Wang HY, Zheng WY, Zhang YQ, Gao DR, Wang MQ (2021) Automatic sleep staging algorithm based on time attention mechanism. Front Hum Neurosci 15:692054. https://doi.org/10.3389/fnhum.2021.692054
Müller D, Soto-Rey I, Kramer F (2022) Towards a guideline for evaluation metrics in medical image segmentation. BMC Res Notes 15(1):210. https://doi.org/10.1186/s13104-022-06096-y
Tyas DA, Ratnaningsih T, Harjoko A, Hartati S (2022) Erythrocyte (red blood cell) dataset in thalassemia case. Data Brief 41:107886. https://doi.org/10.1016/j.dib.2022.107886
Feng S, Azzollini D, Kim JS, Jin CK, Gordon SP, Yeoh J, Kim E, Han M, Lee A, Patel A, Wu J, Urschler M, Fong A, Simmers C, Tarr GP, Barnard S, Wilson B (2021) Curation of the CANDID-PTX dataset with free-text reports. Radiol Artif Intell 3(6):e210136. https://doi.org/10.1148/ryai.2021210136
Sarhan A (2021) Run length encoding based wavelet features for COVID-19 detection in X-rays. BJR Open 3(1):20200028. https://doi.org/10.1259/bjro.20200028
Semantic segmentation losses and metrics (2024). Retrieved from: https://github.com/qubvel/segmentation_models/blob/master/segmentation_models/losses.py
Hossain S, John B, Andrew P (2020) Dual focal loss to address class imbalance in semantic segmentation. Retrieved from: https://users.monash.edu/~app/papers/20_NeuroC_prostate.pdf
Yousef R, Khan S, Gupta G, Siddiqui T, Albahlal BM, Alajlan SA, Haq MA (2023) U-Net-based models towards optimal MR brain image segmentation. Diagnostics (Basel, Switzerland) 13(9):1624. https://doi.org/10.3390/diagnostics13091624
Funding
This work was primarily supported by the National Science Foundation EPSCoR Program under NSF Award # OIA-2242812.
Supplementary FileTraining code can be found here: https://github.com/rushikeshchopaderc/Semantic_Segmentation_Code.
Supplementary file 1: Transformer-based U-Net model architecture.
Author information
Authors and Affiliations
Contributions
Rushikesh Chopade, Shrikant Pawar, and Aditya Stanam conceived the concepts, planned, and designed the article. Shrikant Pawar and Rushikesh Chopade primarily wrote and edited the manuscript.
Competing Interests
The authors declare that they have no competing interests.
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Chopade, R., Stanam, A., Pawar, S. (2024). Addressing Class Imbalance Problem in Semantic Segmentation Using Binary Focal Loss. In: Yang, XS., Sherratt, S., Dey, N., Joshi, A. (eds) Proceedings of Ninth International Congress on Information and Communication Technology. ICICT 2024 2024. Lecture Notes in Networks and Systems, vol 1013. Springer, Singapore. https://doi.org/10.1007/978-981-97-3559-4_28
Download citation
DOI: https://doi.org/10.1007/978-981-97-3559-4_28
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-97-3558-7
Online ISBN: 978-981-97-3559-4
eBook Packages: EngineeringEngineering (R0)