DOI QR코드

DOI QR Code

Image Processing Acceleration using WebGPU and WebAssembly

웹GPU와 웹어셈블리를 이용한 이미지 프로세싱 가속

  • Received : 2024.07.26
  • Accepted : 2024.08.28
  • Published : 2024.10.31

Abstract

JavaScript is slow for high-performance image processing in web browsers and cannot directly utilize the GPU. Therefore, web plugin technology or server-based processing methods have been used. However, since web plugins are no longer supported by the latest web browsers and server processing methods become increasingly expensive as the number of users grows. In this paper, an image processing acceleration method is proposed using the latest web standards such as WASM and WebGPU in a client environment, instead of plugins or server-based methods. The final experimental results confirmed that the WASM+WebGPU-based code, which utilizes both the CPU and GPU, improved execution performance by up to 10 times compared to traditional javaScript.

웹 브라우저 기반 고성능 이미지 프로세싱을 위해 JavaScript 언어는 속도가 느리고 GPU를 직접 활용할 수 없어서, 웹 플러그인 기술이나 서버기반 처리 방식이 사용되었다. 하지만 최신 웹 브라우저에서 더 이상 플러그인 기술들이 지원되지 않고, 서버 처리 방식은 사용자가 늘어날수록 운영 비용이 증가하는 문제가 발생하였다. 따라서 본 논문에서는 플러그인이나 서버 기반이 아닌 최신 웹 표준 기술인 WASM과 WebGPU를 활용하여 클라이언트 환경에서 고성능 이미지 프로세싱 알고리즘을 구현하였다. 최종 실험 결과 기존 Javascript에 비해 CPU와 GPU를 동시 활용하는 WASM+ WebGPU 기반의 코드에서 최대 10배 이상 실행 성능이 개선되었다.

Keywords

Acknowledgement

이 성과는 정부(과학기술정보통신부)의 재원으로 한국연구재단의 지원을 받아 수행된 연구임(RS-2023-00321688).

References

  1. J. T. Park and I Y. Moon, "Development trends in web convergence service implementation technology," The Journal of The Korean Institute of Communication Sciences, Vol.38, No.4, pp.3-9, 2021.
  2. D. Kim, "Cloud Computing to Improve JavaScript Processing Efficiency of Mobile Applications," Journal of Information Processing Systems, Vol.13, No.4, pp.731-751, 2017.
  3. C. W. Kim and H. J. Cho, "Profiler Design for Evaluating Performance of WebCL Applications," KIPS Transactions on Computer and Communication Systems, Vol.4, No.8, pp.239-244, 2015.
  4. H. W. Nam and N. S. Park, "Accelerating AES Algorithm using WebGPU," The transactions of The Korean Institute of Electrical Engineers, Vol.71, No.7, pp.1008-1014, 2022.
  5. H. K. Kim, "Web assembly technology trend research," The Journal of The Korean Institute of Communication Sciences, Vol.40, No.2, pp.3-9, 2023.
  6. C. H. Shin, J. H Yeo and S. M Moon, "Analysis of Process and Performance in WebAssembly," in The Korean Institute of Information Scientists and Engineers, pp.1546-1548, 2018.
  7. opencv.js, https://github.com/TechStark/opencv-js
  8. Photon, https://silvia-odwyer.github.io/photon/
  9. wgimage, https://github.com/neka-nat/wgimage
  10. WebGPU Shading Language-W3C Working Draft, https://www.w3.org/TR/WGSL/
  11. N. D. Matsakis, F. S. Klock, "The Rust Language," ACM SIGAda Ada Lett. 103-104, 2014
  12. Direct3D 12 programming guide, https://learn.microsoft.com/en-us/windows/win32/direct3d12/
  13. Metal, https://developer.apple.com/kr/metal/
  14. Vulkan-Cross platform 3D Graphics, https://www.vulkan.org
  15. YUI Compressor-Javascript Compressor, https://yui.github.io/yuicompressor/