A method, device, equipment and storage medium for target trajectory verification

By generating the video to be detected and determining the target pixel area and the pixel point marked, the problem of large deviation between the target trajectory and the real motion trajectory is solved, and the accuracy of the target trajectory is improved.

CN113850750BActive Publication Date: 2025-06-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010523193.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-10
Publication Date
2025-06-20
Estimated Expiration
2040-06-10

AI Technical Summary

Technical Problem

The prior art does not conduct further detection after obtaining the target trajectory, resulting in a large deviation from the target trajectory and the real motion trajectory and low accuracy.

Method used

By obtaining the target trajectory in the initial video, and generating the video to be detected based on the target trajectory and the target image, determining the annotated pixel point and the target pixel area, and generating the trajectory verification result to improve the accuracy of the target trajectory.

Benefits of technology

Through the trajectory verification results generated by the target pixel area and the marked pixel point, it can be determined that the target trajectory has a small deviation from the real motion trajectory, thereby improving the accuracy of the target trajectory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850750B_ABST
    Figure CN113850750B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, device and storage medium for target trajectory verification, which are used in the field of artificial intelligence. The method of the present application includes: obtaining an initial video; obtaining a target trajectory according to the initial video; generating a video to be detected based on the target trajectory and a target image; determining marked pixel points according to the initial video; determining a target pixel region according to the video to be detected; and generating a trajectory verification result according to the marked pixel points and the target pixel region. The present application determines the target pixel region according to the video to be detected generated based on the target trajectory and the target image, thereby improving the accuracy of the target pixel region corresponding to the target trajectory. The marked pixel points can accurately represent the trajectory of the target object. Therefore, through the trajectory verification result generated by the target pixel region and the marked pixel points, it can be determined that the deviation between the target trajectory with the trajectory verification result passing and the true motion trajectory is small, thereby improving the accuracy of the target trajectory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and in particular, to a method, apparatus, device, and storage medium for verifying a target trajectory. Background Art

[0002] With the development of technology and the progress of the field of artificial intelligence, target detection and traceability technologies have been widely applied in people's lives. Using target detection and traceability technologies, the motion trajectory of a target object changing over time can be predicted. That is, each frame in a video can be first detected for the target object through image recognition technology, and then the motion trajectory of the target object can be predicted and traced to obtain the target trajectory.

[0003] Currently, the target trajectory of a target object can be obtained through the inter-frame difference method (Temporal Difference) with small computational complexity, few noise points, and insensitivity to illumination. The target trajectory can also be obtained through other methods such as the background subtraction algorithm, the Gaussian mixture model (GMM), and the optical flow method to achieve the purpose of target detection and traceability.

[0004] However, after obtaining the target trajectory, the obtained target trajectory is not further detected, which may result in a large deviation between the target trajectory and the true motion trajectory, and thus the accuracy of the obtained target trajectory is low. Summary of the Invention

[0005] Embodiments of this application provide a method, apparatus, device, and storage medium for verifying a target trajectory, which are used to determine a target pixel region according to a target trajectory and a to-be-detected video generated from a target image, thereby improving the accuracy of the target pixel region corresponding to the target trajectory. Since the labeled pixel points can accurately represent the trajectory of the target object, the trajectory verification result generated by the target pixel region and the labeled pixel points can be used to determine that the deviation between the target trajectory with a passed trajectory verification result and the true motion trajectory is small, thereby improving the accuracy of the target trajectory.

[0006] In view of this, on the one hand, this application provides a method for verifying a target trajectory, including:

[0007] Obtain an initial video, where the initial video includes N target objects, and N is a positive integer greater than or equal to 1;

[0008] Obtain a target trajectory according to the initial video, where the target trajectory is the motion trajectory of N target objects;

[0009] Generate a video to be detected based on a target trajectory and a target image, where the video to be detected includes N objects to be detected, and the object to be detected is obtained by adding the target image to the target object, and the target image is a color block composed of vertically alternating first and second colors;

[0010] Determine marked pixel points according to the initial video, where the marked pixel points correspond to the target object;

[0011] Determine a target pixel region according to the video to be detected, where the target pixel region corresponds to the target image;

[0012] Generate a trajectory verification result according to the marked pixel points and the target pixel region, where the trajectory verification result includes passed and not passed.

[0013] On the other hand, this application provides a target trajectory verification device, including:

[0014] An acquisition module, configured to acquire an initial video, where the initial video includes N target objects, and N is a positive integer greater than or equal to 1;

[0015] The acquisition module is further configured to acquire a target trajectory according to the initial video, where the target trajectory is the movement trajectory of N target objects;

[0016] A generation module, configured to generate a video to be detected based on the target trajectory and the target image, where the video to be detected includes N objects to be detected, and the object to be detected is obtained by adding the target image to the target object, and the target image is a color block composed of vertically alternating first and second colors;

[0017] A determination module, configured to determine marked pixel points according to the initial video, where the marked pixel points correspond to the target object;

[0018] The determination module is further configured to determine a target pixel region according to the video to be detected, where the target pixel region corresponds to the target image;

[0019] The generation module is further configured to generate a trajectory verification result according to the marked pixel points and the target pixel region, where the trajectory verification result includes passed and not passed.

[0020] In a possible design, in an implementation manner of the embodiments of this application,

[0021] The acquisition module is specifically configured to acquire the target trajectory according to the initial video by using a trace tracing algorithm;

[0022] The generation module is specifically configured to add the target image to the target object to obtain N objects to be detected;

[0023] Generate a video to be detected based on a target trajectory and an object to be detected, where the video to be detected includes M video frames to be detected, and M is a positive integer greater than or equal to 1.

[0024] In a possible design, in another implementation manner of the embodiments of the present application,

[0025] A determination module, specifically configured to determine M video frames to be detected according to the video to be detected;

[0026] Based on the video frames to be detected, determine Q target pixel points through a target image, where Q is a positive integer greater than 1;

[0027] Generate a target pixel area according to the Q target pixel points.

[0028] In a possible design, in another implementation manner of the embodiments of the present application,

[0029] A determination module, specifically configured to manually annotate an initial video to generate an annotated video, where the annotated video includes M annotated video frames, and the annotated video frames include N annotated pixel points;

[0030] Determine the annotated pixel points according to the annotated video.

[0031] In a possible design, in another implementation manner of the embodiments of the present application,

[0032] A determination module, specifically configured to determine M annotated video frames according to the annotated video;

[0033] Based on the annotated video frames, determine N annotated bounding boxes;

[0034] Determine the annotated pixel points according to the N annotated bounding boxes.

[0035] In a possible design, in another implementation manner of the embodiments of the present application,

[0036] A generation module, specifically configured to determine an annotation time point and annotation pixel values according to the annotated pixel points, where the annotation time point and the annotation pixel values have a corresponding relationship, the annotation time point is the moment corresponding to the annotated video frame, and the annotation pixel values include the abscissa of the annotated pixel point and the ordinate of the annotated pixel point;

[0037] Determine a target time point and a set of target pixel values according to the target pixel area, where the target pixel area includes Q target pixel points, the target time point and the set of target pixel values have a corresponding relationship, the target time point is the moment corresponding to the video frame to be detected, and the set of target pixel values includes the abscissas of the Q target pixel points and the ordinates of the target pixel points;

[0038] Generate a trajectory verification result based on the marked time point, target time point, marked pixel value, and set of target pixel values.

[0039] In a possible design, in another implementation manner of the embodiments of the present application,

