Research Article
BibTex RIS Cite

Enhanced Skin Lesion Classification through Hair Artifact Removal and Transfer Learning Models

Year 2025, Volume: 8 Issue: 4, 1007 - 1021, 15.07.2025
https://doi.org/10.34248/bsengineering.1665621

Abstract

Skin cancer is one of the most common types of cancer worldwide and early detection is vital for the most effective treatment. However, melanomas and other malignant skin lesions have been very difficult to detect and this is often because dermatologists use dermoscopy images. These images often contained noise, such as hair and air bubbles, which made diagnosis seriously difficult. To address this important issue, we developed an effective noise removal algorithm to improve the quality of these images using conventional image processing techniques. Using the ISIC2018 dataset, a standard for skin lesion classification, we integrated our de-noising algorithm to carefully pre-process the dermoscopy images. Our method involved selecting the red channel, carefully applying the top hat transform, carefully using Gaussian blur and applying the Otsu thresholding method to detect and remove hairs, followed by internal inpainting to fill the resulting gaps. Following preprocessing, we carefully applied and compared several transfer learning models to classify skin lesions: AlexNet, VGG16, ResNet50 and EfficientNetB0. Our results showed significant improvement in classification accuracy: AlexNet achieved 95.32%, VGG16 97.55%, ResNet50 99.04% and EfficientNetB0 99.89% accuracy. These findings demonstrated that combining hair removal preprocessing with transfer learning significantly improves the accuracy of automatic skin lesion classification. This innovative approach has the potential to greatly assist dermatologists in detecting skin cancer early and lead to better patient outcomes. Our method is robust and effective and is a valuable tool for improving dermatologic assessments in clinical settings.

