Open Access Open Access  Restricted Access Subscription Access

Image Processing on Agricultural Dataset Using Parallel Processing Based on Python


Affiliations
1 Doctoral Student of Computer Science, Universitas Gadjah Mada, Yogyakarta, Indonesia
2 Department of Computer Science and Electronics, Universitas Gadjah Mada, Yogyakarta, Indonesia
 

Parallel processing divides data to be processed in each core on the CPU. One programming language that is widely used for machine learning applications and can accommodate the use of parallel processing is Python. Multiprocessing, mpi4py and CuPy are examples of Python libraries that can process data in parallel. In this research, we will compare the use of these libraries to process huge amounts of data. This research takes agricultural data for data image enhancement through color conversion from RGB to grayscale. The results showed that multiprocessing, mpi4py, and CuPy can increase the image enhancement speed three times faster than its single-core execution. Then, using a combination of multiprocessing with CuPy, a 1.7 times performance improvement is achieved compared with multiprocessing-only. Also, using a combination of mpi4py with CuPy achieved 2.5 times performance improvement compared to mpi4py-only.

Keywords

Core CPU, Parallel Processing, mpi4py, Multiprocessing, CuPy.
User
Notifications
Font Size

  • P. D. Department of Economic and Social Affairs, World Population Prospects 2022, no. 9. 2022. [Online]. Available: www.un.org/development/desa/pd/.
  • T. Talaviya, D. Shah, N. Patel, H. Yagnik, and M. Shah, “Implementation of artificial intelligence in agriculture for optimisation of irrigation and application of pesticides and herbicides,” Artificial Intelligence in Agriculture, vol. 4, pp. 58–73, 2020, doi: 10.1016/j.aiia.2020.04.002.
  • K. Prakash, P. Saravanamoorthi, R. Sathishkumar, and M. Parimala, “A Study of Image Processing in Agriculture,” International Journal of Advanced Networking and Applications - IJANA, vol. 9, no. 1, pp. 3311–3315, 2017, [Online]. Available: https://www.ijana.in/v9-1.php#
  • S. Sabzi, Y. Abbaspour-Gilandeh, and J. I. Arribas, “An automatic visible-range video weed detection, segmentation and classification prototype in potato field,” Heliyon, vol. 6, no. 5, p. e03685, 2020, doi: 10.1016/j.heliyon.2020.e03685.
  • A. Berquer, V. Bretagnolle, O. Martin, and S. Gaba, “Disentangling the effect of nitrogen input and weed control on crop–weed competition suggests a potential agronomic trap in conventional farming,” Agriculture, Ecosystems and Environment, vol. 345, no. July 2021, p. 108232, 2023, doi: 10.1016/j.agee.2022.108232.
  • C. Nathalie, N. Munier-Jolain, F. Dugué, A. Gardarin, F. Strbik, and D. Moreau, “The response of weed and crop species to shading. How to predict their morphology and plasticity from species traits and ecological indexes?,” European Journal of Agronomy, vol. 121, no. August, 2020, doi: 10.1016/j.eja.2020.126158.
  • P. Kanade, M. Akhtar, F. David, and S. Kanade, “Agricultural Mobile Robots In Weed Management And Control,” International Journal of Advanced Networking and Applications, vol. 13, no. 03, pp. 5001–5006, 2021, doi: 10.35444/ijana.2021.13309.
  • K. Xiao, Y. Ma, and G. Gao, “An intelligent precision orchard pesticide spray technique based on the depth-of-field extraction algorithm,” Computers and Electronics in Agriculture, vol. 133, pp. 30–36, 2017, doi: 10.1016/j.compag.2016.12.002.
  • A. Sharma and P. K. Mishra, “Image enhancement techniques on deep learning approaches for automated diagnosis of COVID-19 features using CXR images,” Multimedia Tools and Applications, 2022, doi: 10.1007/s11042-022-13486-8.
  • A. Al-shafei, H. Zareipour, and Y. Cao, “High-Performance and Parallel Computing Techniques Review: Applications, Challenges and Potentials to Support Net-Zero Transition of Future Grids,” 2022.
  • S. Farshidi, S. Jansen, and M. Deldar, “A decision model for programming language ecosystem selection: Seven industry case studies,” Information and Software Technology, vol. 139, no. May 2020, p. 106640, 2021, doi: 10.1016/j.infsof.2021.106640.
  • L. Dalcin and Y. L. L. Fang, “Mpi4py: Status Update after 12 Years of Development,” Computing in Science and Engineering, vol. 23, no. 4, pp. 47–54, 2021, doi: 10.1109/MCSE.2021.3083216.
  • D. Beazley, “Secrets of the Multiprocessing Module,” Login, vol. 37, no. 5, pp. 61–70, 2012.
  • R. Okuta, Y. Unno, D. Nishino, S. Hido, and C. Loomis, “CuPy: A NumPy-compatible library for NVIDIA GPU calculations,” Workshop on Machine Learning Systems (LearningSys) at Neural Information Processing Systems (NIPS), no. Nips, pp. 1–7, 2017, [Online]. Available: http://learningsys.org/nips17/assets/papers/paper_16.pdf
  • E. Based, P. Interface, M. Abutaha, I. Amar, and S. Alqahtani, “Parallel and Practical Approach of Efficient Image Chaotic Encryption Based on Message Passing Interface (MPI),” entropy Article, pp. 1–22, 2022.
  • M. S. U. Yusuf and A. A. Fuad, “Real Time Implementation of Face Recognition based Smart Attendance System,” Wseas Transactions on Signal Processing, vol. 17, pp. 46–56, 2021, doi: 10.37394/232014.2021.17.6.
  • S. Chetlur et al., “cuDNN: Efficient Primitives for Deep Learning,” pp. 1–9, 2014, [Online]. Available: http://arxiv.org/abs/1410.0759
  • N. Sultana, M. Rüfenacht, A. Skjellum, P. Bangalore, I. Laguna, and K. Mohror, “Understanding the use of message passing interface in exascale proxy applications,” Concurrency and Computation: Practice and Experience, vol. 33, no. 14, pp. 1–15, 2021, doi: 10.1002/cpe.5901.
  • S. H. Lee, “Real-time edge computing on multi-processes and multi-threading architectures for deep learning applications,” Microprocessors and Microsystems, vol. 92, no. December 2021, p. 104554, 2022, doi: 10.1016/j.micpro.2022.104554.
  • M. J. Mišić, Đ. M. Đurđević, and M. V Tomašević, “Evolution and trends in GPU computing,” in 2012 Proceedings of the 35th International Convention MIPRO, 2012, pp. 289–294.