[0040] The generation module is specifically configured to determine that the trajectory verification result passes when the marked time point is the same as the target time point and the marked pixel value belongs to the set of target pixel values;

[0041] When the marked time point is the same as the target time point and the marked pixel value does not belong to the set of target pixel values, it is determined that the trajectory verification result fails.

[0042] Another aspect of the present application provides a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When it runs on a computer, the computer is made to execute the methods in the above aspects.

[0043] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0044] In the embodiments of the present application, a method for target trajectory verification is provided. First, an initial video including N target objects is obtained, where N is a positive integer greater than or equal to 1. Then, a target trajectory is obtained based on the initial video. The target trajectory is the movement trajectory of N target objects. Then, based on the obtained target trajectory and a target image, a to-be-detected video including N to-be-detected objects is generated. The to-be-detected object is obtained by adding the target image to the target object. The target image is a color block composed of first and second colors arranged vertically and alternately. Secondly, based on the initial video, marked pixel points are determined. The marked pixel points correspond to the target objects. Then, based on the to-be-detected video, a target pixel area is determined. The target pixel area corresponds to the target image. Finally, based on the marked pixel points and the target pixel area, a trajectory verification result is generated. The trajectory verification result includes passing and failing. In the above manner, the target trajectory is obtained based on the initial video, and the target pixel area is determined based on the to-be-detected video generated based on the target trajectory and the target image. Since the target image is a color block composed of first and second colors arranged vertically and alternately, the target image can be distinguished from the background in the to-be-detected video. Therefore, the accuracy of the target pixel area corresponding to the target trajectory can be improved. And the marked pixel points can accurately represent the trajectory of the target object. Therefore, generating the trajectory verification result based on the marked pixel points and the target pixel area can represent the deviation between the target trajectory and the real movement trajectory. It can be determined that the deviation between the target trajectory with a passed trajectory verification result and the real movement trajectory is small, thereby improving the accuracy of the target trajectory. Description of the Drawings

[0045] Figure 1It is a schematic architecture diagram of the target trajectory verification system in the embodiments of the present application;

[0046] Figure 2 It is a schematic diagram of an embodiment of the method for target trajectory verification in the embodiments of the present application;

[0047] Figure 3 It is a schematic diagram of an embodiment of the initial video in the embodiments of the present application;

[0048] Figure 4 It is a schematic diagram of an embodiment of the target image in the embodiments of the present application;

[0049] Figure 5 It is a schematic diagram of an embodiment of the video to be detected in the embodiments of the present application;

[0050] Figure 6 It is a schematic diagram of an embodiment of determining the target pixel region in the embodiments of the present application;

[0051] Figure 7 It is a schematic diagram of an embodiment of determining the labeled pixel points in the embodiments of the present application;

[0052] Figure 8 It is a schematic diagram of an embodiment of the target trajectory verification device in the embodiments of the present application;

[0053] Figure 9 It is a schematic structural diagram of the computer device in the embodiments of the present application. Specific embodiments

[0054] The embodiments of the present application provide a method, device, equipment and storage medium for target trajectory verification, which are used to determine the target pixel region according to the target trajectory and the video to be detected generated from the target image, thereby improving the accuracy of the target pixel region corresponding to the target trajectory. And the labeled pixel points can accurately represent the trajectory of the target object. Therefore, through the trajectory verification result generated by the target pixel region and the labeled pixel points, it can be determined that the deviation between the target trajectory with the trajectory verification result passed and the real motion trajectory is small, thereby improving the accuracy of the target trajectory.

[0055] In the description, claims and the above drawings of the present application, terms such as "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "corresponding to" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0056] It should be understood that the method for target trajectory verification provided in the present application can be applied to various target detection and traceability scenarios, such as robot navigation, intelligent video monitoring, industrial inspection and other scenarios. Specifically, taking the application to the target detection and traceability scenario of video as an example for introduction, that is, the target detection and traceability technology can be used to predict the motion trajectory of the target object over time. That is, the target object can be detected in each frame of the video through image recognition technology, and then the motion trajectory of the target object can be predicted and traced to obtain the target trajectory. At present, the time interval between two adjacent frames in the video is very short. Therefore, when the background change is not very drastic and rapid, the difference between the front and rear two images can be used to judge the moving target in the painting. By adjusting the set threshold, the detection sensitivity of the method can be changed. Therefore, the target trajectory of the target object can be obtained by the inter-frame difference method. Secondly, when a moving target appears in the video, there must be a difference in the vectors between the pixel points occupied by the moving target in the picture and the background pixel points. If no moving target appears, the vector change of the pixel points in the picture should be smooth. Due to the difference in the vectors between the pixel points, the optical flow method can also be used to assign pixel-by-pixel vectors to the images in the video first, and the moving target in the picture can be detected by using the difference, so as to obtain the target trajectory of the target object. It can be understood that the methods for obtaining the motion trajectory of the target object may also include, but are not limited to, other methods such as background subtraction algorithm, Gaussian background modeling method, and codebook method to achieve the purpose of target detection and traceability. However, after obtaining the motion trajectory of the target object, the obtained target trajectory is not further detected, which may result in a large deviation between the target trajectory and the true motion trajectory, and thus the accuracy of the obtained target trajectory is low.

[0057] In order to improve the accuracy of the target trajectory in the above various scenarios, the present application proposes a method for target trajectory verification, which is applied to Figure 1The target trajectory verification system shown can be referred to Figure 1 , Figure 1 which is a schematic architecture diagram of the target trajectory verification system in an embodiment of the present application. As shown in the figure, the target trajectory verification system includes a server and terminal devices. The target trajectory verification device can be deployed on the server or on the terminal devices. Hereinafter, the case where the target trajectory verification device is deployed on the server will be taken as an example for introduction. The server can obtain an initial video including a target object, and then obtain a target trajectory based on the initial video. The target trajectory is the movement trajectory of the target object. Then, based on the obtained target trajectory and the target image, a detection video including a detection object is generated. The detection object is obtained by adding the target image to the target object. The target image is a color block composed of vertically alternating first and second colors. The server can further determine marked pixel points according to the initial video. The marked pixel points correspond to the target object, and determine a target pixel area according to the detection video. The target pixel area corresponds to the target image. Finally, a trajectory verification result is generated according to the marked pixel points and the target pixel area. The trajectory verification result includes passed and not passed. When the trajectory verification result is passed, the developer can determine that the deviation between the target trajectory and the real movement trajectory is small. When the trajectory verification result is not passed, the developer can determine that there is a large deviation between the target trajectory and the real movement trajectory. Thus, the target trajectory can be adjusted according to the trajectory verification result. After adjusting until the trajectory verification result is passed, the deviation between the target trajectory and the real movement trajectory can be reduced, thereby improving the accuracy of the target trajectory.

[0058] It should be noted that Figure 1 the server in Figure 1 can be a single server or a server cluster or a cloud computing center composed of multiple servers, etc., and is not specifically limited here. The terminal device can be Figure 1 the tablet computer, laptop computer, palm computer, mobile phone, personal computer (PC), smart TV, voice interaction device, etc. shown in

[0059] Although Figure 1 only five terminal devices and one server are shown in Figure 1 it should be understood that Figure 1 the examples in

[0060] The embodiments of this application can achieve object detection and traceability based on Artificial Intelligence (AI) technology. Some basic concepts in the field of AI will be introduced below. AI uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, and is a theory, method, technology, and application system that can perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, enabling machines to have the functions of perception, reasoning, and decision-making. Artificial intelligence technology is an interdisciplinary subject with a wide range of fields, including both hardware-level and software-level technologies. Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. Machine Learning (ML) is an interdisciplinary subject that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rote learning.

