Citation
Vara de Rey Suárez, Adolfo
(2018).
Implementación en una GPU empotrada usando CUDA de un filtro espacio-espectral de mapas de clasificación hiperespectrales para detección de tumores cerebrales.
Proyecto Fin de Carrera / Trabajo Fin de Grado, E.T.S.I. y Sistemas de Telecomunicación (UPM), Madrid.
Abstract
El objetivo de este PFG consiste en implementar en un sistema empotrado GPGPU (siglas en inglés de General Purpose Graphics Processing Unit) la etapa de filtrado y suavizado en tiempo real de una imagen hiperespectral, concretamente el algoritmo KNN (de las siglas en inglés de K-Nearest Neighbors) atendiendo a las siguientes restricciones de diseño: a) Deberá ser implementado sobre la tarjeta de desarrollo Nvidia Jetson TX1 utilizando el lenguaje CUDA (Compute Unified Device Arquitecture) también desarrollado por Nvidia para la de programación de GPUs (Graphics Processing Unit), atendiendo así a las propias restricciones de la plataforma o del lenguaje. b) Debe ser capaz de realizar el procesamiento en tiempo real dentro del propio contexto de la aplicación (por debajo de 1 minuto para ser poder ser considerado como tiempo de operación). Así mismo, se deberán comparar los resultados obtenidos con los resultados esperados para comprobar que a pesar del posible error los resultados se pueden seguir considerando como válidos. c) La especificación del sistema deberá ser realizada con las bibliotecas disponibles en CUDA, así como su ecosistema asociado. d) Se deberá hacer uso de la herramienta Nvidia Nsigth visual profiler para realizar un profile del sistema en tiempo de ejecución, comprobando el rendimiento y aprovechamiento de recursos del mismo, así como analizar el rendimiento de la implementación final.
Este algoritmo formará parte de un proyecto de construcción de un sistema de detección de tumores cerebrales mediante el procesamiento de imágenes hiperespectrales. En este PFG, en primer lugar, se ha hecho un análisis de las imágenes hiperespectrales y el algoritmo KNN para comprender mejor el funcionamiento del procesamiento de una imagen hiperespectral. Seguido a esto, se ha realizado un estudio exhaustivo de la arquitectura HW (HardWare) de la GPU utilizada, así como del lenguaje CUDA y las herramientas de desarrollo que ofrece Nvidia, utilizando para dicho estudio la misma documentación desarrollada por Nvidia. Finalmente, se han aplicado los conocimientos adquiridos para la implementación y optimización del algoritmo KNN en la tarjeta gráfica. Todas estas implementaciones han sido realizadas utilizando las herramientas de desarrollo, compilación y profiling de Nvidia.
Abstract:
The objective of this PFG (Final Degree Project) is to implement the stage of filtering and smoothing a hyperspectral image, in particular the KNN (K-Nearest Neighbors) algorithm, within a built-in GPGPU (General Purpose – Graphical Processing Unit) system, according to the following design restrictions: a) The algorithm should be implemented on the Nvidia Jetson TX1 development board using the CUDA (Compute Unified Device Architecture) GPU programming language, also developed by Nvidia, thus addressing the hardware constraints of the platform and language. b) Must be able to perform real-time processing within the application context itself (less than 1 minute to be considered comparable with time in operation). Likewise, the results obtained should be compared with the expected results to verify that, despite the possible error, the results can still be considered valid. c) The system specification should be made with the available libraries in CUDA as well as its associated ecosystem. d) Use the Nvidia Nsight visual profiler tool to perform a system profile at runtime, checking the performance and resource utilization of the system, as well as analyzing the performance of the final implementation. This algorithm will be part of a project to construct a system used for the detection of brain tumors through the processing of hyperspectral images. In this PFG, the first part consists of an analysis of the hyper spectral images and the KNN algorithm to better understand the operation of the processing of a hyperspectral image. Following this, a comprehensive study of the HW (Hardware) architecture of the GPU used, as well as the CUDA language and the development tools offered by Nvidia, has been made carried out using the same documentation provided by Nvidia. Finally, the knowledge acquired has been applied to the implementation of the KNN algorithm in the graphics card, maximizing the benefits offered by the system and ancillary components. The implementation was made using the development, compilation and profiling tools provided by Nvidia.