Abstract Views: 159

PDF Views: 0




  • Image Processing on Agricultural Dataset Using Parallel Processing Based on Python

Abstract Views: 159  |  PDF Views: 0

Authors

Faisal Dharma Adhinata
Doctoral Student of Computer Science, Universitas Gadjah Mada, Yogyakarta, Indonesia
Ahmad Ashari
Department of Computer Science and Electronics, Universitas Gadjah Mada, Yogyakarta, Indonesia
Muhammad Alfian Amrizal
Department of Computer Science and Electronics, Universitas Gadjah Mada, Yogyakarta, Indonesia

Abstract


Parallel processing divides data to be processed in each core on the CPU. One programming language that is widely used for machine learning applications and can accommodate the use of parallel processing is Python. Multiprocessing, mpi4py and CuPy are examples of Python libraries that can process data in parallel. In this research, we will compare the use of these libraries to process huge amounts of data. This research takes agricultural data for data image enhancement through color conversion from RGB to grayscale. The results showed that multiprocessing, mpi4py, and CuPy can increase the image enhancement speed three times faster than its single-core execution. Then, using a combination of multiprocessing with CuPy, a 1.7 times performance improvement is achieved compared with multiprocessing-only. Also, using a combination of mpi4py with CuPy achieved 2.5 times performance improvement compared to mpi4py-only.

Keywords


Core CPU, Parallel Processing, mpi4py, Multiprocessing, CuPy.

References