[0061] With the research and progress of AI technology, AI technology is being studied in various directions. Computer Vision (CV) is a science in the various research directions of AI technology that studies how to enable machines to "see". More specifically, it refers to using cameras and computers to replace the human eye to perform machine vision such as target recognition, trace tracing, and measurement on targets, and further perform graphic processing to make the computer process into images that are more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to build AI systems that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, Optical Character Recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, etc. technologies, and also includes common biometric recognition technologies such as face recognition and fingerprint recognition.

[0062] The solution provided in the embodiments of this application relates to the computer vision technology of artificial intelligence. Combining the above introduction, the method for target trajectory verification in this application will be introduced below. Please refer to Figure 2 , Figure 2 is a schematic diagram of an embodiment of the method for target trajectory verification in the embodiments of this application. As shown in the figure, an embodiment of the method for target trajectory verification in the embodiments of this application includes:

[0063] 101. The server obtains an initial video, where the initial video includes N target objects, and N is a positive integer greater than or equal to 1;

[0064] In this embodiment, the server obtains an initial video including N target objects, and N is a positive integer greater than or equal to 1. Specifically, the initial video can be a real-time video obtained during the process, or a video saved on the server after recording. Secondly, the target object can be a person, a motor vehicle, or a flower, plant, or animal. For example, the target objects include person A and person B, or the target objects include motor vehicle A and motor vehicle B, or the target objects include person A, motor vehicle A, and animal A.

[0065] For the sake of easy understanding, taking the target objects as people and motor vehicles as examples for illustration. Please refer to Figure 3 , Figure 3 is a schematic diagram of an embodiment of the initial video in the embodiments of this application. As shown in the figure, Figure 3 in (A) shows a schematic diagram of the initial video with the target object being a person in the initial video. This initial video includes target object A1 and target object A2, and Figure 3The initial video schematic diagram in (B) shows that the target object in the initial video is a motor vehicle. The initial video includes target object A3 and target object A4. It should be understood that the foregoing examples are only for understanding this solution, and the specific target object should be flexibly determined according to the actual situation.

[0066] 102. The server obtains a target trajectory according to the initial video, where the target trajectory is the movement trajectories of N target objects;

[0067] In this embodiment, the server obtains a target trajectory according to the initial video obtained in step 101. The target trajectory is the movement trajectories of N target objects. For example, if the initial video includes 1 target object, the target trajectory is the movement trajectory corresponding to this target object respectively. If the initial video includes 5 target objects, the target trajectory is the movement trajectories corresponding to the 5 target objects respectively. The specific number of movement trajectories included in the target trajectory should be flexibly determined according to the number of target objects.

[0068] 103. The server generates a video to be detected based on the target trajectory and the target image. The video to be detected includes N objects to be detected, and the object to be detected is obtained by adding the target image to the target object. The target image is a color block composed of first color and second color arranged vertically and alternately;

[0069] In this embodiment, the server generates a video to be detected including N objects to be detected based on the target trajectory and the target image obtained in step 102. The target image is a color block composed of first color and second color arranged vertically and alternately, and the object to be detected is obtained by adding the target image to the target object.

[0070] Specifically, since there may be similar solid-color color blocks in the video to be detected, using color blocks composed of the first color and the second color arranged vertically and alternately can distinguish the area covered by the target image from the background. Secondly, when the initial video includes multiple target objects, multiple corresponding target trajectories can be obtained. When the target trajectories overlap, multiple target images may overlap. However, the color blocks arranged vertically and alternately will not affect the detection of the target image, thus making the recognition of the target image more accurate. In this embodiment, the first color is red and the second color is blue as an example, that is, the target image is a color block with blue (R, G, B) = (0, 0, 255) and red (R, G, B) = (255, 0, 0) alternating, and the width of a vertical area is 20 pixels. For example, if the width of the target image is 100 pixels, the target image can be a color block composed of alternating 20-pixel-wide blue areas and 20-pixel-wide red areas. Then, adding this target image to the target object can obtain the object to be detected. For example, if the target object is a person, the target image can be added to the corresponding area of the person's face. If the target object is a motor vehicle, the target image can be added to the corresponding area of the center point of the motor vehicle.

[0071] For ease of understanding, taking the first color as blue and the second color as red as an example for illustration, please refer to Figure 4 , Figure 4 which is a schematic diagram of an embodiment of the target image in the embodiment of the present application. As shown in the figure, Figure 4 in (A) shows a schematic diagram of the target image with the width of the color corresponding area being 25 pixels, and the length of the target image being 100 pixels and the width being 125 pixels. And Figure 4 in (A) shows a schematic diagram of the target image with the width of the color corresponding area being 20 pixels, and the length of the target image being 100 pixels and the width being 200 pixels. Further, taking the target image as Figure 4 the schematic diagram shown in (B) and the target object being a person, and adding the target image to the face area of the person as an example for illustration, please refer to Figure 5 , Figure 5 which is a schematic diagram of an embodiment of the video to be detected in the embodiment of the present application. As shown in the figure, Figure 5 in (A) shows the initial video including the target object B1 and the target object B2. Then, adding the target image B3 to the corresponding areas of the faces of the target object B1 and the target object B2 can obtain Figure 5 the video to be detected shown in (B) including the object to be detected B4 and the object to be detected B5.

[0072] It is understandable that the foregoing examples are only for understanding this embodiment. The size of the target image, the first color, the second color, and the width of the color corresponding area should all be flexibly determined according to the actual situation. Secondly, the area added by the target image on the target object should also be flexibly determined according to the actual situation.

[0073] 104. The server determines marked pixel points according to the initial video, where the marked pixel points correspond to the target object.

[0074] In this embodiment, marked pixel points are determined according to the initial video obtained in step 101, and the marked pixel points correspond to the target object. Specifically, each target object in the initial video can be marked manually to obtain the marked pixel points corresponding to each target object. For example, if there is 1 target object in the initial video, 1 marked pixel point corresponding to this target object can be determined, while if there are 5 target objects in the initial video, 5 marked pixel points corresponding to the 5 target objects respectively can be determined. The specific marked pixel points should be flexibly determined according to the number and position of the target objects.

[0075] 105. The server determines a target pixel region according to the video to be detected, where the target pixel region corresponds to the target image.

[0076] In this embodiment, the server determines a target pixel region according to the video to be detected, and the target pixel region corresponds to the target image. For example, if there is 1 object to be detected in the initial video to be detected, 1 target pixel region corresponding to this object to be detected can be determined, while if there are 3 objects to be detected in the initial video to be detected, 3 target pixel regions corresponding to the 3 objects to be detected respectively can be determined. The specific target pixel region should be flexibly determined according to the number and position of the objects to be detected.

[0077] 106. The server generates a trajectory verification result according to the marked pixel points and the target pixel region, where the trajectory verification result includes passed and not passed.

[0078] In this embodiment, the server generates a trajectory verification result according to the marked pixel points and the target pixel region determined in the foregoing steps, and the trajectory verification result includes passed and not passed. Specifically, after obtaining all the marked pixel points and the target pixel region, it is necessary to determine whether the marked pixel points belong to the target pixel region. If all belong to the target pixel region, then the trajectory verification result can be determined to be passed. If there is one marked pixel point that does not belong to the target pixel region, then the trajectory verification result can be determined to be not passed. The specific trajectory verification result should be flexibly determined according to the actual situation.

