The project developed in this thesis was born from a collaboration between the Microcomputer laboratory of the Pavia University and the Hyperspectral Computing Laboratory of the Extremadura University. The aim of this collaboration is to develop new algorithms for the elaboration of the hyperspectral images and their implementation on the GPUs. Hyperspectral images are data collected in different continuous spectral bands by a hyperspectral sensor. This data is represented as a cube in which the spatial information is the X-Y plane and the spectral information is represented along the Z axis. A hyperspectral sensor acquires data in over 100 bands so the amount of data is very large. The research activity is focused on developing algorithms to elaborate and extract information in reasonable time and on obtaining real-time processing. The aim of this thesis is to develop a new algorithm based on neural networks for the classification of hyperspectral data. The first version of the algorithm, developed in Matlab, is based on the version provided by the Hyperspectral Computing Laboratory. The algorithm is based on an autoencoder or Diabolo network that is a combination of two Multi-layer perceptron neural networks. The network is made up of: one input layer, one hidden layer, one output layer that provides the probability distributions for each pixel, a symmetric hidden layer of the same size of the first hidden layer and a reconstruction layer of the same size of the input layer that performs a reconstruction of the input image. The algorithm is completely unsupervised. The entire network is trained using the back-propagation algorithm using as sigmoid as activation functions and as cost function the MSE calculated between the input image and the output of the reconstruction layer. The algorithm has been profiled using the built-in Matlab profiler and the results show that the heaviest parts are the matrix multiplications and sigmoid calculations. The GPU implementation is justified by the nature of these operations that are intrinsically parallelizable and adapt well to manycore architecture. The algorithm has been developed in two versions: OpenMP implementation on multicore architecture and CUDA implementation on NVIDIA manycore architecture. The CUDA version has been developed using the CUBLAS library for the matrix multiplications in order to achieve the best possible performance and custom CUDA kernels for the sigmoids and simpler matrix calculations. The tests of the two applications are performed using different sizes of the training set and show a maximum speed-up of 3.68 for the OpenMP with respect to the serial version and a maximum speed-of 215.68 for the CUDA version. Then the CUDA implementation has been tested on bigger images and the best result of classification is obtained with a training set of 30% and 50%. Unfortunately increasing too much the dimension of the training set and the duration of the training phase the algorithm run into the overfitting problem: the network loses its characteristic of generality and achieves higher test error while obtaining low training error. The solution of this problem is not trivial and there are several complex algorithms to avoid the overfitting. The algorithm is then compared with its supervised counterpart that uses labelled data. This algorithm is in development at the Microcomputer laboratory and not yet implemented in CUDA so it is only possible a qualitative analysis. This version is based on a MLP network with three layers and trained by the back-propagation algorithm. The performed tests show that the supervised algorithm is not able to recognize all patterns in the scene as the unsupervised one. This is because pixels unlabelled are harder to recognize and classify. The obtained results show that the GPU technology is very promising for hyperspectral images processing thanks to the characteristics of the algorithm that fit well the manycore architecture.
Il progetto sviluppato in questa tesi è nato dalla collaborazione tra il laboratorio di Microcalcolatori dell’Università di Pavia e dell’Hyperspectral Computing Laboratory dell’Università di Extramadura. Lo scopo di questa collaborazione è quello di sviluppare nuovi algoritmi per l’elaborazione di immagini iperspettrali e la loro implementazione su GPU. Le immagini iperspettrali sono dati acquisiti su diverse bande spettrali continue da un sensore iperspettrale. Questi dati sono rappresentati come un cubo, dove l’informazione spaziale è data dal piano X-Y mentre quella spettrale è rappresentata lungo l’asse Z. Generalmente, un sensore iperspettrale può acquisire dati in più di 100 bande e la quantità di dati è molto elevata. La ricerca è focalizzata sullo sviluppo di algoritmi per l’elaborazione e l’estrazione di informazioni in tempi ragionevoli. Lo scopo di questa tesi è di sviluppare un nuovo algoritmo basato sulle reti neurali per la classificazione delle immagini iperspettrali. La prima versione dell’algoritmo, sviluppata in Matlab, è basata sulla versione fornita dall’Hyperspectral Computing Laboratory. L’algoritmo è basato su un autoencoder o rete Diabolo che è costituito da due reti neurali MLP. La rete è formata da: uno strato di ingresso, uno nascosto, uno di output che fornisce le distribuzioni di probabilità per ciascun pixel, uno strato simmetrico delle stesse dimensioni del primo e infine uno di ricostruzione delle stesse dimensioni di quello di input che è responsabile della ricostruzione dell’immagine di input. L’algoritmo è completamente non supervisionato. La rete è addestrata utilizzando l’algoritmo di back-propagation usando come funzione di attivazione la sigmoide e come funzione di costo il MSE tra l’immagine di input e quella ricostruita dall’ultimo strato. L’algoritmo è stato analizzato con il profiler predefinito di Matlab che ha identificato le moltiplicazioni tra matrici e il calcolo delle sigmoidi come le parti più pesanti. L’implementazione su GPU è giustificata dalle caratteristiche intrinseche di queste operazioni che sono altamente parallelizzabili e si adattano bene ad architetture manycore. La versione CUDA è stata sviluppata utilizzando la libreria CUBLAS per le moltiplicazioni tra matrici per ottenere le migliori prestazioni mentre le sigmoidi e i calcoli matriciali più semplici sono ottenuti tramite kernel CUDA. I test delle due implementazioni sono stati eseguiti con diverse dimensioni del training set e mostrano uno speed-up massimo di 3.68 per la versione OpenMP e uno speed-up massimo di 215.68 per la versione CUDA. In seguito, l’implementazione in CUDA è stata collaudata su immagini più grandi e i risultati migliori sono stati ottenuti con un training set del 30% e del 50%. Tuttavia l’aumento eccessivo della dimensione fa insorgere il problema dell’overfitting: la rete perde la sua caratteristica di generalità e ottiene un errore grande nella fase di test, pur mantenendo l’errore di training basso. L’algoritmo è stato poi comparato con la sua controparte supervisionata che fa uso di dati già classificati. Questa versione è attualmente in sviluppo presso il laboratorio di Microcalcolatori e non ancora implementata in CUDA quindi è possibile solo un’analisi qualitativa. L’algoritmo è basato su una rete neurale MLP con tre strati e addestrata con l’algoritmo di back-propagation. I test eseguiti hanno mostrato che la versione supervisionata non è in grado di riconoscere e classificare tutti i pixel della scena come la controparte non supervisionata. Questo è dovuto al fatto che i pixel non classificati sono più difficili da riconoscere e classificare. I risultati ottenuti mostrano che utilizzare la tecnologia della GPU è decisamente promettente per l’elaborazione delle immagini iperspettrali grazie alle caratteristiche dell’algoritmo che si adattano molto bene alle architetture manycore.
Hyperspectral images reconstruction for classification through autoencoder neural network on multicore and manycore processing units
TROMBIN, LORENZO
2015/2016
Abstract
The project developed in this thesis was born from a collaboration between the Microcomputer laboratory of the Pavia University and the Hyperspectral Computing Laboratory of the Extremadura University. The aim of this collaboration is to develop new algorithms for the elaboration of the hyperspectral images and their implementation on the GPUs. Hyperspectral images are data collected in different continuous spectral bands by a hyperspectral sensor. This data is represented as a cube in which the spatial information is the X-Y plane and the spectral information is represented along the Z axis. A hyperspectral sensor acquires data in over 100 bands so the amount of data is very large. The research activity is focused on developing algorithms to elaborate and extract information in reasonable time and on obtaining real-time processing. The aim of this thesis is to develop a new algorithm based on neural networks for the classification of hyperspectral data. The first version of the algorithm, developed in Matlab, is based on the version provided by the Hyperspectral Computing Laboratory. The algorithm is based on an autoencoder or Diabolo network that is a combination of two Multi-layer perceptron neural networks. The network is made up of: one input layer, one hidden layer, one output layer that provides the probability distributions for each pixel, a symmetric hidden layer of the same size of the first hidden layer and a reconstruction layer of the same size of the input layer that performs a reconstruction of the input image. The algorithm is completely unsupervised. The entire network is trained using the back-propagation algorithm using as sigmoid as activation functions and as cost function the MSE calculated between the input image and the output of the reconstruction layer. The algorithm has been profiled using the built-in Matlab profiler and the results show that the heaviest parts are the matrix multiplications and sigmoid calculations. The GPU implementation is justified by the nature of these operations that are intrinsically parallelizable and adapt well to manycore architecture. The algorithm has been developed in two versions: OpenMP implementation on multicore architecture and CUDA implementation on NVIDIA manycore architecture. The CUDA version has been developed using the CUBLAS library for the matrix multiplications in order to achieve the best possible performance and custom CUDA kernels for the sigmoids and simpler matrix calculations. The tests of the two applications are performed using different sizes of the training set and show a maximum speed-up of 3.68 for the OpenMP with respect to the serial version and a maximum speed-of 215.68 for the CUDA version. Then the CUDA implementation has been tested on bigger images and the best result of classification is obtained with a training set of 30% and 50%. Unfortunately increasing too much the dimension of the training set and the duration of the training phase the algorithm run into the overfitting problem: the network loses its characteristic of generality and achieves higher test error while obtaining low training error. The solution of this problem is not trivial and there are several complex algorithms to avoid the overfitting. The algorithm is then compared with its supervised counterpart that uses labelled data. This algorithm is in development at the Microcomputer laboratory and not yet implemented in CUDA so it is only possible a qualitative analysis. This version is based on a MLP network with three layers and trained by the back-propagation algorithm. The performed tests show that the supervised algorithm is not able to recognize all patterns in the scene as the unsupervised one. This is because pixels unlabelled are harder to recognize and classify. The obtained results show that the GPU technology is very promising for hyperspectral images processing thanks to the characteristics of the algorithm that fit well the manycore architecture.È consentito all'utente scaricare e condividere i documenti disponibili a testo pieno in UNITESI UNIPV nel rispetto della licenza Creative Commons del tipo CC BY NC ND.
Per maggiori informazioni e per verifiche sull'eventuale disponibilità del file scrivere a: unitesi@unipv.it.
https://hdl.handle.net/20.500.14239/22187