# Deep Learning-Based Portable Image Analysis System for Real-Time Detection of _Vespa velutina_
## 2 Materials and Methods  
### System Configuration and Operation Process  
The system developed in this study consists of image analysis and communication parts that can be installed on-site, an app that can be installed on the user's smartphone, and a server that supports communication between these two systems. The image analysis part is mounted with an image analysis device and an image acquisition device. Most deep learning models show better processing performance when using GPUs instead of CPUs [26]. Therefore, the image analysis device was equipped with NVIDIA Jetson Xavier NX, which has 48 Tensor Cores, 384 CUDA Cores, and a 16 GB 128-bit LPDDR4x memory. The image acquisition device, which is connected to the image analysis device, captures 1920 \(\times\) 1080 resolution image data at a rate of 30 frames per second and sends it to the image analysis device. The image analysis device performs real-time display, _V. velutina_ object detection, and image data network transmission using the real-time streaming protocol (RTSP) and stores image data in a USB. Performing object detection for each frame of image data in the image analysis device can cause a bottleneck in the system. To solve this issue, _V. velutina_ detection was configured to be performed once every 10 frames of acquired image data, i.e., three times per second. At the bottom of the image analysis part, HDMI, LAN, and power connectors that can be connected to the communication part and USB 3.0 terminals that can connect additional storage are placed. Furthermore, the communication part is equipped with a monitor that can be connected to the image analysis device, an LTE router, and a power supply device to supply power to the system. A 220 AC external power source is connected to the power supply device, and DC power is supplied after passing through an AC-DC converter. At the bottom of the communication part, an HDMI cable that can be connected to the image analysis part, a LAN connector, and AC input and DC output connectors for the power supply are placed. Both the image analysis and communication parts are made with waterproof connectors considering that they are installed outdoors. The application is installed on the user's mobile phone and provides functions for field monitoring and alarms when _V. velutina_ appears. In addition, it is possible to set the alarm resending time and manage registered devices in the application, monitor each registered device, and check the history of _V. velutina_ detection. The server acts as a communication relay between the image analysis device and the mobile application and stores image data in which _V. velutina_ was detected (Figure 1).  
The system automatically starts detecting _V. velutina_ once power is supplied. The image analysis device acquires image data at a resolution of \(1920\times 1080\) through the  
Figure 1: Deep learning-based portable real-time _V. velutina_ detection image analysis system: (**a**) Portable system; (**b**) Block diagram of the system.  
connected image acquisition device and converts it to 640 \(\times\) 480. This downsampling is performed to reduce the size of the acquired image data, thereby decreasing the transmission time. Real-time image data transmission is then performed using the RTSP. The pre-trained YOLOv5s algorithm is used to detect _V. velutina_ objects in the original image data. When a _V. velutina_ object is detected in image data, the algorithm converts the image data that display it to a resolution of 640 \(\times\) 480 and transmits it to the server in JavaScript Object Notation format. The server stores the received image data in the database and sends a notification to the registered mobile app users. Upon checking the alarm, users can run the app to view the _V. velutina_ detection image data stored in the server's database. Additionally, real-time monitoring of image data transmitted via RTSP is possible (Figure 2).