[0079] Further, when the trajectory verification result is passed, it can be determined that the deviation between the target trajectory and the true motion trajectory is small, indicating that the accuracy of the obtained target trajectory is relatively high. When the trajectory verification result is not passed, it can be determined that the deviation between the target trajectory and the true motion trajectory is large. Therefore, the target trajectory can be adjusted according to this trajectory verification result. After the adjustment makes the trajectory verification result passed, the deviation between the target trajectory and the true motion trajectory can be reduced, thereby improving the accuracy of the target trajectory.

[0080] In the embodiments of the present application, a method for verifying a target trajectory is provided. First, an initial video including N target objects is obtained, where N is a positive integer greater than or equal to 1. Then, a target trajectory is obtained according to the initial video, and the target trajectory is the motion trajectory of N target objects. Based on the obtained target trajectory and the target image, a detection video including N objects to be detected is generated. The object to be detected is obtained by adding the target image to the target object. The target image is a color block composed of vertically alternating first and second colors. Secondly, according to the initial video, marked pixel points corresponding to the target objects are determined. Then, according to the detection video, a target pixel area corresponding to the target image is determined. Finally, according to the marked pixel points and the target pixel area, a trajectory verification result is generated, and the trajectory verification result includes passed and not passed. By the above method, the target trajectory is obtained according to the initial video, and the target pixel area is determined according to the detection video generated based on the target trajectory and the target image. Since the target image is a color block composed of vertically alternating first and second colors, the target image can be distinguished from the background in the detection video. Therefore, the accuracy of the target pixel area corresponding to the target trajectory can be improved. The marked pixel points can accurately represent the trajectory of the target object. Therefore, the trajectory verification result generated according to the marked pixel points and the target pixel area can represent the deviation between the target trajectory and the true motion trajectory, and it can be determined that the deviation between the target trajectory with the passed trajectory verification result and the true motion trajectory is small, thereby improving the accuracy of the target trajectory.

[0081] Optionally, based on the corresponding embodiments above, in an optional embodiment of the method for verifying a target trajectory provided by the embodiments of the present application, the server obtaining the target trajectory according to the initial video may include: Figure 2 The server obtains the target trajectory according to the initial video and the trace tracing algorithm;

[0082] The server generates a detection video based on the target trajectory and the target image, which may include:

[0083] The server adds the target image to the target object to obtain N objects to be detected;

[0084]

[0085] The server generates a video to be detected based on the target trajectory and the object to be detected, where the video to be detected includes M video frames to be detected, and M is a positive integer greater than or equal to 1.

[0086] In this embodiment, the server obtains the target trajectory according to the initial video by means of the trace tracing algorithm, adds the target image to the target object to obtain N objects to be detected, then obtains M video frames to be detected according to the M initial video frames and the N objects to be detected, and finally generates a video to be detected including M video frames to be detected based on the obtained target trajectory and the M video frames to be detected, where M is a positive integer greater than or equal to 1.

[0087] Specifically, the trace tracing algorithm is the target trace tracing algorithm. The target trace tracing algorithm can detect the moving object from the initial video and perform target recognition without relying on the prior knowledge of the target, and finally realize the trace tracing of the target object to obtain the corresponding target trajectory. Secondly, the target trace tracing algorithm can also rely on the prior knowledge of the target. First, model the moving object, and then find the matching target object in the initial video in real time, so as to obtain the target trajectory corresponding to the target object through the model. For the target trace tracing algorithm that does not rely on prior knowledge, motion detection needs to be carried out first. Motion detection is to extract the changed area from the background image in the initial video. The target trace tracing algorithms for moving targets can include but are not limited to the background subtraction algorithm, the Gaussian background modeling method, the inter-frame difference method, and the optical flow method. The background subtraction algorithm can model the illumination change, noise interference, and periodic motion of the background. Under various different static backgrounds, the background subtraction algorithm can accurately detect the moving target. The Gaussian background modeling method assumes that each pixel conforms to the normal distribution in the time domain. The pixels within a certain threshold range are determined as the background and used to update the model. The pixels that do not conform to this distribution are the foreground, so as to realize the detection function of the moving target. The inter-frame difference method performs difference operations on two or three consecutive images in time. Since the target in the static background is moving, the position of the target image in different image frames of the initial video is different. Therefore, the pixel points corresponding to different frames in the initial video can be subtracted, and the absolute value of the gray difference is judged. When the absolute value exceeds a certain threshold, it can be judged as a moving target, so as to realize the detection function of the target. The optical flow method assumes that the change in the gray distribution of the image frames in the initial video is completely caused by the movement of the target or the scene, that is, the gray of the moving target and the scene does not change with time. Therefore, the motion information between adjacent image frames in the initial video can be represented, and thus the moving target can be detected.

[0088] Secondly, after determining the moving target, the target object can be traced according to requirements. The target tracing methods can include, but are not limited to, region-to-region matching, feature point (key point) tracing, and an active contour-based tracing algorithm. In this embodiment, the method of feature point tracing is used to obtain the target trajectory, that is, the feature points of the target object in all image frames of the initial video are detected, and then starting from the first frame of the initial video, by comparing the grayscales of the first frame and the second frame, the positions of the feature points in the first frame in the second frame are estimated. All the image frames in the initial video are traversed in sequence to obtain the feature points, and then the feature points with unchanged positions are filtered. The motion trajectory composed of the remaining feature points is the target trajectory.

[0089] Further, please refer to Figure 5 again. Since the object to be detected is obtained by adding the target image to the target object, the target trajectory obtained in the foregoing embodiment is also the motion trajectory of the object to be detected. Therefore, based on this target trajectory and the obtained object to be detected, a video with the target image added can be obtained, that is, the video to be detected is generated.

[0090] In the embodiment of the present application, a method for obtaining a target trajectory and generating a video to be detected is provided. Through the above method, the target trajectory can be obtained by different tracing algorithms in different scenarios, improving the feasibility and diversity of the solution. Secondly, since the object to be detected is obtained by adding the target image to the target object, the video to be detected with the target image added can be obtained through the object to be detected and the target trajectory, improving the accuracy of the target pixel region determined subsequently, and thus improving the accuracy of the target trajectory.

[0091] Optionally, on the basis of the corresponding embodiment above, in an optional embodiment of the method for verifying the target trajectory provided in the embodiment of the present application, the server determines the target pixel region according to the video to be detected, which may include: Figure 2 The server determines M video frames to be detected according to the video to be detected;

[0092] The server determines Q target pixel points based on the video frames to be detected through the target image, where Q is a positive integer greater than 1;

[0093] The server generates a target pixel region according to the Q target pixel points.

[0094] In this embodiment, the server determines M video frames to be detected according to the video to be detected, then determines Q target pixel points based on the video frames to be detected through the target image, where Q is a positive integer greater than 1, and finally generates a target pixel region according to the Q target pixel points.

[0095]