References

  • Abuzaghleh O, Barkana BD, Faezipour M. 2015. Noninvasive real-time automated skin lesion analysis system for melanoma early detection and prevention. IEEE J Transl Eng Health Med, 3: 1–12, pp: 1–12.
  • Ali R, Hardie RC, De Silva MS, Kebede TM. 2019. Skin lesion segmentation and classification for ISIC 2018 by combining deep CNN and handcrafted features. arXiv preprint arXiv:1908.05730, pp: 1–12.
  • Alsahafi YS, Kassem MA, Hosny KM. 2023. Skin-Net: a novel deep residual network for skin lesions classification using multilevel feature extraction and cross-channel correlation with detection of outlier. J Big Data, 10(1): 105, pp: 105.
  • Ashour AS, El-Wahab BSA, Wahba MA, Mansour DEA, Hodeib AAE, Khedr RAEG, Hassan GF. 2022. Cascaded Hough transform-based hair mask generation and harmonic inpainting for automated hair removal from dermoscopy images. Diagnostics, 12(12): 3040, pp: 3040.
  • Attia M, Hossny M, Nahavandi S, Yazdabadi A, Asadi H. 2019. Realistic hair simulation using image blending. arXiv preprint arXiv:1904.09169, pp: 1–12.
  • Barın S, Güraksın GE. 2024. An improved hair removal algorithm for dermoscopy images. Multimed Tools Appl, 83(3): 8931–8953, pp: 8931–8953.
  • Barman S, Biswas MR, Marjan S, Nahar N, Hossain MS, Andersson K. 2022. Transfer learning based skin cancer classification using GoogLeNet. Presented at the International Conference on Machine Intelligence and Emerging Technologies (ICMIET), Dhaka, Bangladesh, 2022, pp: 1–7.
  • Codella N, Rotemberg V, Tschandl P, Celebi ME, Dusza S, Gutman D, Gottschalk C, et al. 2019. Skin lesion analysis toward melanoma detection 2018: A challenge hosted by the international skin imaging collaboration (ISIC). arXiv preprint arXiv:1902.03368, pp: 1–20.
  • Debelee TG. 2023. Skin lesion classification and detection using machine learning techniques: a systematic review. Diagnostics, 13(19): 3147, pp: 3147.
  • Delibasis K, Moutselos K, Vorgiazidou E, Maglogiannis I. 2023. Automated hair removal in dermoscopy images using shallow and deep learning neural architectures. Comput Methods Programs Biomed Update, 4: 100109, pp: 100109.
  • El-Shafai W, El-Fattah IA, Taha TE. 2024. Deep learning-based hair removal for improved diagnostics of skin diseases. Multimed Tools Appl, 83(9): 27331–27355, pp: 27331–27355.
  • Esteva A, Kuprel B, Novoa RA, Ko J, Swetter SM, Blau HM, Thrun S. 2017. Dermatologist-level classification of skin cancer with deep neural networks. Nature, 542(7639): 115–118, pp: 115–118.
  • Fraiwan M, Faouri E. 2022. On the automatic detection and classification of skin cancer using deep transfer learning. Sensors, 22(13): 4963, pp: 4963.
  • Gessert N, Sentker T, Madesta F, Schmitz R, Kniep H, Baltruschat I, Schlaefer A. 2018. Skin lesion diagnosis using ensembles, unscaled multi-crop evaluation and loss weighting. arXiv preprint arXiv:1808.01694, pp: 1–12.
  • Gonzalez RC. 2009. Digital image processing. Pearson Education India, pp: 817.
  • Gottumukkala VR, Kumaran N, Sekhar VC. 2022. Skin lesion segmentation using SCU-Net with FNLM preprocessing. Presented at the 2022 IEEE International Conference on Data Science and Information Systems (ICDSIS), Bangalore, India, 2022, pp: 1–6.
  • Gouda W, Sama NU, Al-Waakid G, Humayun M, Jhanjhi NZ. 2022. Detection of skin cancer based on skin lesion images using deep learning. Presented at the Healthcare Conference, Dubai, UAE, 2022, pp: 1–7.
  • He K, Zhang X, Ren S, Sun J. 2016. Deep residual learning for image recognition. Presented at the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 2016, pp: 770–778.
  • Jamil U, Khalid S, Akram MU. 2016. Digital image preprocessing and hair artifact removal by using Gabor wavelet. Presented at the 2016 International System on Chip Design Conference (ISOCC), Seoul, South Korea, 2016, pp: 1–6.
  • Jütte L, Emmert S, Roth B. 2023. True digital hair removal with real value inpainting for improved dermoscopy based on image fusion. Presented at the Photonics in Dermatology and Plastic Surgery Conference 2023, Munich, Germany, 2023, pp: 1–5.
  • Kasmi R, Hagerty J, Young R, Lama N, Nepal J, Miinch J, Stanley RJ. 2023. SharpRazor: automatic removal of hair and ruler marks from dermoscopy images. Skin Res Technol, 29(4): e13203, pp: e13203.
  • Krizhevsky A, Sutskever I, Hinton GE. 2012. Imagenet classification with deep convolutional neural networks. Advances in Neural Information Processing Systems, Lake Tahoe, NV, USA, 2012, 25: 1097–1105, pp: 1097–1105.
  • Kumar A, Vishwakarma A, Bajaj V. 2023. Automatic classification of multi-class skin lesions dermoscopy images using an efficient convolutional neural network. Presented at the 2023 IEEE International Students' Conference on Electrical, Electronics and Computer Science (SCEECS), Pune, India, 2023, pp: 1–7.
  • Mahmood A, Mahmood H. 2015. Artifact removal from skin dermoscopy images to support automated melanoma diagnosis. Al-Rafidain Engineering Journal, 23(5): 22–30, pp: 22–30.
  • Mane D, Ashtagi R, Kumbharkar P, Kadam S, Salunkhe D, Upadhye G. 2022. An improved transfer learning approach for classification of types of cancer. Trait Signal, 39(6): 2095, pp: 2095.
  • Mendonça T, Ferreira PM, Marques JS, Marcal AR, Rozeira J. 2013. PH2-A dermoscopic image database for research and benchmarking. Presented at the 2013 35th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Osaka, Japan, 2013, pp: 1–4.
  • Milton MAA. 2019. Automated skin lesion classification using ensemble of deep neural networks in ISIC 2018: Skin lesion analysis towards melanoma detection challenge. arXiv preprint arXiv:1901.10802, pp: 1–15.
  • Pan SJ, Yang Q. 2009. A survey on transfer learning. IEEE Transactions on Knowledge and Data Engineering, 22(10): 1345–1359, pp: 1345–1359.
  • Salido JA, Ruiz C. 2018. Hair artifact removal and skin lesion segmentation of dermoscopy images. Asian Journal of Pharmaceutical and Clinical Research, 11(3): 73–76, pp: 73–76.
  • Shinde A, Chaudhari S. 2022. Statistical analysis of hair detection and removal techniques using dermoscopic images. Presented at the International Conference on Computer Vision and Image Processing, New Delhi, India, 2022, pp: 1–6.
  • Shinde RK, Alam MS, Hossain MB, Md Imtiaz S, Kim J, Padwal AA, Kim N. 2023. Squeeze-MNet: precise skin cancer detection model for low computing IoT devices using transfer learning. Cancers, 15(1): 12, pp: 12.
  • Simonyan K, Zisserman A. 2014. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, pp: 1–14.
  • Street W. 2019. Cancer facts & figures 2018. American Cancer Society, Atlanta, GA, USA, pp: 50.
  • Talavera-Martínez L, Bibiloni P, González-Hidalgo M. 2020. An encoder-decoder CNN for hair removal in dermoscopic images. arXiv preprint arXiv:2010.05013, pp: 1–8.
  • Tan M, Le Q. 2019. EfficientNet: rethinking model scaling for convolutional neural networks. Presented at the International Conference on Machine Learning (ICML), Long Beach, CA, USA, 2019, pp: 6105–6114.
  • Tschandl P, Rosendahl C, Kittler H. 2018. The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Scientific Data, 5(1): 180161, pp: 180161.
  • Weiss K, Khoshgoftaar TM, Wang D. 2016. A survey of transfer learning. Journal of Big Data, 3: 9, pp: 9.
  • Wu Y, Lariba AC, Chen H, Zhao H. 2022. Skin lesion classification based on deep convolutional neural network. Presented at the 2022 IEEE 4th International Conference on Power, Intelligent Computing and Systems (ICPICS), Shanghai, China, 2022, pp: 1–6.
  • Zeiler M. 2014. Visualizing and understanding convolutional networks. Presented at the European Conference on Computer Vision (ECCV) / arXiv, Zurich, Switzerland, 2014, pp: 1–15.
  • Zheng L, Dai Y. 2023. m-VGG16: a dermoscopy image segmentation method based on VGG16. Presented at the 3rd International Conference on Computer Vision and Data Mining (ICCVDM), Seoul, South Korea, 2023, pp: 1-7.

