## 2 Related Work  
The main objective of our paper is to develop an intelligent camera system capable of processing a camera feed in real time to calculate the number of vehicles in each category passing through an intersection, as well as the total number of vehicles passing through each path. In the literature, we found various pieces of research and projects related to this problem and we would like to cite some examples. [PERSON] et al. [9] presented a vehicle-counting system that utilized the YOLOv5 algorithm for object detection and Deep SORT for tracking. They collected a database of vehicles with four classes and deployed their system on an Nvidia Jetson Nano card, which can process at a speed of 15 fps. However, their system was only tested on videos; to truly evaluate the performance of a solution, it should be tested in real-time conditions under various lighting and weather conditions. Therefore, to ensure optimal performance, it is necessary to train a robust model that can handle different lighting and weather conditions. [PERSON] et al., 2021 [10] presented a low-cost and effective system that integrated object detection models to detect, track, and count vehicles. They created a vehicle detection dataset representing traffic conditions in Vietnam and evaluated several deep learning models on two different types, a Coral Dev Board that supported TPU and then an Nvidia Jetson Nano Board that supported GPU. However, their study acknowledged the need to improve the inference time of the model for optimal performance. To address this limitation, our work aims to optimize the inference time, thus making a system that is even more practical for traffic control and management. [PERSON] et al., 2021 [11] assessed the performance of Nvidia cards by using machine learning to count vehicles in real time in the city of Quito, Ecuador. They evaluated performance based on several factors, including resource utilization (GPU and CPU), power consumption, the temperature of the card, and the RAM usage during processing. Additionally, they confirmed the need to increase the precision of their model, as the use of OpenDataCam for vehicle-counting and identification proved effective, but certain factors such as camera position, lighting, vehicle size and speed, and traffic flow needed to be considered. Therefore, it is necessary to find a solution that can adapt to all these conditions. [PERSON] et al., 2017 [12] developed a driving-assistance system utilizing embedded cards, such as the Nvidia Jetson. The system consists of two components: the first one utilizes image processing techniques to locate signs, while the second uses a convolutional neural network (CNN) to classify the detected signs. The proposed system was implemented on the Nvidia Jetson TX1 board with a web camera. Although the system achieved a high detection accuracy of 96%, the frame rate was low, at 1.6 frames per second (FPS). Therefore, a faster model is needed to be deployed on the Jetson card. [PERSON] et al., 2020 [13], proposed an integrated solution that combines detection, tracking, and trajectory modeling algorithms for vehicle detection and counting. They utilized a GMM-type backward modeling approach along with a machine-learning-based detector to enhance the accuracy of vehicle detection and counting precision. They also implemented a trajectory modeling scheme that considers the direction and trajectory of the vehicles. However, their algorithm still has limitations, such as typical detection failures, false positives due to dynamic backgrounds or reflections, and missing detections of vehicles that are too large or too small. Therefore, there is a need to consider more robust algorithms to overcome these issues. We have taken into consideration the limitations and difficulties highlighted by previous studies in the field of vehicle detection and counting.