[0096] ​Specifically, it can be known from the aforementioned embodiments that the video to be detected is the initial video with the target image added to the target object. Therefore, the video to be detected includes M video frames to be detected. The first color is blue, the second color is red, and the width of the target image area is 20 pixels as an example for introduction. Then, when the pixel in the video frame to be detected satisfies R less than 100, G less than 100, and B greater than 200, it can be determined that the pixel is a blue pixel. When the pixel in the video frame to be detected satisfies R greater than 200, G less than 100, and B less than 100, it can be determined that the pixel is a red pixel, that is, the area where the target image is added includes blue pixels and red pixels. Pixels, and other blue or red areas may appear in the video to be detected, which will also be determined as blue pixels or red pixels. Therefore, after all pixels in the video frame to be detected are judged as blue pixels and red pixels, each pixel in the video frame to be detected is judged from left to right and from top to bottom, and each pixel is traversed from 20 pixels on the left to 20 pixels on the right. If these 41 pixels (including the pixel itself, 20 pixels to the left and 20 pixels to the right) include blue pixels and red pixels at the same time, the pixel is determined as the target pixel, and then the area where all target pixels are located is the target pixel area. It can be understood that the number of pixels traversed to the left and right depends on the width of the target image area, that is, when the width of different colors in the target image is 25 pixels, each pixel is traversed from 25 pixels on the left to 25 pixels on the right, and then whether there are blue pixels and red pixels at the same time in 51 pixels is used as the basis for judging the target pixel. It can be understood that due to the existence of the gap (GAP), the target pixel area generated after determining the target pixel point in this embodiment may have a slight offset from the area covered by the target image, but it does not affect the accuracy of the target pixel area, and when overlapping target images appear in the same video frame to be detected, they can also be accurately identified through the method described in the aforementioned embodiment.

[0097] For ease of understanding, the following example is used to describe the object to be detected as a person, the first color is blue, the second color is red, and the width of the target image area is 20 pixels. Figure 6 , Figure 6 This is a schematic diagram of an embodiment of determining a target pixel area in an embodiment of the present application, as shown in the figure, Figure 6 The video frame (A) shown in FIG. 1 includes three objects to be detected, wherein the face of each object to be detected is added with a target image. Since the target image is a color block composed of blue and red arranged vertically alternately, and the width of the target image area is 20 pixels, Figure 6 The target image C1 in (A) is used as an example, from which we know thatFigure 6 In the target image shown in (B), the width C2 of the blue color area is 20 pixel points, and the width C3 of the red color area is also 20 pixel points. For the pixel point C4 in the red color area of the target image, this pixel point is a red pixel point, and among the 20 pixel points to the left, there can be red pixel points and blue pixel points, while among the 20 pixel points to the right, there can be red pixel points. Therefore, among the 41 pixel points, there are blue pixel points and at the same time there are red pixel points, so it can be determined that this pixel point C4 is a target pixel point. If there is a background including red, Figure 6 the pixel point C5 in the target image shown in (B) is determined as a red pixel point, and among the 20 pixel points to the left of the pixel point C4, there can be red pixel points, but among the 20 pixel points to the left of the pixel point C4, there cannot be red pixel points and blue pixel points. Therefore, this pixel point C5 cannot be determined as a target pixel point. Further, after determining all the target pixel points, the target pixel areas C6, C7, and C8 shown in (C) can be obtained, where there is an overlapping part between the target pixel area C6 and the target pixel area C7, but it does not affect the determination of the subsequent trajectory verification result. Figure 6 In (C), the target pixel areas C6, C7, and C8, where there is an overlapping part between the target pixel area C6 and the target pixel area C7, but it does not affect the determination of the subsequent trajectory verification result.

[0098] It can be understood that the foregoing examples are only for understanding this embodiment, and the specific target pixel points and target pixel areas should be flexibly determined in combination with the actual situation.

[0099] In the embodiments of the present application, a method for determining a target pixel area is provided. Through the above method, each to-be-detected video frame in the to-be-detected video is judged, the target image added to the to-be-detected object in the to-be-detected video frame is used to determine the target pixel points according to recognition and judgment, and the target pixel area is determined through the target pixel points, thereby improving the accuracy of the target pixel area and thus improving the accuracy of the target trajectory.

[0100] Optionally, on the basis of the above Figure 2 corresponding embodiment, in an optional embodiment of the method for target trajectory verification provided by the embodiments of the present application, the server determines the labeled pixel points according to the initial video, which may include:

[0101] The server manually labels the initial video to generate a labeled video, where the labeled video includes M labeled video frames, and the labeled video frames include N labeled pixel points;

[0102] The server determines the labeled pixel points according to the labeled video.

[0103] In this embodiment, the server manually annotates the initial video to generate an annotated video with M annotated video frames. Each annotated video frame includes N annotated pixel points. Then, based on this annotated video, the annotated pixel points are determined. Specifically, each frame in the initial video needs to be annotated. In this embodiment, 30 frames per second are used as an example. That is, when the initial video includes 10 seconds, there are 300 image frames in the initial video. By manually annotating the 300 image frames in sequence, 300 annotated video frames can be obtained, and each annotated video frame includes the annotated pixel points corresponding to the target object. Thus, the annotated video can be obtained, and the annotated pixel points can be further determined through this annotated video. For example, when there are 2 target objects in the initial video and the target object is a person, the server manually annotates the person in the initial video frame by frame. When the target object is a person, in this embodiment, the face of the person is specifically annotated, that is, the specific coordinate values of the person's face are annotated. The annotated pixel point can be the center point of the person's face, or a point on the face contour, or a point corresponding to the lips, the tip of the nose, and the eyes of the human face. Secondly, for a person, the position of the annotated pixel point is not limited to the face, and points can also be taken in areas such as the abdomen, legs, and arms of the person to determine the annotated pixel point. The purpose of determining the annotated pixel point is to determine the position of the target object in the image frame. Therefore, it can be understood that the specific annotated pixel point needs to be flexibly determined according to the actual situation.

[0104] Optionally, based on the corresponding embodiment above Figure 2 In an optional embodiment of the method for verifying the target trajectory provided by the embodiment of the present application, when the server determines the annotated pixel points according to the annotated video, it may include:

[0105] The server determines M annotated video frames according to the annotated video;

[0106] The server determines N annotation boxes based on the annotated video frames;

[0107] The server determines N annotated pixel points according to the N annotation boxes.

[0108] In this embodiment, the server determines M labeled video frames based on the labeled video, then determines N labeled bounding boxes based on the labeled video frames, and finally determines N labeled pixel points based on the N labeled bounding boxes. Specifically, the labeled video includes labeled video frames after manual labeling. If the target object is a person and the person's face is labeled, then the labeled bounding box corresponding to the target object can be determined, and the labeled pixel points can be determined from the position of the bounding box. For example, after determining the labeled video frame, if there are 2 target objects in the labeled video frame and each target object has a corresponding labeled bounding box, and if the 30th frame of the labeled video frame is taken and the center positions of the 2 target objects are used as the labeling standard, then it can be determined that the 30th frame of the labeled video frame includes 2 labeled bounding boxes, and the center position of each bounding box is the labeled pixel point, and this labeled pixel point corresponds to an abscissa and an ordinate (i.e., the pixel values corresponding to the horizontal and vertical positions in the labeled video frame). Secondly, since the target objects are different, the sizes of the labeled bounding boxes also vary. In this embodiment, the labeled bounding box is taken as a square, and the labeling standard is located at the center point of the square as an example. In practical applications, the labeled bounding box can also be other different geometric shapes such as rectangles and circles. At this time, the labeling standard can be the center point of the rectangle, the center of the circle, or the geometric center points of other different geometric shapes. Further, taking the center point is only convenient for labeling the pixel points. In practical applications, it can also be the points corresponding to the upper left corner, lower left corner, upper right corner, or lower right corner of the square or rectangle, and the points corresponding to the corners of other geometric shapes. Specifically, it is not limited here.