Enhanced Skin Lesion Classification through Hair Artifact Removal and Transfer Learning Models

Year 2025, Volume: 8 Issue: 4, 1007 - 1021, 15.07.2025
https://doi.org/10.34248/bsengineering.1665621

Abstract

Skin cancer is one of the most common types of cancer worldwide and early detection is vital for the most effective treatment. However, melanomas and other malignant skin lesions have been very difficult to detect and this is often because dermatologists use dermoscopy images. These images often contained noise, such as hair and air bubbles, which made diagnosis seriously difficult. To address this important issue, we developed an effective noise removal algorithm to improve the quality of these images using conventional image processing techniques. Using the ISIC2018 dataset, a standard for skin lesion classification, we integrated our de-noising algorithm to carefully pre-process the dermoscopy images. Our method involved selecting the red channel, carefully applying the top hat transform, carefully using Gaussian blur and applying the Otsu thresholding method to detect and remove hairs, followed by internal inpainting to fill the resulting gaps. Following preprocessing, we carefully applied and compared several transfer learning models to classify skin lesions: AlexNet, VGG16, ResNet50 and EfficientNetB0. Our results showed significant improvement in classification accuracy: AlexNet achieved 95.32%, VGG16 97.55%, ResNet50 99.04% and EfficientNetB0 99.89% accuracy. These findings demonstrated that combining hair removal preprocessing with transfer learning significantly improves the accuracy of automatic skin lesion classification. This innovative approach has the potential to greatly assist dermatologists in detecting skin cancer early and lead to better patient outcomes. Our method is robust and effective and is a valuable tool for improving dermatologic assessments in clinical settings.

