Abstract
In this paper, we present a parallel algorithm for SLIC on Apache Spark, which we call PSLIC-on-Spark. To this purpose, we have extended the original SLIC algorithm to use the operations in Apache Spark, supporting its parallel processing on multiple executors in the Apache Spark cluster. Then, we analyze the trade-off relationship of PSLIC-on-Spark between its processing speed and accuracy due to partitioning of the original image datasets. Through experiments, we verify the trade-off relationship. Specifically, we show that PSLIC-on-Spark using 8 CPU cores reduces the processing time of SLIC by 2.24–2.93 times while it reduces the boundary recall (BR) of SLIC by 1.54–6.32% and increases under-segmentation error (UE) by 1.79–6.2%. Then, we propose an improved algorithm of PSLIC-on-Spark that improves the accuracy of PSLIC-on-Spark, which we call PASLIC-on-Spark. We employ two important features for PASLIC-on-Spark. It contains two main features: (1) image partitioning considering the shape and position of the clusters rather than a evenly partitioning method and (2) controllable duplication for the boundary between image partitions. Through experiments, we show the accuracy and efficiency of PASLIC-on-Spark on an actual cloud environment configured with 8 worker nodes using Amazon AWS. The experimental results indicate that PASLIC-on-Spark improves the accuracy of PSLIC-on-Spark by 3.66–3.77% of BR and 1.39–1.96% of UE. PASLIC-on-Spark still decreases that of processing time SLIC significantly 1.5–1.67 times on a single-node configuring using 8 CPU cores and 1.18–1.26 times on a cloud environment using 8 computing nodes.
Similar content being viewed by others
References
Dass P, Rajeshwar Devi S (2012) Image segmentation techniques 1. Int J Electron Commun Technol 3(1):66–70
Achanta R, Shaji A, Smith K, Lucchi A, Fua P, Süsstrunk S (2012) Slic superpixels compared to state-of-the-art superpixel methods. IEEE Trans Pattern Anal Mach Intell 34(11):2274–2282
Wang M, Liu X, Gao Y, Ma X, Soomro NQ (2017) Superpixel segmentation: a benchmark. Signal Process Image Commun 56:28–39
Xie X, Xie G, Xu X, Cui L, Ren J (2019) Automatic image segmentation with superpixels and image-level labels. IEEE Access 7:10–11
Shen Y, Ai T, Yang M (2019) Extracting centerlines from dual-line roads using superpixel segmentation. IEEE Access 7:967–979
Yang A, Hurt JA, Veal CT, Scott GJ (2019) “Remote sensing object localization with deep heterogeneous superpixel features,” in 2019 IEEE International Conference on Big Data (Big Data). IEEE, pp. 5453–5461
Chuchvara A, Barsi A, Gotchev A (2019) Fast and accurate depth estimation from sparse light fields. IEEE Trans Image Process 29:2492–2506
Hossain MD, Chen D (2019) Segmentation for object-based image analysis (obia): a review of algorithms and challenges from remote sensing perspective. ISPRS J Photogramm Remote Sens 150:115–134
Xie X, Xie G, Xu X (2018) High precision image segmentation algorithm using slic and neighborhood rough set. Multimedia Tools Appl 77(24):525–543
Boemer F, Ratner E, Lendasse A (2018) Parameter-free image segmentation with slic. Neurocomputing 277:228–236
Qiao Y, Jiao L, Hou B (2018) High-quality depth up-sampling based on multi-scale slic. Electron Lett 54(8):494–496
Donné S, Aelterman J, Goossens B, Philips W (2015) “Fast and robust variational optical flow for high-resolution images using slic superpixels,” in International Conference on Advanced Concepts for Intelligent Vision Systems. Springer, pp. 205–216
Zhang K, Li T, Liu B, Liu Q (2019) Co-saliency detection via mask-guided fully convolutional networks with multi-scale label smoothing, in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3095–3104
Zhang Y, Liu K, Dong Y, Wu K, Hu X (2019) Semisupervised classification based on slic segmentation for hyperspectral image. IEEE Geosci Remote Sens Lett. https://doi.org/10.1109/LGRS.2019.2945546
Crommelinck S, Bennett R, Gerke M, Koeva M, Yang M, Vosselman G (2017) Slic superpixels for object delineation from uav data. ISPRS Annal Photogram Remote Sens Spatial Inform Sci 4:9
Martins J, Junior JM, Menezes G, Pistori H, Sant D, Gonçalves W et al (2019) Image segmentation and classification with slic superpixel and convolutional neural network in forest context, in IGARSS 2019–2019 IEEE International Geoscience and Remote Sensing Symposium. IEEE 6543–6546
Vimal S, Robinson YH, Kaliappan M, Vijayalakshmi K, Seo S (2021) A method of progression detection for glaucoma using k-means and the glcm algorithm toward smart medical prediction. J Supercomput. https://doi.org/10.1007/s11227-021-03757-w
Alsafasfeh M, Abdel-Qader I, Bazuin B (2017) “Fault detection in photovoltaic system using slic and thermal images,” in 2017 8th International Conference on Information Technology (ICIT). IEEE, pp. 672–676
Fang Z, Zhang W, Ma H (2019) “Breast cancer classification with ultrasound images based on slic,” in International Conference on Frontier Computing. Springer, pp. 235–248
Van Etten A (2019) “Satellite imagery multiscale rapid detection with windowed networks,” in 2019 IEEE Winter Conference on Applications of Computer Vision (WACV). IEEE, pp. 735–743
Martin D, Fowlkes C, Tal D, Malik J (2001) “A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics,” in Proceedings Eighth IEEE International Conference on Computer Vision. ICCV 2001, vol. 2. IEEE, pp. 416–423
Ren CY, Reid I (2011) gslic: a real-time implementation of slic superpixel segmentation, University of Oxford. Department of Engineering, Technical Report, pp 1–6
Derksen D, Inglada J, Michel J (2019) Scaling up slic superpixels using a tile-based approach. IEEE Trans Geosci Remote Sens 57(5):3073–3085
Dean J, Ghemawat S (2008) Mapreduce: simplified data processing on large clusters. Commun ACM 51(1):107–113
Mavridis I, Karatza H (2017) Performance evaluation of cloud-based log file analysis with apache hadoop and apache spark. J Syst Softw 125:133–151
Alsheikh MA, Niyato D, Lin S, Tan H-P, Han Z (2016) Mobile big data analytics using deep learning and apache spark. IEEE Netw 30(3):22–29
Guo R, Zhao Y, Zou Q, Fang X, Peng S (2018) Bioinformatics applications on apache spark. GigaScience 7, no. 8:giy098
Wu X, Liu X, Chen Y, Shen J, Zhao W (2018) A graph based superpixel generation algorithm. Appl Intell 48(11):4485–4496
Liu M-Y, Tuzel O, Ramalingam S, Chellappa R (2011) Entropy rate superpixel segmentation, in CVPR. IEEE 2011:2097–2104
Shi J, Malik J (2000) Normalized cuts and image segmentation. IEEE Trans Pattern Anal Mach Intell 22(8):888–905
Wang H, Shen J, Yin J, Dong X, Sun H, Shao L (2019) Adaptive nonlocal random walks for image superpixel segmentation. IEEE Trans Circ Syst Video Technol 30(3):822–834
Li Z, Chen J (2015) Superpixel segmentation using linear spectral clustering, in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1356–1363
Levinshtein A, Stere A, Kutulakos KN, Fleet DJ, Dickinson SJ, Siddiqi K (2009) Turbopixels: fast superpixels using geometric flows. IEEE Trans Pattern Anal Mach Intell 31(12):2290–2297
Wang T, Yin J, Yang J, Liu X (2019) Image gradient-based fast superpixel segmentation algorithm for polsar images, in 2019 6th Asia-Pacific Conference on Synthetic Aperture Radar (APSAR). IEEE, pp. 1–6
Sun Z, Xuan P, Song Z, Li H, Jia R (2019) A texture fused superpixel algorithm for coal mine waste rock image segmentation. Int J Coal Preparation Util. https://doi.org/10.1080/19392699.2019.1699546
Sharma M, Biswas M (2021) Classification of hyperspectral remote sensing image via rotation-invariant local binary pattern-based weighted generalized closest neighbor. J Supercomput 77(7):1–34. https://doi.org/10.1007/s11227-020-03474-w
Zhao W, Fu Y, Wei X, Wang H (2018) An improved image semantic segmentation method based on superpixels and conditional random fields. Appl Sci 8(5):837
Jampani V, Sun D, Liu M-Y, Yang M-H, Kautz J (2018) “Superpixel sampling networks,” in Proceedings of the European Conference on Computer Vision (ECCV), pp. 352–368
Yang F, Sun Q, Jin H, Zhou Z (2020) Superpixel segmentation with fully convolutional networks, in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2020, pp. 13 964–13 973
Neubert P, Protzel P (2012) “Superpixel benchmark and comparison,” in Proc. Forum Bildverarbeitung, vol. 6, pp. 1–12
Prajapati HB, Vij SK (2011) “Analytical study of parallel and distributed image processing,” in 2011 International Conference on Image Information Processing. IEEE, pp. 1–6
Quesada-Barriuso P, Heras DB, Argüello F (2021) Gpu accelerated waterpixel algorithm for superpixel segmentation of hyperspectral images. J Supercomput 1–13
Salloum S, Dautov R, Chen X, Peng PX, Huang JZ (2016) Big data analytics on apache spark. Int J Data Sci Analyt 1(3–4):145–164
Liu B, He S, He D, Zhang Y, Guizani M (2019) A spark-based parallel fuzzy \(c\)-means segmentation algorithm for agricultural image big data. IEEE Access 7:169–180
Park G-M, Heo YS, Kwon H-Y (2021) Trade-off analysis between parallelism and accuracy of slic on apache spark, in 2021 IEEE International Conference on Big Data and Smart Computing (BigComp). IEEE, pp. 5–12
Martin DR, Fowlkes CC, Malik J (2004) Learning to detect natural image boundaries using local brightness, color, and texture cues. IEEE Trans Pattern Anal Mach Intell 26(5):530–549
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.
This work was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (No. 2021R1F1A1064050).
Rights and permissions
About this article
Cite this article
Park, G., Heo, Y.S., Lee, K. et al. A parallel and accurate method for large-scale image segmentation on a cloud environment. J Supercomput 78, 4330–4357 (2022). https://doi.org/10.1007/s11227-021-04027-5
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-021-04027-5