[0109] For ease of understanding, taking the labeled bounding box as a square as an example for illustration, please refer to Figure 7 , Figure 7 which is a schematic diagram of an embodiment for determining the labeled pixel points in an embodiment of the present application. As shown in the figure, Figure 7 in (A) shown are the labeled bounding box D1 and the labeled bounding box D2 in the labeled video frame. Taking the labeled bounding box D1 as an example for further introduction, if the center position of the labeled bounding box D1 is determined as the labeling standard, then the labeled pixel point D3 shown in Figure 7 (B) can be determined according to the labeled bounding box D1. If the upper left corner position of the labeled bounding box D1 is determined as the labeling standard, then the labeled pixel point D4 shown in Figure 7 (C) can be determined according to the labeled bounding box D1. The method for determining the labeled pixel points according to the labeled bounding box D2 is similar to the foregoing example and will not be elaborated here.

[0110] It can be understood that the foregoing example is only for understanding this embodiment, and the specific labeled pixel points should be flexibly determined in combination with the position of the labeled bounding box and the defined labeling standard.

[0111] In an embodiment of the present application, a method for determining labeled pixel points is provided. Through the above method, an initial video is manually labeled to obtain a labeled video, and a labeled bounding box is determined from the labeled video included in the labeled video. The labeled pixel points determined by the labeled bounding box can accurately represent the position of the target object, thereby improving the accuracy of the labeled pixel points and thus improving the accuracy of the target trajectory.

[0112] Optionally, based on the corresponding embodiment above, in an alternative embodiment of the method for target trajectory verification provided by the embodiment of the present application, the server generates a trajectory verification result according to the labeled pixel points and the target pixel region, which may include: Figure 2 The server determines a labeled time point and labeled pixel values according to the labeled pixel points, where the labeled time point and the labeled pixel values have a corresponding relationship, the labeled time point is the moment corresponding to the labeled video frame, and the labeled pixel values include the abscissa and ordinate of the labeled pixel points;

[0113] The server determines a target time point and a set of target pixel values according to the target pixel region, where the target pixel region includes Q target pixel points, the target time point and the set of target pixel values have a corresponding relationship, the target time point is the moment corresponding to the video frame to be detected, and the set of target pixel values includes the abscissas and ordinates of the Q target pixel points, and Q is a positive integer greater than 1;

[0114] The server generates a trajectory verification result according to the labeled time point, the target time point, the labeled pixel values and the set of target pixel values.

[0115] In this embodiment, the server determines a labeled time point and labeled pixel values according to the labeled pixel points, and the labeled time point and the labeled pixel values have a corresponding relationship. The labeled time point is the moment corresponding to the labeled video frame, and the labeled pixel values include the abscissa and ordinate of the labeled pixel points. Secondly, the server can also determine a target time point and a set of target pixel values according to the target pixel region. The target pixel region includes Q target pixel points, and the target time point and the set of target pixel values have a corresponding relationship. The target time point is the moment corresponding to the video frame to be detected, and the set of target pixel values includes the abscissas and ordinates of the Q target pixel points. Further, a trajectory verification result is generated according to the labeled time point, the target time point, the labeled pixel values and the set of target pixel values.

[0116]

[0117] ​Specifically, as can be seen from the foregoing embodiments, the labeled pixel points are determined by the labeled bounding boxes. The labeled pixel points can represent the position information of the target object. Therefore, the time corresponding to the labeled video frame can be obtained through the labeled pixel points, and the abscissa and ordinate of the labeled pixel points can be determined. For ease of understanding, 30 frames per second is used as an example for illustration. For example, the 91st labeled video frame is obtained in the labeled video, that is, the labeled video frame corresponding to the 3.0th second is obtained. This labeled video frame includes 2 target objects (persons). Then, the labeled pixel points can be determined by the center points of the labeled bounding boxes. The labeled pixel points correspond to the abscissa and ordinate at this position (that is, the pixel values corresponding to the horizontal and vertical positions of the labeled video frame). The abscissa and ordinate of the labeled pixel point A are (300, 100), and the abscissa and ordinate of the labeled pixel point B are (500, 200). Then, when the labeled time point is the 3.0th second, we can determine that the labeled pixel values are (300, 100) and (500, 200) based on the labeled pixel point A and the labeled pixel point B. If the 151st labeled video frame is obtained in the labeled video, that is, the labeled video frame corresponding to the 5.0th second is obtained. This labeled video frame includes 2 target objects (persons). Then, the labeled pixel points can be determined by the center points of the labeled bounding boxes. The abscissa and ordinate of the labeled pixel point C are (200, 100), and the abscissa and ordinate of the labeled pixel point D are (300, 200). Then, when the labeled time point is the 5.0th second, we can determine that the labeled pixel values are (200, 100) and (300, 200) based on the labeled pixel point C and the labeled pixel point D.

[0118] Secondly, since the target pixel region includes Q target pixel points, similar to the foregoing labeled pixel points, the target pixel points can also correspond to the abscissa and ordinate. For ease of understanding, 30 frames per second is used as an example for illustration again. For example, the 31st video frame to be detected is obtained in the video to be detected, that is, the video frame to be detected corresponding to the 1.0th second is obtained. As can be seen from the foregoing embodiments, multiple target pixel points are determined therefrom, and the region composed of the target pixel points is the target pixel region. Each target pixel point corresponds to the abscissa and ordinate at this position (that is, the pixel values corresponding to the horizontal and vertical positions of the video frame to be detected). If the abscissa and ordinate of the target pixel point A are (300, 100), the abscissa and ordinate of the target pixel point B are (300, 101), and the abscissa and ordinate of the target pixel point C are (300, 102), and so on, the target pixel values (abscissa and ordinate) of all target pixel points can be obtained. By using this method, the target time points corresponding to all video frames to be detected in the video to be detected, and all target pixel values included in each video frame to be detected can be obtained. Thus, the target pixel value set can be obtained.

[0119] Further, the trajectory verification result can be determined based on the obtained annotation time point, target time point, annotation pixel value, and target pixel value set. When the trajectory verification result is passed, it can be determined that the deviation between the target trajectory and the true motion trajectory is small, indicating that the accuracy of the obtained target trajectory is relatively high. When the trajectory verification result is not passed, it can be determined that there is a large deviation between the target trajectory and the true motion trajectory. Thus, the target trajectory can be adjusted according to this trajectory verification result. After the adjustment makes the trajectory verification result passed, the deviation between the target trajectory and the true motion trajectory can be reduced, thereby improving the accuracy of the target trajectory.

[0120] Optionally, based on the above Figure 2 In an optional embodiment of the target trajectory verification method provided by the embodiments of the present application, on the basis of the corresponding embodiment, the server generates a trajectory verification result according to the annotation time point, the target time point, the annotation pixel value, and the target pixel value set, which may include:

[0121] When the annotation time point is the same as the target time point, and the annotation pixel value belongs to the target pixel value set, the server determines that the trajectory verification result is passed;

[0122] When the annotation time point is the same as the target time point, and the annotation pixel value does not belong to the target pixel value set, the server determines that the trajectory verification result is not passed.

[0123] In this embodiment, when the annotation time point is the same as the target time point, and the annotation pixel value belongs to the target pixel value set, the server can determine that the trajectory verification result is passed. When the annotation time point is the same as the target time point, and the annotation pixel value does not belong to the target pixel value set, the server can determine that the trajectory verification result is not passed.