References

  • Abuzaghleh O, Barkana BD, Faezipour M. 2015. Noninvasive real-time automated skin lesion analysis system for melanoma early detection and prevention. IEEE J Transl Eng Health Med, 3: 1–12, pp: 1–12.
  • Ali R, Hardie RC, De Silva MS, Kebede TM. 2019. Skin lesion segmentation and classification for ISIC 2018 by combining deep CNN and handcrafted features. arXiv preprint arXiv:1908.05730, pp: 1–12.
  • Alsahafi YS, Kassem MA, Hosny KM. 2023. Skin-Net: a novel deep residual network for skin lesions classification using multilevel feature extraction and cross-channel correlation with detection of outlier. J Big Data, 10(1): 105, pp: 105.
  • Ashour AS, El-Wahab BSA, Wahba MA, Mansour DEA, Hodeib AAE, Khedr RAEG, Hassan GF. 2022. Cascaded Hough transform-based hair mask generation and harmonic inpainting for automated hair removal from dermoscopy images. Diagnostics, 12(12): 3040, pp: 3040.
  • Attia M, Hossny M, Nahavandi S, Yazdabadi A, Asadi H. 2019. Realistic hair simulation using image blending. arXiv preprint arXiv:1904.09169, pp: 1–12.
  • Barın S, Güraksın GE. 2024. An improved hair removal algorithm for dermoscopy images. Multimed Tools Appl, 83(3): 8931–8953, pp: 8931–8953.
  • Barman S, Biswas MR, Marjan S, Nahar N, Hossain MS, Andersson K. 2022. Transfer learning based skin cancer classification using GoogLeNet. Presented at the International Conference on Machine Intelligence and Emerging Technologies (ICMIET), Dhaka, Bangladesh, 2022, pp: 1–7.
  • Codella N, Rotemberg V, Tschandl P, Celebi ME, Dusza S, Gutman D, Gottschalk C, et al. 2019. Skin lesion analysis toward melanoma detection 2018: A challenge hosted by the international skin imaging collaboration (ISIC). arXiv preprint arXiv:1902.03368, pp: 1–20.
  • Debelee TG. 2023. Skin lesion classification and detection using machine learning techniques: a systematic review. Diagnostics, 13(19): 3147, pp: 3147.
  • Delibasis K, Moutselos K, Vorgiazidou E, Maglogiannis I. 2023. Automated hair removal in dermoscopy images using shallow and deep learning neural architectures. Comput Methods Programs Biomed Update, 4: 100109, pp: 100109.
  • El-Shafai W, El-Fattah IA, Taha TE. 2024. Deep learning-based hair removal for improved diagnostics of skin diseases. Multimed Tools Appl, 83(9): 27331–27355, pp: 27331–27355.
  • Esteva A, Kuprel B, Novoa RA, Ko J, Swetter SM, Blau HM, Thrun S. 2017. Dermatologist-level classification of skin cancer with deep neural networks. Nature, 542(7639): 115–118, pp: 115–118.
  • Fraiwan M, Faouri E. 2022. On the automatic detection and classification of skin cancer using deep transfer learning. Sensors, 22(13): 4963, pp: 4963.
  • Gessert N, Sentker T, Madesta F, Schmitz R, Kniep H, Baltruschat I, Schlaefer A. 2018. Skin lesion diagnosis using ensembles, unscaled multi-crop evaluation and loss weighting. arXiv preprint arXiv:1808.01694, pp: 1–12.
  • Gonzalez RC. 2009. Digital image processing. Pearson Education India, pp: 817.
  • Gottumukkala VR, Kumaran N, Sekhar VC. 2022. Skin lesion segmentation using SCU-Net with FNLM preprocessing. Presented at the 2022 IEEE International Conference on Data Science and Information Systems (ICDSIS), Bangalore, India, 2022, pp: 1–6.
  • Gouda W, Sama NU, Al-Waakid G, Humayun M, Jhanjhi NZ. 2022. Detection of skin cancer based on skin lesion images using deep learning. Presented at the Healthcare Conference, Dubai, UAE, 2022, pp: 1–7.
  • He K, Zhang X, Ren S, Sun J. 2016. Deep residual learning for image recognition. Presented at the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 2016, pp: 770–778.
  • Jamil U, Khalid S, Akram MU. 2016. Digital image preprocessing and hair artifact removal by using Gabor wavelet. Presented at the 2016 International System on Chip Design Conference (ISOCC), Seoul, South Korea, 2016, pp: 1–6.
  • Jütte L, Emmert S, Roth B. 2023. True digital hair removal with real value inpainting for improved dermoscopy based on image fusion. Presented at the Photonics in Dermatology and Plastic Surgery Conference 2023, Munich, Germany, 2023, pp: 1–5.
  • Kasmi R, Hagerty J, Young R, Lama N, Nepal J, Miinch J, Stanley RJ. 2023. SharpRazor: automatic removal of hair and ruler marks from dermoscopy images. Skin Res Technol, 29(4): e13203, pp: e13203.
  • Krizhevsky A, Sutskever I, Hinton GE. 2012. Imagenet classification with deep convolutional neural networks. Advances in Neural Information Processing Systems, Lake Tahoe, NV, USA, 2012, 25: 1097–1105, pp: 1097–1105.
  • Kumar A, Vishwakarma A, Bajaj V. 2023. Automatic classification of multi-class skin lesions dermoscopy images using an efficient convolutional neural network. Presented at the 2023 IEEE International Students' Conference on Electrical, Electronics and Computer Science (SCEECS), Pune, India, 2023, pp: 1–7.
  • Mahmood A, Mahmood H. 2015. Artifact removal from skin dermoscopy images to support automated melanoma diagnosis. Al-Rafidain Engineering Journal, 23(5): 22–30, pp: 22–30.
  • Mane D, Ashtagi R, Kumbharkar P, Kadam S, Salunkhe D, Upadhye G. 2022. An improved transfer learning approach for classification of types of cancer. Trait Signal, 39(6): 2095, pp: 2095.
  • Mendonça T, Ferreira PM, Marques JS, Marcal AR, Rozeira J. 2013. PH2-A dermoscopic image database for research and benchmarking. Presented at the 2013 35th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Osaka, Japan, 2013, pp: 1–4.
  • Milton MAA. 2019. Automated skin lesion classification using ensemble of deep neural networks in ISIC 2018: Skin lesion analysis towards melanoma detection challenge. arXiv preprint arXiv:1901.10802, pp: 1–15.
  • Pan SJ, Yang Q. 2009. A survey on transfer learning. IEEE Transactions on Knowledge and Data Engineering, 22(10): 1345–1359, pp: 1345–1359.
  • Salido JA, Ruiz C. 2018. Hair artifact removal and skin lesion segmentation of dermoscopy images. Asian Journal of Pharmaceutical and Clinical Research, 11(3): 73–76, pp: 73–76.
  • Shinde A, Chaudhari S. 2022. Statistical analysis of hair detection and removal techniques using dermoscopic images. Presented at the International Conference on Computer Vision and Image Processing, New Delhi, India, 2022, pp: 1–6.
  • Shinde RK, Alam MS, Hossain MB, Md Imtiaz S, Kim J, Padwal AA, Kim N. 2023. Squeeze-MNet: precise skin cancer detection model for low computing IoT devices using transfer learning. Cancers, 15(1): 12, pp: 12.
  • Simonyan K, Zisserman A. 2014. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, pp: 1–14.
  • Street W. 2019. Cancer facts & figures 2018. American Cancer Society, Atlanta, GA, USA, pp: 50.
  • Talavera-Martínez L, Bibiloni P, González-Hidalgo M. 2020. An encoder-decoder CNN for hair removal in dermoscopic images. arXiv preprint arXiv:2010.05013, pp: 1–8.
  • Tan M, Le Q. 2019. EfficientNet: rethinking model scaling for convolutional neural networks. Presented at the International Conference on Machine Learning (ICML), Long Beach, CA, USA, 2019, pp: 6105–6114.
  • Tschandl P, Rosendahl C, Kittler H. 2018. The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Scientific Data, 5(1): 180161, pp: 180161.
  • Weiss K, Khoshgoftaar TM, Wang D. 2016. A survey of transfer learning. Journal of Big Data, 3: 9, pp: 9.
  • Wu Y, Lariba AC, Chen H, Zhao H. 2022. Skin lesion classification based on deep convolutional neural network. Presented at the 2022 IEEE 4th International Conference on Power, Intelligent Computing and Systems (ICPICS), Shanghai, China, 2022, pp: 1–6.
  • Zeiler M. 2014. Visualizing and understanding convolutional networks. Presented at the European Conference on Computer Vision (ECCV) / arXiv, Zurich, Switzerland, 2014, pp: 1–15.
  • Zheng L, Dai Y. 2023. m-VGG16: a dermoscopy image segmentation method based on VGG16. Presented at the 3rd International Conference on Computer Vision and Data Mining (ICCVDM), Seoul, South Korea, 2023, pp: 1-7.
