Model Optimization for Vehicle Recognition on Edge Devices
Abstract:
Video surveillance is commonly used for the protection of military installations. Within video surveillance, artificial intelligence (AI) techniques are often incorporated for object recognition and motion tracking. Network communication and stable power are usually required to operate such systems. Hence, they are not often deployed in remote areas where stable network connectivity and power supply cannot be supported. The emergence of lightweight edge devices with low power requirements and high processing power to run AI, however, has offered an avenue to deploy AI in remote areas. Thus, the focus shifts to the type of AI used in video surveillance systems. One approach is machine learning (ML), in which the ML models need to be trained and optimized within network and power constraints while maintaining good inference performance. This research explores ML for vehicle recognition via transfer learning of various state-of-the-art convolutional neural network models. Also, we study the effects of applying optimization techniques, pruning, and quantization, to improve performance and allow for deployment of the models on an edge device, the Raspberry Pi 4. This study found that the MobileNet model, when trained on a vehicles dataset and optimized with post-training weights pruning and full integer quantization, achieves an inference accuracy of 81.88% with a latency of 132 ms and a compressed model size of 3.44 MB, making it viable forreal-time inference applications.