[0124] For ease of understanding, a time point and a target time point of 3.0 seconds are used as an example for illustration. That is, the annotated video frame is the image frame corresponding to the 3.0 - second mark in the annotated video, and the video frame to be detected is the image frame corresponding to the 3.0 - second mark in the video to be detected. Further, the annotated pixel value at 3.0 seconds in the annotated video frame and the set of target pixel values at 3.0 seconds in the video frame to be detected are determined respectively. If the annotated pixel value is (300, 100), and the set of target pixel values includes (300, 100), (300, 101), (300, 102), (300, 103), etc., then it can be determined that the annotated pixel value belongs to the set of target pixel values. Then, in a similar manner, all video frames to be detected in the video to be detected are further detected and judged. When all annotated pixel values belong to the set of target pixel values, the server can determine that the trajectory verification result passes, that is, the deviation between the target trajectory and the true motion trajectory is small, indicating that the accuracy of the obtained target trajectory is relatively high. Secondly, if the annotated pixel value is (300, 100), and the set of target pixel values includes (300, 150), (300, 151), (300, 152), (300, 153), etc., then it can be determined that the annotated pixel value does not belong to the set of target pixel values. Then, in a similar manner, all video frames to be detected in the video to be detected are further detected and judged. When there is an annotated pixel value that does not belong to the set of target pixel values, the server can determine that the trajectory verification result fails, that is, the deviation between the target trajectory and the true motion trajectory is large. Thus, the target trajectory can be adjusted according to this trajectory verification result. When the adjustment makes the trajectory verification result pass, the deviation between the target trajectory and the true motion trajectory can be reduced, thereby improving the accuracy of the target trajectory.

[0125] Further, taking the annotated time point as 2.5 seconds and the target time point as 3.0 seconds as another example for illustration, that is, the selected time points of the annotated video frame and the video to be detected are different. At this time, it is not judged whether the annotated pixel value belongs to the set of target pixel values.

[0126] It can be understood that the foregoing examples are only for understanding this embodiment. The specific trajectory verification result should be flexibly determined in combination with the annotated time point, the target time point, the annotated pixel value, and the set of target pixel values.

[0127] In the embodiment of this application, a method for determining the trajectory verification result is provided. Through the above - mentioned method, the determination of the trajectory verification result by the annotated time point, the target time point, the annotated pixel value, and the set of target pixel values is refined. Thereby, the feasibility of determining the trajectory verification result is improved, and through the step - by - step judgment of the annotated time point and the target time point, the annotated pixel value and the set of target pixel values, the accuracy of the trajectory verification result can be further improved, thereby improving the accuracy of the target trajectory.

[0128] The target trajectory verification device in the present application will be described in detail below. Please refer to Figure 8 , Figure 8 FIG. is a schematic diagram of an embodiment of the target trajectory verification device in an embodiment of the present application. The target trajectory verification device 20 includes:

[0129] An acquisition module 201, configured to acquire an initial video, where the initial video includes N target objects, and N is a positive integer greater than or equal to 1;

[0130] The acquisition module 201 is further configured to acquire a target trajectory according to the initial video, where the target trajectory is the movement trajectory of N target objects;

[0131] A generation module 202, configured to generate a video to be detected based on the target trajectory and a target image, where the video to be detected includes N objects to be detected, and the object to be detected is obtained by adding the target image to the target object, and the target image is a color block composed of first colors and second colors arranged vertically and alternately;

[0132] A determination module 203, configured to determine marked pixel points according to the initial video, where the marked pixel points correspond to the target objects;

[0133] The determination module 203 is further configured to determine a target pixel area according to the video to be detected, where the target pixel area corresponds to the target image;

[0134] The generation module 202 is further configured to generate a trajectory verification result according to the marked pixel points and the target pixel area, where the trajectory verification result includes passed and not passed.

[0135] Optionally, based on the above Figure 8 corresponding embodiment, in another embodiment of the target trajectory verification device 20 provided by the embodiment of the present application,

[0136] The acquisition module 201 is specifically configured to acquire a target trajectory according to the initial video by using a trace tracing algorithm;

[0137] The generation module 202 is specifically configured to add the target image to the target object to obtain N objects to be detected;

[0138] Based on the target trajectory and the object to be detected, generate a video to be detected, where the video to be detected includes M video frames to be detected, and M is a positive integer greater than or equal to 1.

[0139] Optionally, based on the above Figure 8 corresponding embodiment, in another embodiment of the target trajectory verification device 20 provided by the embodiment of the present application,

[0140] The determination module 203 is specifically configured to determine M video frames to be detected according to the video to be detected;

[0141] Based on the video frames to be detected, Q target pixel points are determined through the target image, where Q is a positive integer greater than 1;

[0142] Generate a target pixel region according to the Q target pixel points.

[0143] Optionally, based on the corresponding embodiment above, Figure 8 In another embodiment of the target trajectory verification device 20 provided by the embodiments of the present application,

[0144] The determination module 203 is specifically configured to generate an annotated video by manually annotating the initial video, where the annotated video includes M annotated video frames, and the annotated video frames include N annotated pixel points;

[0145] Determine the annotated pixel points according to the annotated video.

[0146] Optionally, based on the corresponding embodiment above, Figure 8 In another embodiment of the target trajectory verification device 20 provided by the embodiments of the present application,

[0147] The determination module 203 is specifically configured to determine M annotated video frames according to the annotated video;

[0148] Based on the annotated video frames, determine N annotated bounding boxes;

[0149] Determine the annotated pixel points according to the N annotated bounding boxes.

[0150] Optionally, based on the corresponding embodiment above, Figure 8 In another embodiment of the target trajectory verification device 20 provided by the embodiments of the present application,

[0151] The generation module 202 is specifically configured to determine an annotated time point and an annotated pixel value according to the annotated pixel points, where the annotated time point and the annotated pixel value have a corresponding relationship, the annotated time point is the moment corresponding to the annotated video frame, and the annotated pixel value includes the abscissa of the annotated pixel point and the ordinate of the annotated pixel point;

[0152] Determine a target time point and a set of target pixel values according to the target pixel region, where the target pixel region includes Q target pixel points, the target time point and the set of target pixel values have a corresponding relationship, the target time point is the moment corresponding to the video frame to be detected, and the set of target pixel values includes the abscissa of the Q target pixel points and the ordinate of the target pixel points;

[0153] Generate a trajectory verification result according to the annotated time point, the target time point, the annotated pixel value, and the set of target pixel values.

[0154] Optionally, based on the embodiments corresponding to the above Figure 8 In another embodiment of the target trajectory verification device 20 provided by the embodiments of the present application,

[0155] The generation module 202 is specifically configured to determine that the trajectory verification result is passed when the annotation time point is the same as the target time point and the annotation pixel value belongs to the target pixel value set;

[0156] When the annotation time point is the same as the target time point and the annotation pixel value does not belong to the target pixel value set, it is determined that the trajectory verification result is not passed.

[0157] The embodiments of the present application also provide another target trajectory verification device. The target trajectory verification device can be deployed on a computer device, such as a server or a terminal device. In the present application, the case where the target trajectory verification device is deployed on a server is taken as an example for illustration. Please refer to Figure 9 , Figure 9 FIG. is a schematic structural diagram of a server in the embodiments of the present application. As shown in the figure, the server 300 may vary greatly due to configuration or performance differences, and may include one or more central processing units (CPUs) 322 (for example, one or more processors) and a memory 332, and one or more storage media 330 (for example, one or more mass storage devices) for storing application programs 342 or data 344. Among them, the memory 332 and the storage media 330 may be transient storage or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Further, the central processing unit 322 may be configured to communicate with the storage media 330 and execute a series of instruction operations in the storage media 330 on the server 300.

[0158] The server 300 may further include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM and so on.

[0159] The steps executed by the server in the above embodiments may be based on the Figure 9 server structure shown.

