Automatic testing system and method for target tracking embedded software
By designing an automated test system, the tracking results between the Python algorithm end and the embedded target end are compared in real time, and the problems of low manual testing efficiency and error-proneness in the existing technology are solved, and efficient automated testing of the target tracking embedded software is achieved.
Patent Information
- Application Number
- CN202510593098.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-06-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the test of embedded target tracking software mostly relies on manual execution, is inefficient and prone to errors, especially when processing large amounts of data, it is difficult to meet the needs of rapid verification.
An automated test system is designed, including a server and an embedded target machine. Through the target tracking and comparison software, the tracking results of the Python algorithm and the embedded target machine are read in real time, and the visual interface developed by multi-threaded processing and QT framework is used to achieve automated testing of the target tracking embedded software.
It realizes automated testing of target tracking embedded software, improves testing efficiency, reduces manual errors, and can quickly verify the correctness of the transplanted C-language program in large data scenarios.
Smart Images

Figure CN120104467A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software automated testing, and in particular to an automated testing system and method for target tracking embedded software. Background Art
[0002] Target tracking technology is a relatively mature technology. Its purpose is to locate the position of the target in each frame of video image and generate the target motion trajectory. The tracker can predict the image area of the target in each frame. The flowchart of the target tracking algorithm is shown in Figure 1 . Target tracking algorithms are usually written in Python, but in actual applications, they usually need to process large amounts of data or perform high-performance computing, and their processing speed cannot meet the requirements. Generally, they need to be ported to embedded devices and converted from Python to C or other languages, which can greatly improve the software's processing and computing performance and speed up the startup of applications. After Python is ported to C, the following problems are faced: 1. Memory leak problem. C requires programmers to manually release memory; 2. Type conversion problem. The data type conversion method is different; 3. Library function and API difference problem. The library functions of the two are very different. For the ported C language program, a large amount of data comparison test is required with the results of the original algorithm program to verify the correctness of the ported program. A simple and efficient testing method is needed to ensure the stability of the functional performance of the ported C language program.
[0003] Currently, most tests for embedded target tracking software use a test method that manually executes test cases, manually inputs multiple tests, and manually checks the results of the embedded software and compares them with the algorithm results. This test method is not conducive to testing and verifying large amounts of data, has low test efficiency and is prone to errors. The specific disadvantages are as follows: a. High efficiency and low cost. When there are many images and use cases to be tested, multiple tests must be performed manually, which is inefficient and costly. b. The workload is large and prone to errors. When there is a large amount of input data and output target information, manual comparison is huge and prone to errors. Summary of the invention
[0004] In view of this, the present invention proposes an automated testing system and method for target tracking embedded software, which can be used for correctness testing of target tracking embedded software after Python algorithm transplantation, thereby realizing automated testing of target tracking embedded software.
[0005] To achieve the above object, the technical solution of the present invention is: An automated testing system for target tracking embedded software, comprising: a server and an embedded target machine; The server is configured to run the target tracking and comparison software and the Python tracking algorithm program, and the Python tracking algorithm program is installed on the Python algorithm end; the target tracking and comparison software sends image video data to the embedded target machine through the LVDS interface, and reads and compares the tracking results of the Python algorithm end and the embedded target machine end in real time; The embedded target machine is equipped with a DSP processor and runs the transplanted C language target tracking program, and outputs the slicing result information to the server; The Python tracking algorithm program and the C language program of the embedded target machine use the same target tracking model, and the output data format of the two is unified, including the target center point coordinates, confidence, length and width, loss status and predicted position information; The target tracking and comparison software is configured to process the output data of the Python algorithm end and the embedded target machine end in multi-threaded manner, and display the quantitative comparison results and slice images.
[0006] The DSP processor of the embedded target machine is an octa-core processor, and the C language target tracking program is burned into the processor in the form of a .bin executable file.
[0007] The target tracking and comparison software is developed based on the QT framework, and displays the numerical comparison results through the QTableWidget control, and displays the slice images in RAW format through the TableView control.
[0008] The embedded target machine receives the image and video data from the server through the LVDS interface, and outputs the tracking result to the server in a 422 serial port data format.
[0009] Among them, the Python algorithm generates a binary data stream file after each frame of tracking is completed.
[0010] The present invention also provides an automated testing method for target tracking embedded software, which is implemented based on the system of the present invention and includes the following steps: Step 1: Configure the image and video input path, tracking target number, tracking frame number, and result saving path, and simultaneously set the path parameters of the Python algorithm side and the embedded target machine side; Step 2: Start the Python algorithm program and the embedded target machine program, and send image and video data to the embedded target machine through the target tracking and comparison software; Step 3: Read the data stream output by the Python algorithm end and the data stream output by the embedded target machine in real time, and parse them uniformly into structured data including the target center point coordinates, confidence, length and width, loss status, and predicted position; Step 4: After the tracking is completed, select the specified frame number and target number for comparison, and calculate and display the difference between the results at both ends.
[0011] Among them, the Python algorithm side generates a binary data stream file after each frame of tracking is completed; the embedded target machine outputs the tracking results to the specified folder through the LVDS interface, and the data format is consistent with the data on the Python algorithm side.
[0012] The difference calculation in step 4 includes the target center point coordinate offset, confidence difference and length and width error, and the over-threshold items are marked by color.
[0013] Among them, in the step 3, the binary data stream output by the Python algorithm end and the 422 serial port data stream output by the embedded target machine end are read in real time and uniformly parsed into structured data including the target center point coordinates, confidence, length and width, loss status and predicted position.
[0014] Beneficial Effects 1. The system of the present invention is an automated testing system for verifying the correctness of the C language target tracking algorithm after being transplanted to an embedded device, that is, the results of the Python target tracking algorithm and the embedded target tracking software are automatically analyzed and compared, mainly comparing whether the coordinates of the target slice center point, confidence, and similarity output by the two in each frame are within the allowed range, thereby verifying the correctness of the transplantation of the embedded target machine-side target tracking program and realizing automated testing of the target tracking embedded software.
[0015] 2. The system of the present invention uses QT software to design a visual operation interface. The interface operation is simple and does not require manual supervision after operation. Compared with traditional tests, the operation is simpler and easier to use, and a lot of testing time is saved.
[0016] 3. In the system of the present invention, the Python language algorithm program and the C language embedded program are connected through QT software. After the software is running, the test image source can be input into the Python end and the embedded target machine end. After each frame of target tracking result is output on the Python end and the embedded target machine end, the binary data stream file and the LVDS interface are output to the visualization interface to intuitively view the operation results and differences between the two, avoiding complicated comparison and search processes, which is more accurate than manual comparison.
[0017] 4. The method of the present invention is an automated test for verifying the correctness of the C language target tracking algorithm after being transplanted to an embedded device, that is, the results of the Python target tracking algorithm and the embedded target tracking software are automatically analyzed and compared, mainly comparing whether the coordinates, confidence, and similarity of the target slice center point output by the two in each frame are within the allowed range, so as to verify the correctness of the transplantation of the embedded target machine-side target tracking program and realize the automated test of the target tracking embedded software. The method of the present invention is obviously innovative in technology and has significant advantages in practical applications, especially in large-scale data verification and comparison scenarios and large-scale repeatability stability test comparison work scenarios.
[0018] 5. In the method of the present invention, the Python algorithm and the embedded C language end are connected to each other through the automated testing system, and the output results of the two can be intuitively displayed in the output box, directly displaying the comparison test results, avoiding the complicated search and comparison process, and having higher accuracy than manual comparison. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 Schematic diagram of the flow of common target tracking algorithms.
[0020] Figure 2 It is a schematic diagram of the software environment of the automated testing system for target tracking embedded software in an embodiment of the present invention.
[0021] Figure 3 The figure is a schematic diagram of the automated testing process of target tracking embedded software according to the present invention.
[0022] Figure 4 It is a schematic diagram of the software interface of the automated testing system for target tracking embedded software in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0024] The present invention proposes an automated testing system for target tracking embedded software, including an embedded target machine and a server with target tracking comparison software and Python algorithm program installed; the server is used to run the target tracking automated testing application, and pycharm is installed to run the Python algorithm (i.e., Python tracking algorithm) program; the embedded target machine is used to run the target tracking program after the algorithm is transplanted; the server and the embedded target machine transmit data via the LVDS interface, wherein the server outputs the image source to the embedded target machine; the target machine outputs the slicing result information to the server. The software environment of the automated testing system for target tracking embedded software of the present invention is as follows Figure 2 shown.
[0025] Specifically, in this embodiment, the target tracking and comparison software is developed using Qt5.14.2, and the image source is sent to the embedded target machine through the LVDS interface; after the first frame detection is completed, the embedded target machine and the Python algorithm end output the information of up to 20 targets to the target tracking and comparison software; after the target tracking is completed, the image frame number and target number to be compared can be selected through the drop-down box of the target tracking and comparison software. After selection, the target center point coordinates, target confidence, target length and width, whether the target is lost, predicted target center point coordinates of the next frame, etc. of the Python end and the embedded target machine end are displayed in the output box respectively, and the difference between the two is output and displayed.
[0026] In this embodiment, the Python tracking algorithm program is installed on the Python algorithm end, and the execution steps include: obtaining the input image video and performing detection, identification and tracking processing, marking the target slice (32*32 pixel size) and target information (target center point coordinates, target confidence, target length and width) detected on the first frame image, and sorting and numbering the targets according to confidence, and then sending the target slice and target information to the training target model of the target tracking program, performing target tracking on each subsequent frame image, and then feedback updating the target model after obtaining the tracking result. If the target is lost in this frame, a predicted target position is returned. At the end of the tracking processing of each frame, the information of the tracked slice and the result are output and stored in the specified file in the form of a data bit stream, and the target tracking and comparison software reads the specified file and outputs it for display.
[0027] In this embodiment, the embedded target machine burns the C language detection and tracking program after the Python algorithm is translated and transplanted into the DSPC6678 series eight-core processor of the target machine for operation. The target tracking program in the embedded target machine and the Python tracking algorithm program use the same target tracking model. After the tracking processing of each frame is completed, the embedded target machine outputs the information of the target slice after detection and tracking, and outputs it to the folder in the server through the LVDS interface in the 422 serial port data format for storage. The target tracking comparison software reads the folder and outputs it for display.
[0028] The present invention also provides an automated testing method for target tracking embedded software, based on the system implementation of the present invention, Figure 3 The present invention is directed to the automated testing process of target tracking embedded software, and the specific steps are as follows: Step 1: Input the path where the image video is located, the target number to be tracked, the number of frames to be tracked, and the path to save the slice results set by the Python algorithm and embedded target machine programs through the target tracking and comparison software. Step 2: Modify the source video path and the output slice result saving path on the Python algorithm side, and the modified path is consistent with the target tracking and comparison software; run the Python algorithm side program and the embedded target machine program. After the embedded target machine program is loaded, input the image video data to the embedded target machine through the target tracking and comparison software; Step 3: During the automatic tracking process, the Python algorithm end and the embedded target machine end transmit files through binary data streams, and the embedded target machine end outputs the slice information after detection and tracking to the specified folder through LVDS, and the target tracking comparison software reads the first frame result in real time and outputs it to the interface; Step 4: After the target tracking processing of all image frames is completed, select the image frame number and target number to be compared in the target tracking comparison software to start the comparison, and display the target center point coordinates, target confidence, target length and width, whether the target is lost, predicted target center point coordinates of the next frame, and the difference between the target center point coordinates, target confidence, target length and width, etc. of the embedded target machine and the Python algorithm.
[0029] In step 1, after each frame of detection and tracking is completed, the Python algorithm saves each frame of target slices and target information in the form of data stream to the code of the specified folder. The embedded target machine selects the same target tracking model as the Python machine, outputs the target tracking result information through the LVDS interface, saves it to a file in the same data stream format as the Python machine, compiles and runs the C language program to generate a .bin executable file and burns it into the DSP chip of the target machine; In step 2, the Python algorithm program is compiled and run, the embedded target machine is turned on, the tracking command is sent and the state of waiting for receiving the image source data is entered; In step 3, the output data of the Python algorithm and the embedded target machine are set to a unified format for easy query and comparison, including the target center point coordinates, target confidence, target length and width, and the predicted target center point coordinates of the next frame for each slice; the target tracking and comparison software establishes two threads to process the output data of the Python and embedded target machine ends respectively to ensure stable processing and no interface jamming; In step 4, the target tracking and comparison software reads the data stream files of the Python algorithm end and the embedded target machine end in the agreed format, and displays the result information digitally and quantitatively through the QT QTableWidget control, and displays the slice image RAW format through TableView.
[0030] Figure 4 It is a schematic diagram of the software interface of the automated testing system for target tracking embedded software in an embodiment of the present invention.
[0031] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An automated testing system for target tracking embedded software, characterized in that: include: Servers and embedded target machines; The server is configured to run the target tracking and comparison software and the Python tracking algorithm program, and the Python tracking algorithm program is installed on the Python algorithm end; the target tracking and comparison software sends image video data to the embedded target machine through the LVDS interface, and reads and compares the tracking results of the Python algorithm end and the embedded target machine end in real time; The embedded target machine is equipped with a DSP processor and runs the transplanted C language target tracking program, and outputs the slicing result information to the server; The Python tracking algorithm program and the C language program of the embedded target machine use the same target tracking model, and the output data format of the two is unified, including the target center point coordinates, confidence, length and width, loss status and predicted position information; The target tracking and comparison software is configured to process the output data of the Python algorithm end and the embedded target machine end in multi-threaded manner, and display the quantitative comparison results and slice images.
2. The system according to claim 1, characterized in that The DSP processor of the embedded target machine is an octa-core processor, and the C language target tracking program is burned into the processor in the form of a .bin executable file.
3. The system according to claim 2, characterized in that The target tracking and comparison software is developed based on the QT framework, displays the numerical comparison results through the QTableWidget control, and displays the slice images in RAW format through the TableView control.
4. The system according to claim 2 or 3, characterized in that The embedded target machine receives the image and video data from the server through the LVDS interface, and outputs the tracking result to the server in a 422 serial port data format.
5. The system according to claim 4, characterized in that The Python algorithm generates a binary data stream file after each frame of tracking is completed.
6. An automated testing method for target tracking embedded software, implemented based on the system described in any one of claims 1 to 5, characterized in that: The following steps are involved: Step 1: Configure the image and video input path, tracking target number, tracking frame number, and result saving path, and simultaneously set the path parameters of the Python algorithm side and the embedded target machine side; Step 2: Start the Python algorithm program and the embedded target machine program, and send image and video data to the embedded target machine through the target tracking and comparison software; Step 3: Read the data stream output by the Python algorithm end and the data stream output by the embedded target machine in real time, and parse them uniformly into structured data including the target center point coordinates, confidence, length and width, loss status, and predicted position; Step 4: After the tracking is completed, select the specified frame number and target number for comparison, and calculate and display the difference between the results at both ends.
7. The method according to claim 6, characterized in that The Python algorithm generates a binary data stream file after each frame of tracking is completed; The embedded target machine outputs the tracking results to the specified folder through the LVDS interface. The data format is consistent with the data on the Python algorithm side.
8. The method according to claim 6 or 7, characterized in that The difference calculation in step 4 includes the target center point coordinate offset, confidence difference and length and width error, and the over-threshold items are marked by color.
9. The method according to claim 6 or 7, characterized in that In step 3, the binary data stream output by the Python algorithm end and the 422 serial port data stream output by the embedded target machine end are read in real time and uniformly parsed into structured data including target center point coordinates, confidence, length and width, loss status and predicted position.
Citation Information
Patent Citations
Semi-automatic video annotation method based on multi-target tracking
CN111709971A
Low-power-consumption unmanned aerial vehicle autonomous target tracking method
CN115830063A
Real-time image tracking performance test system
CN116560929A
Adaptive system and method for automatic tracking of at least one target in at least one video stream
US20190197706A1