Please use this identifier to cite or link to this item: https://hdl.handle.net/10316/105998
Title: Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learning
Other Titles: Desenvolvimento de sistemas embebidos para deteção de pessoas usando visão térmica e aprendizagem de máquina
Authors: Rodrigues, José Adriano Pais
Orientador: Veloso, Filipe Manuel Almeida
Almeida, Rodrigo Coelho
Keywords: Internet das Coisas; Sistemas Embebidos; Aprendizagem de Máquina; Infravermelho; Câmara Térmica; Internet of Things; Embedded Systems; Machine Learning; Infrared; Thermal Camera
Issue Date: 28-Sep-2022
Serial title, monograph or event: Development of embedded systems for heating, ventilating and air conditioning (HAVAC), using machine learning
Place of publication or event: Bosch Termotecnologia, Aveiro
Abstract: Os sistemas de deteção de humanos mais difundidos dependem fortemente de sensores de movimento e métodos analógicos. Os mais recentes desenvolvimentos neste campo já integram a inteligência artificial, juntamente com a imagiologia de infravermelhos para identificar gestos ou inferir a presença de pessoas nas imagens capturadas. No entanto, a maioria destas abordagens são dirigidas a aplicações muito específicas e apresentam alguns obstáculos, tais como dificuldade de integração em sistemas mais amplos, falta de escalabilidade devido ao uso de dispositivos dispendiosos e forte dependência de serviços externos como a computação em nuvem. O objectivo deste trabalho é desenvolver um método sustentável e eficaz para analisar a ocupação de uma sala em tempo real, utilizando componentes de baixo custo e facilitando a sua integração em sistemas embutidos de maior dimensão. Para atingir este objectivo, foi utilizada uma câmara térmica de baixa resolução para adquirir imagens infravermelhas de salas com diferentes graus de ocupação: vazias, uma pessoa e duas pessoas. A fim de aumentar a variância entre amostras, as imagens foram recolhidas em sete salas diferentes, alterando o ângulo da câmara, a altura, as poses das pessoas e introduzindo fontes externas de calor não humanas. À medida que a câmara ia adquirindo as imagens, estas iam sendo armazenadas num servidor local implementado num computador normal. Algumas arquitecturas de redes neurais distintas foram treinadas com os fotogramas capturados, cada modelo fazendo uso de camadas convolucionais a fim de extrair as características visuais, sendo assim integradas num sistema embutido composto por um microcontrolador e a já mencionada câmara térmica. Um procedimento de inferência em tempo real foi feito, prevendo o número de pessoas que a câmara capturava. Esta metodologia distingue entre uma pessoa, duas pessoas e uma sala vazia. A fim de implementar a inferência dos modelos, foi necessário realizar algumas otimizações de memória, tanto na arquitectura de rede como na alocação da memória do microcontrolador, sendo a matriz de pesos codificada no \textit{Firmware}. As camadas e parâmetros das redes foram escolhidos de modo a obter a melhor relação possível entre eficácia e consumo de recursos, de modo a que o hardware com restrições de memória pudesse lidar com os modelos. Este trabalho também cimentou as bases para a implementação da aprendizagem de transferência em tempo real, realizando sucessivos procedimentos de otimização dentro do microcontrolador, usando conjuntos de imagens capturadas. Isto permitiu ao sistema adaptar-se melhor a novas salas e aumentar o seu desempenho ao longo do tempo, treinando a última camada da rede. Embora esta implementação não tenha sido acabada, foi desenhada uma rede neural \textit{feed-forward} para funcionar como uma camada extra de uma rede neural convolucional, utilizando como caraterísticas os resultados da camada softmax do modelo anterior, juntamente com três novas métricas extraídas: a temperatura média da matriz de píxeis, o número de píxeis com valores acima de um limite predefinido e a pontuação de adjacência. Este modelo de camada extra foi integrado no microcontrolador para realizar inferência. Embora a aprendizagem de transferência não tenha sido implementada, foi realizada uma simulação, com o mesmo servidor local utilizado durante a aquisição das imagens. As amostras foram capturadas e transmitidas, tendo a aprendizagem de transferência sido feita fora do microcontrolador. Todas as implementações foram testadas e analisadas minuciosamente, tendo a rede neural convolucional treinada com imagens segmentadas obtido os melhores resultados e a rede de camada extra os piores para a metodologia de inferência. No entanto, a simulação de aprendizagem de transferência mostrou um aumento progressivo da precisão, podendo a camada extra superar as melhores redes no procedimento de inferência, dado suficientes iterações de otimização.
The most widespread human sensing systems rely heavily in motion sensors and analogical methods. The most recent developments in this field already integrate artificial intelligence along with infrared imaging in order to identify gestures or infer the presence of people in the captured image frames. However, most of these approaches are directed at very specific applications and present some obstacles such as difficulty of integration in broader systems, lack of scalability due to expensive hardware and heavy dependencies on external services such as cloud. The aim of this work is to develop a sustainable and effective method to analyse the occupation of a room in real-time using low cost components and easing its integration in larger embedded systems. In order to achieve this goal, a low resolution thermal camera was used to acquire infrared images of rooms with different degrees of occupation: empty, one person and two people. In order to increase the variance between samples, the images were collected in seven different rooms, changing the camera angle, height, people's poses and introducing external non-human heat sources. As they were acquired by the camera, the images were stored in a local server implemented on a regular computer. Some distinct neural network architectures were trained with the captured frames with every model making use of convolutional layers in order to extract the visual features and being integrated in an embedded system comprised of a microcontroller and the before mentioned thermal camera. A real-time inference procedure would then take place, predicting the number of people the camera captured. This methodology distinguished between one person, two people and empty room. In order to implement the models' inference, some memory optimizations had to be performed, both in the network architecture and in the microcontroller's memory allocation with the weight matrix being hard-coded in the Firmware. The networks' layers and parameters were chosen in order to achieve the best trade off between effectiveness and resource consumption so the memory constrained hardware could handle the implementation. This work also laid the foundation for implementing transfer learning in real-time, making successive fine-tuning procedures inside the microcontroller with batches of captured images. This allowed the system to better adapt to new rooms and increase its performance as time passes by training the last layer of the network. Even though this implementation was not complete, a feed-forward neural network was designed to work as an extra layer of a simple convolutional neural network. It took the outputs from the previous model's softmax layer, using them as features along with three new extracted metrics: the average temperature in the frame, the number of pixels above a threshold and the adjacency score. This extra layered model was integrated in the microcontroller to perform inference. Although the transfer learning was not complete, a simulation was performed, with the same local server used during the image acquisition. The frames would be captured and transmited, and the transfer learning would take place outside the microcontroller. All the implementations were tested and analyzed thoroughly with the results showing the convolutional neural network trained with threshold segmented images as the best performer and the extra layered network as the worst for the inference methodology. However, the transfer learning simulation showed a progressive increase in accuracy and, with enough fine-tuning iterations, the extra layer could even outperform the best networks in the inference procedure.
Description: Dissertação de Mestrado em Engenharia Física apresentada à Faculdade de Ciências e Tecnologia
URI: https://hdl.handle.net/10316/105998
Rights: openAccess
Appears in Collections:UC - Dissertações de Mestrado

Files in This Item:
File Description SizeFormat
Tese_José Adriano Rodrigues.pdf6.27 MBAdobe PDFView/Open
Show full item record

Page view(s)

54
checked on Apr 30, 2024

Download(s)

45
checked on Apr 30, 2024

Google ScholarTM

Check


This item is licensed under a Creative Commons License Creative Commons