[0160] In the embodiments of the present application, the CPU 322 included in the server is used to execute as Figure 2 the corresponding respective embodiments.

[0161] The embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored. When it runs on a computer, it causes the computer to execute the steps of the foregoing respective embodiments.

[0162] The embodiments of the present application also provide a computer program product including a program. When it runs on a computer, it causes the computer to execute the steps of the foregoing respective embodiments.

[0163] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0164] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.

[0165] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0166] In addition, in each embodiment of the present application, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0167] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0168] As described above, the above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of various embodiments of this application.

Claims

1. A method for verifying a target trajectory, characterized in that, Including: Obtain an initial video, where the initial video includes N target objects, and N is a positive integer greater than or equal to 1; Obtain a target trajectory according to the initial video, where the target trajectory is the movement trajectory of the N target objects; Generate a video to be detected based on the target trajectory and a target image, where the video to be detected includes N objects to be detected, and the object to be detected is obtained by adding the target image to the target object, and the target image is a color block composed of vertically alternating first and second colors; Determine marked pixel points according to the initial video, where the marked pixel points correspond to the target objects; Determine a target pixel region according to the video to be detected, where the target pixel region corresponds to the target image; Generate a trajectory verification result according to the marked pixel points and the target pixel region, where the trajectory verification result includes passed and not passed.

2. The method according to claim 1, characterized in that, The obtaining the target trajectory according to the initial video includes: Obtain the target trajectory according to the initial video by using a trace tracing algorithm; The generating the video to be detected based on the target trajectory and the target image includes: Add the target image to the target object to obtain N objects to be detected; Generate a video to be detected based on the target trajectory and the object to be detected, where the video to be detected includes M video frames to be detected, and M is a positive integer greater than or equal to 1.

3. The method according to claim 2, characterized in that, The determining the target pixel region according to the video to be detected includes: Determine M video frames to be detected according to the video to be detected; Based on the video frames to be detected, determine Q target pixel points through the target image, where Q is a positive integer greater than 1; Generate a target pixel region according to the Q target pixel points.

4. The method according to claim 1, characterized in that, The determining the marked pixel points according to the initial video includes: Manually annotate the initial video to generate an annotated video, where the annotated video includes M annotated video frames, and the annotated video frames include N marked pixel points; Determine the marked pixel points according to the annotated video.

5. The method according to claim 4, characterized in that, The determining the marked pixel points according to the annotated video includes: Determine M of the annotated video frames according to the annotated video; Based on the annotated video frames, determine N annotation boxes; Determine the marked pixel points according to the N annotation boxes.

6. The method according to any one of claims 4 to 5, characterized in that, The generating the trajectory verification result according to the marked pixel points and the target pixel region includes: Determine a marked time point and a marked pixel value according to the marked pixel points, where the marked time point and the marked pixel value have a corresponding relationship, the marked time point is the moment corresponding to the annotated video frame, and the marked pixel value includes the abscissa and the ordinate of the marked pixel point; Determine a target time point and a set of target pixel values according to the target pixel region, where the target pixel region includes Q target pixel points, there is a corresponding relationship between the target time point and the set of target pixel values, the target time point is the moment corresponding to the video frame to be detected, and the set of target pixel values includes the abscissas of the Q target pixel points and the ordinates of the target pixel points; Generate a trajectory verification result according to the marked time point, the target time point, the marked pixel value, and the set of target pixel values.

7. The method according to claim 6, characterized in that, The generating the trajectory verification result according to the marked time point, the target time point, the marked pixel value, and the set of target pixel values includes: When the marked time point is the same as the target time point and the marked pixel value belongs to the set of target pixel values, determine that the trajectory verification result is the passed; When the marked time point is the same as the target time point and the marked pixel value does not belong to the set of target pixel values, determine that the trajectory verification result is the not passed.

8. A target trajectory verification device, characterized in that, including: An acquisition module for acquiring an initial video, where the initial video includes N target objects, and N is a positive integer greater than or equal to 1; The acquisition module is further configured to acquire a target trajectory according to the initial video, where the target trajectory is the movement trajectory of the N target objects; A generation module for generating a video to be detected based on the target trajectory and a target image, where the video to be detected includes N objects to be detected, and the object to be detected is obtained by adding the target image to the target object, and the target image is a color block composed of first colors and second colors arranged vertically and alternately; A determination module for determining marked pixel points according to the initial video, where the marked pixel points correspond to the target objects; The determination module is further configured to determine a target pixel region according to the video to be detected, where the target pixel region corresponds to the target image; The generation module is further configured to generate a trajectory verification result according to the marked pixel points and the target pixel region, where the trajectory verification result includes passed and not passed.

9. The device according to claim 8, characterized in that, The acquisition module is specifically configured to acquire the target trajectory according to the initial video by using a trace tracing algorithm; The generation module is specifically configured to add the target image to the target object to obtain N objects to be detected; generate a video to be detected based on the target trajectory and the object to be detected, where the video to be detected includes M video frames to be detected, and M is a positive integer greater than or equal to 1.

10. The device according to claim 9, characterized in that, The determination module is specifically configured to: Determine M video frames to be detected according to the video to be detected; Based on the video frames to be detected, determine Q target pixel points through the target image, where Q is a positive integer greater than 1; Generate a target pixel region according to the Q target pixel points.

11. The device according to claim 8, characterized in that, The determination module is specifically configured to: Generate an annotated video by manually annotating the initial video, where the annotated video includes M annotated video frames, and each annotated video frame includes N annotated pixel points; Determine the annotated pixel points according to the annotated video.

12. The device according to claim 11, characterized in that, The determining module is specifically configured to: Determine M of the annotated video frames according to the annotated video; Determine N annotation boxes based on the annotated video frames; Determine the annotated pixel points according to the N annotation boxes.

13. The device according to any one of claims 11 to 12, characterized in that, The generating module is specifically configured to: Determine an annotation time point and annotation pixel values according to the annotated pixel points, where there is a corresponding relationship between the annotation time point and the annotation pixel values, the annotation time point is the moment corresponding to the annotated video frame, and the annotation pixel values include the abscissa and the ordinate of the annotated pixel point; Determine a target time point and a set of target pixel values according to the target pixel region, where the target pixel region includes Q target pixel points, there is a corresponding relationship between the target time point and the set of target pixel values, the target time point is the moment corresponding to the video frame to be detected, and the set of target pixel values includes the abscissa of the Q target pixel points and the ordinate of the target pixel points; Generate a trajectory verification result according to the annotation time point, the target time point, the annotation pixel values, and the set of target pixel values.

14. The device according to claim 13, characterized in that, The generating module is specifically configured to: When the annotation time point is the same as the target time point and the annotation pixel values belong to the set of target pixel values, determine that the trajectory verification result is "passed"; When the annotation time point is the same as the target time point and the annotation pixel values do not belong to the set of target pixel values, determine that the trajectory verification result is "not passed".

15. A server, characterized in that, Comprising: A memory, a transceiver, a processor, and a bus system; Wherein, the memory is used to store programs; The processor is used to execute the programs in the memory, and the processor is used to execute the method according to any one of claims 1 to 7 according to the instructions in the program code; The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.

16. A computer-readable storage medium comprising instructions that, when run on a computer, cause the computer to perform the method according to any one of claims 1 to 7.

17. A computer program product comprising a program that, when run on a computer, causes the computer to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method, device and system for determining track of target object

    CN107782316A

  • Video scaling method based on block segmentation and frame-by-frame optimization

    CN108447021A