There are 40 citations in total.

Details

Primary Language English
Subjects Biomedical Imaging
Journal Section Research Articles
Authors

Kerem Gencer 0000-0002-2914-1056

Early Pub Date July 9, 2025
Publication Date July 15, 2025
Submission Date March 27, 2025
Acceptance Date May 12, 2025
Published in Issue Year 2025 Volume: 8 Issue: 4

Cite

APA Gencer, K. (2025). Enhanced Skin Lesion Classification through Hair Artifact Removal and Transfer Learning Models. Black Sea Journal of Engineering and Science, 8(4), 1007-1021. https://doi.org/10.34248/bsengineering.1665621
AMA Gencer K. Enhanced Skin Lesion Classification through Hair Artifact Removal and Transfer Learning Models. BSJ Eng. Sci. July 2025;8(4):1007-1021. doi:10.34248/bsengineering.1665621
Chicago Gencer, Kerem. “Enhanced Skin Lesion Classification through Hair Artifact Removal and Transfer Learning Models”. Black Sea Journal of Engineering and Science 8, no. 4 (July 2025): 1007-21. https://doi.org/10.34248/bsengineering.1665621.
EndNote Gencer K (July 1, 2025) Enhanced Skin Lesion Classification through Hair Artifact Removal and Transfer Learning Models. Black Sea Journal of Engineering and Science 8 4 1007–1021.
IEEE K. Gencer, “Enhanced Skin Lesion Classification through Hair Artifact Removal and Transfer Learning Models”, BSJ Eng. Sci., vol. 8, no. 4, pp. 1007–1021, 2025, doi: 10.34248/bsengineering.1665621.
ISNAD Gencer, Kerem. “Enhanced Skin Lesion Classification through Hair Artifact Removal and Transfer Learning Models”. Black Sea Journal of Engineering and Science 8/4 (July 2025), 1007-1021. https://doi.org/10.34248/bsengineering.1665621.
JAMA Gencer K. Enhanced Skin Lesion Classification through Hair Artifact Removal and Transfer Learning Models. BSJ Eng. Sci. 2025;8:1007–1021.
MLA Gencer, Kerem. “Enhanced Skin Lesion Classification through Hair Artifact Removal and Transfer Learning Models”. Black Sea Journal of Engineering and Science, vol. 8, no. 4, 2025, pp. 1007-21, doi:10.34248/bsengineering.1665621.
Vancouver Gencer K. Enhanced Skin Lesion Classification through Hair Artifact Removal and Transfer Learning Models. BSJ Eng. Sci. 2025;8(4):1007-21.

                                                24890