Durães, João António Pereira AlmeidaMendes, Mateus Daniel AlmeidaCruz, Samuel Silva da2023-01-262023-01-262021-12-202021-07-30http://hdl.handle.net/10400.26/43381The present document describes a system for controlling the quality of heat sealed bottles. The system detects defective seals to identify bottles that can not be sold. A prototype was developed to validate and test the system proposed. In the production line, the bottles are filled with a toxic substance and can only be sold when properly sealed. A leak can be harmful to humans and the environment. Because the seals are not visible from outside the bottle, images from each seal are obtained using a thermal camera. The hot glue used in the sealing process makes the seal visible in the infrared image. The image is cleaned and converted to black and white only keeping the seal in the final image. Black pixels present the value 0 and white pixels present the value 1. Then a signature composed by two arrays containing the sum of the number of white pixels in each column and in each row is calculated. Both arrays present a U shape when the bottle is sealed. The signature is then fed to an artificial neural network which was trained to identify correctly sealed bottles. The classification results are stored in a database. The trained neural net presented an accuracy of 98.7 % and an F1 score of 96.0 % in the testing phase. The results shows the inspection process is effective in identifying defective seals and because it is automated it can be scaled up to large bottle processing plants. All classified images can be seen though a web application where a user has the option of validating the operation and identifying errors which will be individually fitted to improve the machine learning model performance. The system is non invasive, automated, and can be applied to common conveyor belts currently used in industrial plants. It can also be adapted to detect different prob lems in bottles of different shapes.Nesta dissertação é descrito um sistema de controlo de qualidade de selos em garrafas. Foi contruído um protótipo com o objetivo de testar e validar o funcionamento do sistema. Na linha de produção, as garrafas são cheias com uma substância tóxica e apenas podem ser vendidas quando corretamente seladas pois uma fuga põe em risco a saúde do utilizador. A dificuldade deste processo deve-se ao facto de o selo não ser visível pois encontra-se debaixo da tampa opaca da garrafa. Dado o uso de cola quente no processo de selagem, com uma câmara térmica é possível obter uma imagem do selo. Esta imagem é depois processada com o intuito de isolar o selo na imagem final. Da imagem final gera-se uma assinatura que consiste na juncão de duas listas contendo a soma do número de pixels brancos por coluna e por linha. Ambas as listas apresentam uma forma de ‘U’ quando a garrafa está corretamente selada. Uma rede neuronal utiliza a assinatura para classificar a imagem, identificando garrafas mal seladas. O resultado obtido é registado numa base de dados. A rede neuronal treinada apresentou uma accuracy de 98,7 % e um F1 score de 96,0 % na fase de treino mostrando que é eficiente na identificação de selos defeituosos. O sistema inclui a possibilidade de validar as classificações usando uma aplicação web onde é possível analisar o histórico de imagens. Quando uma imagem incorretamente classificada é identificada, esta deve ser selecionada e novamente treinada para corrigir o erro e permitir que o modelo tenha capacidade de aprendizagem. Este método não é invasivo nem destrutivo, é automatizado e pode ser usado na produção de produtos diferentes desde que o processo de selagem seja semelhante.engQuality-controlMachine learningComputer visionThermal imagesArtificial neural networksReal-time quality control of heat sealed bottlesmaster thesis203003586