Video object acceleration detection method, device, server and storage medium

By dividing the video image into key frames and non-key frames and using pre-selected frame processing, the problem of slow detection speed in traditional video target detection methods is solved, efficient video target detection is achieved, and it adapts to the needs of different hardware scenarios.

CN110427800BActive Publication Date: 2024-09-10PING AN TECH (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910523099.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-17
Publication Date
2024-09-10
Estimated Expiration
2039-06-17

AI Technical Summary

Technical Problem

When processing images above 720p, traditional video target detection methods have too many detection anchor points, resulting in slow detection speed and difficulty in achieving real-time detection. They can only be solved by skipping frames, thus reducing detection accuracy.

Method used

Divide the video image into preset group frame images, including key frame images and non-key frame images, identify the detection target in the key frame image and mark the detection frame, generate a pre-selected frame by enlarging the preset ratio, and crop the non-key frame image and processing, using a non-key frame detection network to determine the target position and mapping the target to the original image, making full use of the spatial correlation of consecutive video frames and reducing the time consumption of anchor point classification.

Benefits of technology

Without losing detection accuracy, the detection speed is greatly optimized, the time consumption of anchor point classification is greatly reduced, real-time detection is achieved, and the ratio of key frames to non-key frames is adjusted to adapt to the needs of different hardware scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110427800B
    Figure CN110427800B
Patent Text Reader

Abstract

A method for detecting accelerated video objects, the method divides all frame images in a video image into preset group frame images, wherein each group frame image includes a key frame image and a non-key frame image; uses the detection frame of the target in the key frame image to generate a pre-selection frame in the non-key frame image, and then detects the target object in the video by detecting the position of the target in the pre-selection frame. The present invention also provides a video object acceleration detection device, a server and a storage medium. The present invention fully utilizes the spatial correlation of continuous frames of a video, greatly reduces the time consumption of anchor point classification without losing accuracy, and greatly optimizes the detection speed without substantially reducing the detection performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a method, device, server and storage medium for detecting accelerated video objects. Background Art

[0002] The development of science and technology has made video equipment popular, resulting in a massive amount of image data and video data. Video data has also received widespread attention. Many fields require target detection and tracking, such as surveillance video and drone tracking.

[0003] Traditional target detection methods require the following processing for each frame in the video: 1) Generate a feature map based on the backbone network of each frame image; 2) Divide anchor points on the pyramid of the feature map to perform foreground and background classification and coordinate frame regression; 3) Send the high-scoring foreground feature map obtained in the previous step to the classification network, perform secondary classification and coordinate regression and output the results.

[0004] When processing images above 720p, the above method will have the problem of slow detection speed due to too many detection anchor points, and it is often difficult to achieve real-time detection. Therefore, it can only be solved by skipping frames, which reduces the detection accuracy. Summary of the invention

[0005] In view of the above, it is necessary to propose a video object acceleration detection method, device, server and storage medium, which can speed up the detection of targets in video images.

[0006] A first aspect of the present invention provides a method for detecting acceleration of a video object, the method comprising:

[0007] Dividing all frame images in the video image into preset group frame images, wherein each group frame image includes a key frame image and a non-key frame image;

[0008] Identify a detection target in the key frame image and mark a detection frame on the detection target;

[0009] Identify the detection target in the non-key frame image in the preset group of frame images, enlarge the detection frame in the key frame image by a preset ratio to generate a pre-selection frame, and mark the detection target in the non-key frame image with the pre-selection frame;

[0010] Cropping the non-key frame image according to the pre-selected frame to obtain a plurality of pre-selected frame images;

[0011] Inputting the plurality of pre-selected frame images into a non-keyframe detection network to obtain the position of the detection target in the pre-selected frame; and

[0012] The detected target is mapped to the original image corresponding to the non-key frame according to the position of the detected target in the pre-selected frame.

[0013] Preferably, before inputting the plurality of pre-selected frame images into a non-key frame detection network, the video object acceleration detection method further comprises:

[0014] The multiple pre-selected frame images are scaled.

[0015] Preferably, identifying the detection target in the non-key frame image in the preset group of frame images, amplifying the detection frame in the key frame image by a preset ratio to generate a pre-selection frame, and marking the detection target in the non-key frame image by the pre-selection frame includes:

[0016] Identifying a detection target in a current non-key frame image in the preset group of frame images;

[0017] A detection frame in a previous key frame image corresponding to the current non-key frame image is enlarged by a preset ratio to generate a pre-selection frame, and a detection target in the current non-key frame image is marked by the pre-selection frame;

[0018] Identifying a detection target in a subsequent non-key frame image corresponding to the current non-key frame image;

[0019] The pre-selected box in the current non-key frame image is enlarged by a preset ratio to generate a first pre-selected box, and the detection target in the next non-key frame image corresponding to the current non-key frame image is marked by the first pre-selected box, and so on, until the detection targets in all non-key frame images in the preset group of frame images are marked.

[0020] Preferably, the non-keyframe network is a deep learning neural network used to obtain the position of the detection target in the image.

[0021] Preferably, the identifying the detection target in the key frame image comprises:

[0022] Sliding the key frame images in a preset order through sliding windows of different window sizes;

[0023] Each time you slide, the image corresponding to the current window is input into a pre-trained classifier; and

[0024] When the classification probability output by the classifier after processing the image corresponding to the current window is greater than a preset value, it is confirmed that the detection target in the key frame image is recognized, and a mark of the detection target is output.

[0025] Preferably, the method further comprises: screening the mark of the detection target to obtain the detection target in the key frame image.

[0026] Preferably, the step of screening the mark of the detected target to obtain the target in the key frame image comprises:

[0027] Arrange the probabilities obtained after inputting all sliding windows into the classifier in descending order, and select the sliding window corresponding to the maximum classification probability;

[0028] Calculating the overlapping areas between other sliding windows and the sliding window corresponding to the maximum classification probability respectively, and determining whether the overlapping areas are greater than a preset area;

[0029] If the overlapping area is less than or equal to the preset area, retain the corresponding sliding window and output the detection target corresponding to the sliding window;

[0030] If the overlapping area is larger than the preset area, deleting the corresponding sliding window; and

[0031] Repeat the above steps until all other sliding windows are aligned.

[0032] A second aspect of the present invention provides a video object acceleration detection device, the device comprising:

[0033] An initialization module, used for dividing all frame images in the video image into preset group frame images, wherein each group frame image includes a key frame image and a non-key frame image;

[0034] A recognition module, used for recognizing a detection target in the key frame image and marking a detection frame on the detection target;

[0035] The recognition module is further used to recognize the detection target in the non-key frame image in the preset group of frame images, enlarge the detection frame in the key frame image by a preset ratio to generate a pre-selection frame, and mark the detection target in the non-key frame image with the pre-selection frame;

[0036] A cropping module, used for cropping the non-key frame image according to the pre-selected frame to obtain a plurality of pre-selected frame images;

[0037] A processing module, used for inputting the plurality of pre-selected frame images into a non-key frame detection network to obtain the position of the detection target in the pre-selected frame; and

[0038] The processing module is further used to map the detected target to the original image corresponding to the non-key frame according to the position of the detected target in the pre-selected frame.

[0039] A third aspect of the present invention provides a server, the server comprising a processor and a memory, the processor being configured to implement the video object acceleration detection method when executing a computer program stored in the memory.

[0040] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the video object acceleration detection method when executed by a processor.

[0041] The video object acceleration detection method, device, system and storage medium described in the present invention divide all frame images in the video image into preset frame images, wherein each frame image includes a key frame image and a non-key frame image; a detection frame of the target in the key frame image is used to generate a pre-selection frame in the non-key frame image, and then the position of the target in the pre-selection frame is detected to achieve detection of the target object in the video. The spatial correlation of continuous frames of the video is fully utilized, and the time consumption of anchor point classification is greatly reduced without losing accuracy, and the detection speed is greatly optimized without substantially reducing the detection performance. In addition, by adjusting the ratio of key frames to non-key frames, the requirements of different hardware scenarios can be met without changing the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0043] Figure 1 This is a flow chart of a video object acceleration detection method provided in Embodiment 1 of the present invention.

[0044] Figure 2 It is a functional module diagram of a preferred embodiment of the video object acceleration detection device of the present invention provided by the second embodiment of the present invention.

[0045] Figure 3 It is a schematic diagram of a server provided in Embodiment 3 of the present invention.

[0046] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0047] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0048] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The embodiments described are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0050] The terms "first", "second", "third", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variation thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0051] The video object acceleration detection method of the embodiment of the present invention is applied in a hardware environment consisting of at least one server and a mobile terminal connected to the server via a network. The network includes but is not limited to: a wide area network, a metropolitan area network or a local area network. The video object acceleration detection method of the embodiment of the present invention can be executed by a server or a mobile terminal; or it can be executed by both the server and the mobile terminal.

[0052] For the server that needs to perform the video object acceleration detection method, the video object acceleration detection function provided by the method of the present invention can be directly integrated on the server, or a client for implementing the method of the present invention can be installed. For another example, the method provided by the present invention can also be run on a server or other device in the form of a software development kit (SDK), and an interface for the video object acceleration detection function is provided in the form of the SDK, and the server or other device can implement the video object acceleration detection function through the provided interface.

[0053] Embodiment 1

[0054] Figure 1 This is a flow chart of the video object acceleration detection method provided by Embodiment 1 of the present invention. According to different requirements, the execution order in the flow chart can be changed, and some steps can be omitted.

[0055] Step S1, dividing all frame images in the video image into preset group frame images, wherein each group frame image includes a key frame image and a non-key frame image.

[0056] Specifically, all frame images in the video image can be divided into preset group frame images, wherein each group frame image includes continuous preset frame images, the first frame image in the continuous preset frame images is a key frame image, and the remaining frame images are non-key frame images.

[0057] For example, a video image with fifty frames is divided into ten groups of frame images, and five consecutive frames are divided into one group, wherein the first frame of the five frames is a key frame image, and the second to fifth frames are non-key frame images. Each of the key frame images corresponds to an original image in the video image, and each of the non-key frame images also corresponds to an original image in the video image, and the original image is a picture of 720p or above.

[0058] It can be understood that the number of image frames in each set of frame images is not limited, and the number of key frame images and non-key frame images in each set of frame images is also not limited.

[0059] When it is necessary to accurately detect the target in the video image, the number of the preset group of frame images can be appropriately increased, and the number of image frames in each group of frame images can be appropriately reduced. For example, a video image with sixty frames of images is divided into groups of twenty frames of images, and three consecutive frames of images in all the frame images in the video image are grouped into one group.

[0060] When the target detection accuracy in the video image is not required to be high, the number of the preset group of frame images can be appropriately reduced, and the number of image frames in each group of frame images can be appropriately increased. For example, a video image with sixty frames of images is divided into groups of ten frames of images, and six consecutive frames of images in all the frame images in the video image are grouped into one group.

[0061] In this embodiment, before dividing all frame images in the video image into preset group frame images, the video object acceleration detection method further includes:

[0062] The step of receiving a video image captured by a camera and decoding the video image.

[0063] In this embodiment, the video image is collected by a camera. The camera and the server are connected via a wired or wireless network. The camera sends the collected video image to the server via a wired or wireless network.

[0064] Step S2, identifying the detection target in the key frame image, and marking a detection frame on the detection target.

[0065] In this embodiment, the detection target may be a person, an animal, or a vehicle, etc. The detection target in the key frame image may include multiple detection targets, each of which corresponds to a detection frame. It is understandable that the corresponding detection frame size is different depending on the detection target.

[0066] In this implementation, identifying the detection target in the key frame image includes:

[0067] Sliding the key frame images in a preset order through sliding windows of different window sizes;

[0068] Each time you slide, the image corresponding to the current window is input into a pre-trained classifier; and

[0069] When the classification probability output by the classifier after processing the image corresponding to the current window is greater than a preset value, it is confirmed that the detection target in the key frame image is identified, and a mark of the detection target is output.

[0070] For example, first slide the sliding windows of different window sizes from left to right and from top to bottom on the current frame image. Execute the classifier on the current window each time it slides (the classifier is trained in advance). If the current window obtains a higher classification probability, it is considered that the target is detected. After detecting each sliding window of different window sizes, the target marks detected by different windows will be obtained. These window sizes will have a high degree of repetition. Finally, the non-maximum suppression (NMS) method is used for screening to obtain the detected target in the key frame image. Finally, the detected target is obtained after NMS screening.

[0071] Screening the mark of the detection target to obtain the detection target in the key frame image includes:

[0072] Arrange the probabilities obtained after inputting all sliding windows into the classifier in descending order, and select the sliding window corresponding to the maximum classification probability;

[0073] Calculating the overlapping areas between other sliding windows and the sliding window corresponding to the maximum classification probability respectively, and determining whether the overlapping areas are greater than a preset area;

[0074] If the overlapping area is less than or equal to the preset area, retain the corresponding sliding window and output the detection target corresponding to the sliding window;

[0075] If the overlapping area is larger than the preset area, deleting the corresponding sliding window; and

[0076] Repeat the above steps until all other sliding windows are aligned.

[0077] Step S3, identifying the detection target in the non-key frame image in the preset group of frame images, amplifying the detection frame in the key frame image by a preset ratio to generate a pre-selection frame, and marking the detection target in the non-key frame image by the pre-selection frame.

[0078] It can be understood that the method for identifying the detection target in the current non-key frame image can be consistent with the method for identifying the detection target in the key frame image, which will not be described in detail here.

[0079] In this embodiment, the detection target in each non-key frame image in each group of frame images is identified. The previous frame image can be a key frame image or a non-key frame image.

[0080] The steps of identifying the detection target in the non-key frame image in the preset group of frame images, amplifying the detection frame in the key frame image by a preset ratio to generate a pre-selection frame, and marking the detection target in the non-key frame image by the pre-selection frame include the following steps:

[0081] Identifying a detection target in a current non-key frame image in the preset group of frame images;

[0082] A detection frame in a key frame image before the current non-key frame image is enlarged by a preset ratio to generate a pre-selection frame, and a detection target in the current non-key frame image is marked by the pre-selection frame;

[0083] Identifying a detection target in a non-key frame image after the current non-key frame image;

[0084] The pre-selected box in the current non-key frame image is enlarged by a preset ratio to generate a first pre-selected box, and the detection targets in the non-key frame images after the current non-key frame image are marked by the first pre-selected box, and so on, until the detection targets in all non-key frame images in the preset group of frame images are marked.

[0085] For example, if five consecutive frames of images are grouped together, the first frame of the five frames is a key frame image, and the second to fifth frames are non-key frame images. The first frame is identified as a detection target in the key frame image, and a detection frame is marked on the detection target; the second frame is identified as a detection target in the non-key frame image, the detection frame in the key frame image is magnified by a preset ratio to generate a first pre-selection frame, and the detection target in the second frame image is marked by the first pre-selection frame; then the third frame is identified as a detection target in the non-key frame image, the detection frame (i.e., the first pre-selection frame) in the second frame image (non-key frame image) is magnified by a preset ratio to generate a second pre-selection frame, and the detection target in the third frame image is marked by the second pre-selection frame, and so on, the detection targets in the non-key frame images in each group of frame images are marked by pre-selection frames.

[0086] For example, if five consecutive frames of images are grouped together, the second frame of the five frames is a key frame image, and the first frame and the third to fifth frames are non-key frame images. The second frame is identified as a detection target in the key frame image, and a detection frame is marked on the detection target; the third frame is identified as a detection target in the non-key frame image, the detection frame in the key frame image is magnified by a preset ratio to generate a first pre-selection frame, and the detection target in the third frame image is marked by the first pre-selection frame; then the fourth frame is identified as a detection target in the non-key frame image, the detection frame (i.e., the first pre-selection frame) in the third frame image (non-key frame image) is magnified by a preset ratio to generate a second pre-selection frame, and the detection target in the fourth frame image is marked by the second pre-selection frame, and so on, the detection targets in the non-key frame images in each group of frame images are marked by pre-selection frames.

[0087] That is to say, the first frame in each set of frame images is not limited to be a key frame image, and other frame images can also be used as key frame images.

[0088] Step S4, cropping the non-key frame image according to the pre-selection frame to obtain a plurality of pre-selection frame images.

[0089] For example, the non-key frame image includes five detection targets, and the five detection targets are marked respectively by five pre-selection boxes. Five pre-selection box images can be obtained by cropping the non-key frame image according to the five pre-selection boxes.

[0090] When processing images above 720p, since the images are too large, the processing requires large computation and is time-consuming. Therefore, in this embodiment, the non-key frame image can be cropped according to the pre-selected frame to obtain a pre-selected frame image, and then the pre-selected frame image is input into the non-key frame network for processing. Not only can the large image be converted into a small image for processing, but also the non-detection target area in the large image can be removed, thereby improving the processing speed.

[0091] Step S5: input the multiple pre-selected frame images into a non-key frame detection network to obtain the position of the detection target in the pre-selected frame.

[0092] In this embodiment, the non-key frame detection network may be a pre-trained target detection model, wherein the target detection model is used to characterize the correspondence between the pre-selected frame image and the position information of the detection target included in the pre-selected frame image.

[0093] When the pre-selected box image is input into the target detection model, the position information of the detection target in the pre-selected box can be determined. That is, the non-keyframe network is a deep learning neural network for obtaining the position of the detection target in the image. Compared with traditional neural networks, deep neural networks have more neurons and can learn large-scale regional target image samples of different positions and forms; at the same time, in the data preparation stage, the same image can be flipped, toned, scaled, noise-perturbed, and color-transformed by the enhanced transformation method, thereby generating a variety of training images with different environmental characteristics, so that the neural network detector can perform stable performance detection for regional targets in different scenes, different environments, and different shapes, ensuring sufficient sample data volume and avoiding overfitting. In addition, the Dropout mechanism of the neural network can randomly remove some neurons during the feedforward operation of the training process, thereby reducing the mutual dependence between neural networks, allowing the neural network to have stronger generalization ability and avoid overfitting. The deep learning neural network can be a convolutional neural network, a deep belief network, and a stacked autoencoder.

[0094] As an example, the target detection model can be a correspondence table based on a large number of pre-selected frame images and the detection targets included in the pre-selected frame images, and the correspondence table can reflect the correspondence between the pre-selected frame images and the detection targets included in the pre-selected frame images. The target detection model can also be an image recognition model obtained by the technician based on supervised training of an existing artificial neural network.

[0095] Preferably, before inputting the plurality of pre-selected frame images into a non-key frame detection network, the video object acceleration detection method further comprises: performing scaling processing on the plurality of pre-selected frame images.

[0096] It is understandable that, since the sizes of the detection targets are different, the sizes of the corresponding pre-selected boxes are also different. In order to quickly process the images, the multiple pre-selected box images need to be scaled into images of similar size, and then the images of the same size are input into the non-keyframe detection network.

[0097] In this embodiment, before the pre-selected frame images cropped from the non-key frame images are batch-inputted into the non-key frame detection network, the pre-selected frame images can be scaled into images of similar size. In this way, the images of uniform size are inputted into the non-key frame detection network, so that the non-key frame detection network can quickly detect the position of the detection target in the pre-selected frame.

[0098] For example, the current non-key frame image includes five detection targets, and the five detection targets are marked respectively by five pre-selection boxes. The non-key frame image can be cropped according to the five pre-selection boxes to obtain five pre-selection box images. The five pre-selection box images are of different sizes and need to be scaled into five pre-selection box images of similar sizes.

[0099] Step S6: mapping the detected target to the original image corresponding to the non-key frame according to the position in the pre-selected frame.

[0100] It can be understood that the position of the detected target in the pre-selected box is the position detected after the original image in the video is scaled. Therefore, it needs to be mapped to the original image corresponding to the non-key frame to complete the detection of the target in the video image.

[0101] In summary, the video object acceleration detection method provided by the present invention includes dividing all frame images in a video image into preset group frame images, wherein each group frame image includes a key frame image and a non-key frame image; identifying the detection target in the key frame image, and marking a detection frame on the detection target; identifying the detection target in the current non-key frame image, amplifying the detection frame corresponding to the detection target in the previous frame image of the current non-key frame by a preset ratio to generate a pre-selection frame, and marking the detection target in the current non-key frame image with the pre-selection frame; cropping the current non-key frame image according to the pre-selection frame to obtain multiple pre-selection frame images; inputting the multiple pre-selection frame images into a non-key frame detection network to obtain the position of the detection target in the pre-selection frame; and mapping the detection target to the original image corresponding to the non-key frame according to the position in the pre-selection frame.

[0102] The main purpose is to address the problem of slow detection speed of the detection network in scenes above 720p due to too many detection anchor points. By dividing the video images into key frame images and non-key frame images, and simplifying the calculation of the non-key frame images, it is possible to achieve the goal of not having to perform accurate target detection processing on every frame of the video, making full use of the spatial correlation of continuous frames of the video, greatly reducing the time consumption of anchor point classification without losing accuracy, and greatly optimizing the detection speed without basically reducing the detection performance. In addition, by adjusting the ratio of key frames to non-key frames, the needs of different hardware scenarios can be met without changing the algorithm.

[0103] Embodiment 2

[0104] Figure 2 1 is a functional module diagram of a preferred embodiment of the video object acceleration detection device of the present invention.

[0105] In some embodiments, the video object acceleration detection device 20 (hereinafter referred to as "detection device 20") runs in a server. The detection device 20 may include a plurality of functional modules composed of program code segments. The program code of each program segment in the detection device 20 may be stored in a memory and executed by at least one processor to perform (see Figure 1 and its related description) video object acceleration detection function.

[0106] In this embodiment, the detection device 20 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: an initialization module 201, an identification module 202, a clipping module 203 and a processing module 204. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In some embodiments, the functions of each module will be described in detail in subsequent embodiments.

[0107] The initialization module 201 is used to divide all frame images in the video image into preset group frame images, wherein each group frame image includes a key frame image and a non-key frame image.

[0108] Specifically, all frame images in the video image can be divided into preset group frame images, wherein each group frame image includes continuous preset frame images, the first frame image in the continuous preset frame images is a key frame image, and the remaining frame images are non-key frame images.

[0109] For example, a video image with fifty frames is divided into ten groups of frame images, and five consecutive frames are divided into one group, wherein the first frame of the five frames is a key frame image, and the second to fifth frames are non-key frame images. Each of the key frame images corresponds to an original image in the video image, and each of the non-key frame images also corresponds to an original image in the video image, and the original image is a picture of 720p or above.

[0110] It can be understood that the number of image frames in each set of frame images is not limited, and the number of key frame images and non-key frame images in each set of frame images is also not limited.

[0111] When it is necessary to accurately detect the target in the video image, the number of the preset group of frame images can be appropriately increased, and the number of image frames in each group of frame images can be appropriately reduced. For example, a video image with sixty frames of images is divided into groups of twenty frames of images, and three consecutive frames of images in all the frame images in the video image are grouped into one group.

[0112] When the target detection accuracy in the video image is not required to be high, the number of the preset group of frame images can be appropriately reduced, and the number of image frames in each group of frame images can be appropriately increased. For example, a video image with sixty frames of images is divided into groups of ten frames of images, and six consecutive frames of images in all the frame images in the video image are grouped into one group.

[0113] In this embodiment, before dividing all the frame images in the video image into preset group frame images, the video object acceleration detection device 20 can also: receive the video image captured by the camera, and decode the video image.

[0114] In this embodiment, the video image is collected by a camera. The camera and the server are connected via a wired or wireless network. The camera sends the collected video image to the server via a wired or wireless network.

[0115] The recognition module 202 is used to recognize the detection target in the key frame image and mark a detection frame on the detection target.

[0116] In this embodiment, the detection target may be a person, an animal, or a vehicle, etc. The detection target in the key frame image may include multiple detection targets, each of which corresponds to a detection frame. It is understandable that the corresponding detection frame size is different depending on the detection target.

[0117] In this implementation, identifying the detection target in the key frame image includes:

[0118] Sliding the key frame images in a preset order through sliding windows of different window sizes;

[0119] Each time you slide, the image corresponding to the current window is input into a pre-trained classifier; and

[0120] When the classification probability output by the classifier after processing the image corresponding to the current window is greater than a preset value, it is confirmed that the detection target in the key frame image is identified, and a mark of the detection target is output.

[0121] For example, first slide the sliding windows of different window sizes from left to right and from top to bottom on the current frame image. Execute the classifier on the current window each time it slides (the classifier is trained in advance). If the current window obtains a higher classification probability, it is considered that the target is detected. After detecting each sliding window of different window sizes, the target marks detected by different windows will be obtained. These window sizes will have a high degree of repetition. Finally, the non-maximum suppression (NMS) method is used for screening to obtain the detected target in the key frame image. Finally, the detected target is obtained after NMS screening.

[0122] Screening the mark of the detection target to obtain the detection target in the key frame image includes:

[0123] Arrange the probabilities obtained after inputting all sliding windows into the classifier in descending order, and select the sliding window corresponding to the maximum classification probability;

[0124] Calculating the overlapping areas between other sliding windows and the sliding window corresponding to the maximum classification probability respectively, and determining whether the overlapping areas are greater than a preset area;

[0125] If the overlapping area is less than or equal to the preset area, retain the corresponding sliding window and output the detection target corresponding to the sliding window;

[0126] If the overlapping area is larger than the preset area, deleting the corresponding sliding window; and

[0127] Repeat the above steps until all other sliding windows are aligned.

[0128] The recognition module 202 is also used to recognize the detection target in the non-key frame image in the preset group of frame images, enlarge the detection box in the key frame image by a preset ratio to generate a pre-selection box, and mark the detection target in the non-key frame image with the pre-selection box.

[0129] It can be understood that the method for identifying the detection target in the current non-key frame image can be consistent with the method for identifying the detection target in the key frame image, which will not be described in detail here.

[0130] In this embodiment, the detection target in each non-key frame image in each group of frame images is identified. The previous frame image can be a key frame image or a non-key frame image.

[0131] The steps of identifying the detection target in the non-key frame image in the preset group of frame images, amplifying the detection frame in the key frame image by a preset ratio to generate a pre-selection frame, and marking the detection target in the non-key frame image by the pre-selection frame include the following steps:

[0132] Identifying a detection target in a current non-key frame image in the preset group of frame images;

[0133] A detection frame in a key frame image before the current non-key frame image is enlarged by a preset ratio to generate a pre-selection frame, and a detection target in the current non-key frame image is marked by the pre-selection frame;

[0134] Identifying a detection target in a non-key frame image after the current non-key frame image;

[0135] The pre-selected box in the current non-key frame image is enlarged by a preset ratio to generate a first pre-selected box, and the detection targets in the non-key frame images after the current non-key frame image are marked by the first pre-selected box, and so on, until the detection targets in all non-key frame images in the preset group of frame images are marked.

[0136] For example, if five consecutive frames of images are grouped together, the first frame of the five frames is a key frame image, and the second to fifth frames are non-key frame images. The first frame is identified as a detection target in the key frame image, and a detection frame is marked on the detection target; the second frame is identified as a detection target in the non-key frame image, the detection frame in the key frame image is magnified by a preset ratio to generate a first pre-selection frame, and the detection target in the second frame image is marked by the first pre-selection frame; then the third frame is identified as a detection target in the non-key frame image, the detection frame (i.e., the first pre-selection frame) in the second frame image (non-key frame image) is magnified by a preset ratio to generate a second pre-selection frame, and the detection target in the third frame image is marked by the second pre-selection frame, and so on, the detection targets in the non-key frame images in each group of frame images are marked by pre-selection frames.

[0137] For example, if five consecutive frames of images are grouped together, the second frame of the five frames is a key frame image, and the first frame and the third to fifth frames are non-key frame images. The second frame is identified as a detection target in the key frame image, and a detection frame is marked on the detection target; the third frame is identified as a detection target in the non-key frame image, the detection frame in the key frame image is magnified by a preset ratio to generate a first pre-selection frame, and the detection target in the third frame image is marked by the first pre-selection frame; then the fourth frame is identified as a detection target in the non-key frame image, the detection frame (i.e., the first pre-selection frame) in the third frame image (non-key frame image) is magnified by a preset ratio to generate a second pre-selection frame, and the detection target in the fourth frame image is marked by the second pre-selection frame, and so on, the detection targets in the non-key frame images in each group of frame images are marked by pre-selection frames.

[0138] That is to say, the first frame in each set of frame images is not limited to be a key frame image, and other frame images can also be used as key frame images.

[0139] The cropping module 203 is used to crop the non-key frame image according to the pre-selection frame to obtain a plurality of pre-selection frame images.

[0140] For example, the non-key frame image includes five detection targets, and the five detection targets are marked respectively by five pre-selection boxes. Five pre-selection box images can be obtained by cropping the non-key frame image according to the five pre-selection boxes.

[0141] When processing images above 720p, since the images are too large, the processing requires large computation and is time-consuming. Therefore, in this embodiment, the non-key frame image can be cropped according to the pre-selected frame to obtain a pre-selected frame image, and then the pre-selected frame image is input into the non-key frame network for processing. Not only can the large image be converted into a small image for processing, but also the non-detection target area in the large image can be removed, thereby improving the processing speed.

[0142] The processing module 204 is used to input the multiple pre-selected frame images into a non-key frame detection network to obtain the position of the detection target in the pre-selected frame.

[0143] In this embodiment, the non-key frame detection network may be a pre-trained target detection model, wherein the target detection model is used to characterize the correspondence between the pre-selected frame image and the position information of the detection target included in the pre-selected frame image.

[0144] When the pre-selected frame image is input into the target detection model, the position information of the detection target in the pre-selected frame can be determined. That is, the non-keyframe network is a deep learning neural network for obtaining the position of the detection target in the image.

[0145] Compared with traditional neural networks, deep neural networks have more neurons and can learn large-scale regional target image samples of different positions and shapes; at the same time, in the data preparation stage, the same image can be flipped, transformed, scaled, noise-perturbed, and color-transformed through enhanced transformation methods, thereby generating training images with a variety of different environmental characteristics, so that the neural network detector can perform stable performance detection for regional targets in different scenes, different environments, and different shapes, ensuring sufficient sample data volume and avoiding overfitting. In addition, the Dropout mechanism of the neural network can randomly remove some neurons during the feedforward operation of the training process, thereby reducing the interdependence between neural networks, allowing the neural network to have stronger generalization capabilities and avoid overfitting. The deep learning neural network can be a convolutional neural network, a deep belief network, and a stacked autoencoder.

[0146] As an example, the target detection model can be a correspondence table based on a large number of pre-selected frame images and the detection targets included in the pre-selected frame images, and the correspondence table can reflect the correspondence between the pre-selected frame images and the detection targets included in the pre-selected frame images. The target detection model can also be an image recognition model obtained by the technician based on supervised training of an existing artificial neural network.

[0147] Preferably, before inputting the plurality of pre-selected frame images into the non-key frame detection network, the video object acceleration detection device 20 may further: perform scaling processing on the plurality of pre-selected frame images.

[0148] It is understandable that, since the sizes of the detection targets are different, the sizes of the corresponding pre-selected boxes are also different. In order to quickly process the images, the multiple pre-selected box images need to be scaled into images of similar size, and then the images of the same size are input into the non-keyframe detection network.

[0149] In this embodiment, before the pre-selected frame images cropped from the non-key frame images are batch-inputted into the non-key frame detection network, the pre-selected frame images can be scaled into images of similar size. In this way, the images of uniform size are inputted into the non-key frame detection network, so that the non-key frame detection network can quickly detect the position of the detection target in the pre-selected frame.

[0150] For example, the current non-key frame image includes five detection targets, and the five detection targets are marked respectively by five pre-selection boxes. The current non-key frame image is cropped according to the five pre-selection boxes to obtain five pre-selection box images. The five pre-selection box images are of different sizes and need to be scaled into five pre-selection box images of similar sizes.

[0151] The processing module 204 is further configured to map the detected target to an original image corresponding to the non-key frame according to the position in the pre-selected frame.

[0152] It can be understood that the position of the detected target in the pre-selected box is the position detected after the original image in the video is scaled. Therefore, it needs to be mapped to the original image corresponding to the non-key frame to complete the detection of the target in the video image.

[0153] In summary, the video object acceleration detection device 20 provided by the present invention includes an initialization module 201, a recognition module 202, a cropping module 203 and a processing module 204. The initialization module 201 is used to divide all frame images in the video image into preset group frame images, wherein each group frame image includes a key frame image and a non-key frame image; the recognition module 202 is used to recognize the detection target in the key frame image and mark the detection frame on the detection target; the recognition module 202 is also used to recognize the detection target in the non-key frame image in the preset group frame image, and generate a pre-selection frame after enlarging the detection frame in the key frame image by a preset ratio, and mark the detection target in the non-key frame image by the pre-selection frame; the cropping module 203 is used to crop the non-key frame image according to the pre-selection frame to obtain multiple pre-selection frame images; the processing module 204 is used to input the multiple pre-selection frame images into the non-key frame detection network to obtain the position of the detection target in the pre-selection frame; and the processing module 204 is also used to map the detection target to the original image corresponding to the non-key frame according to the position in the pre-selection frame.

[0154] The main purpose is to address the problem of slow detection speed of the detection network in scenes above 720p due to too many detection anchor points. By dividing the video images into key frame images and non-key frame images, and simplifying the calculation of the non-key frame images, it is possible to achieve the goal of not having to perform accurate target detection processing on every frame of the video, making full use of the spatial correlation of continuous frames of the video, greatly reducing the time consumption of anchor point classification without losing accuracy, and greatly optimizing the detection speed without basically reducing the detection performance. In addition, by adjusting the ratio of key frames to non-key frames, the needs of different hardware scenarios can be met without changing the algorithm.

[0155] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a computer device (which can be a personal computer, a dual-screen device, or a network device, etc.) or a processor to execute a part of the method described in each embodiment of the present invention.

[0156] Embodiment 3

[0157] Figure 3 A schematic diagram of a server provided in Embodiment 3 of the present invention.

[0158] The server 3 includes: a database 31 , a memory 32 , at least one processor 33 , a computer program 34 stored in the memory 32 and executable on the at least one processor 33 , and at least one communication bus 35 .

[0159] When the at least one processor 33 executes the computer program 34 , the steps in the above-mentioned video object acceleration detection method embodiment are implemented.

[0160] Exemplarily, the computer program 34 may be divided into one or more modules / units, which are stored in the memory 32 and executed by the at least one processor 33 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 34 in the server 3.

[0161] The server 3 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc. Those skilled in the art will understand that the schematic diagram Figure 3 It is only an example of server 3 and does not constitute a limitation on server 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the server 3 may also include input and output devices, network access devices, buses, etc.

[0162] The database 31 is a warehouse established on the server 3 to organize, store and manage data according to a data structure. Databases are generally divided into three types: hierarchical databases, network databases and relational databases. In this embodiment, the database 31 is used to store the video image.

[0163] The at least one processor 33 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 33 may be a microprocessor or any conventional processor, etc. The processor 33 is the control center of the server 3, and uses various interfaces and lines to connect various parts of the entire server 3.

[0164] The memory 32 can be used to store the computer program 34 and / or modules / units. The processor 33 implements various functions of the server 3 by running or executing the computer program and / or modules / units stored in the memory 32 and calling the data stored in the memory 32. The memory 32 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the server 3 (such as audio data, a phone book, etc.), etc. In addition, the memory 32 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0165] The memory 32 stores program codes, and the at least one processor 33 can call the program codes stored in the memory 32 to execute related functions. For example, Figure 2 The modules described in the flowchart (initialization module 201, identification module 202, cropping module 203 and processing module 204) are program codes stored in the memory 32 and executed by the at least one processor 33, thereby realizing the functions of the modules to achieve the purpose of accelerated video object detection.

[0166] The initialization module 201 is used to divide all frame images in the video image into preset group frame images, wherein each group frame image includes a key frame image and a non-key frame image;

[0167] The recognition module 202 is used to recognize the detection target in the key frame image and mark a detection frame on the detection target;

[0168] The recognition module 202 is further used to recognize the detection target in the non-key frame image in the preset group of frame images, enlarge the detection frame in the key frame image by a preset ratio to generate a pre-selection frame, and mark the detection target in the non-key frame image with the pre-selection frame;

[0169] The cropping module 203 is used to crop the non-key frame image according to the pre-selection frame to obtain a plurality of pre-selection frame images; the processing module 204 is used to input the plurality of pre-selection frame images into a non-key frame detection network to obtain the position of the detection target in the pre-selection frame; and

[0170] The processing module 204 is further configured to map the detected target to an original image corresponding to the non-key frame according to the position in the pre-selected frame.

[0171] If the module / unit integrated in the server 3 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 present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0172] Although not shown, the server 3 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 33 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power source may also include one or more DC or AC power sources, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components. The server 3 may also include a Bluetooth module, a Wi-Fi module, etc., which will not be described in detail here.

[0173] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0174] In the several embodiments provided by the present invention, it should be understood that the disclosed electronic device and method can be implemented in other ways. For example, the electronic device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation.

[0175] In addition, each functional unit in each embodiment of the present invention may be integrated into the same processing unit, each unit may exist physically separately, or two or more units may be integrated into the same unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0176] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the system claim may also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A video object acceleration detection method, characterized in that: The method comprises: Dividing all frame images in the video image into preset group frame images, wherein each group frame image includes a key frame image and a non-key frame image; Identify a detection target in the key frame image and mark a detection frame on the detection target; Identify the detection target in the non-key frame image in the preset group of frame images, enlarge the detection box in the key frame image by a preset ratio to generate a pre-selection box, and mark the detection target in the non-key frame image by the pre-selection box, including: identify the detection target in the current non-key frame image in the preset group of frame images; enlarge the detection box in the previous key frame image corresponding to the current non-key frame image by a preset ratio to generate a pre-selection box, and mark the detection target in the current non-key frame image by the pre-selection box; identify the detection target in the next non-key frame image corresponding to the current non-key frame image; enlarge the pre-selection box in the current non-key frame image by a preset ratio to generate a first pre-selection box, and mark the detection target in the next non-key frame image corresponding to the current non-key frame image by the first pre-selection box, and so on, until the detection targets in all non-key frame images in the preset group of frame images are marked; Cropping the non-key frame image according to the pre-selected frame to obtain a plurality of pre-selected frame images; Inputting the plurality of pre-selected frame images into a non-keyframe detection network to obtain the position of the detection target in the pre-selected frame; and The detected target is mapped to the original image corresponding to the non-key frame according to the position of the detected target in the pre-selected frame.

2. The video object acceleration detection method according to claim 1, characterized in that: Before inputting the plurality of pre-selected frame images into the non-key frame detection network, the video object acceleration detection method further includes: The multiple pre-selected frame images are scaled.

3. The video object acceleration detection method according to claim 1, characterized in that: The non-keyframe detection network is a deep learning neural network used to obtain the position of the detection target in the image.

4. The video object acceleration detection method according to claim 1, characterized in that: The identifying the detection target in the key frame image comprises: Sliding the key frame images in a preset order through sliding windows of different window sizes; Each time you slide, the image corresponding to the current window is input into a pre-trained classifier; and When the classification probability output by the classifier after processing the image corresponding to the current window is greater than a preset value, it is confirmed that the detection target in the key frame image is recognized, and a mark of the detection target is output.

5. The video object acceleration detection method according to claim 4, characterized in that: The method further includes: screening the mark of the detection target to obtain the detection target in the key frame image.

6. The video object acceleration detection method according to claim 5, characterized in that: The screening of the mark of the detection target to obtain the detection target in the key frame image comprises: Arrange the probabilities obtained after all sliding windows are input into the classifier in descending order, and select the sliding window corresponding to the maximum classification probability; Calculating the overlapping areas between other sliding windows and the sliding window corresponding to the maximum classification probability respectively, and determining whether the overlapping areas are greater than a preset area; If the overlapping area is less than or equal to the preset area, retain the corresponding sliding window and output the detection target corresponding to the sliding window; If the overlapping area is larger than the preset area, deleting the corresponding sliding window; and Repeat the above steps until all other sliding windows are aligned.

7. A video object acceleration detection device, characterized in that: The device comprises: An initialization module, used for dividing all frame images in the video image into preset group frame images, wherein each group frame image includes a key frame image and a non-key frame image; A recognition module, used for recognizing a detection target in the key frame image and marking a detection frame on the detection target; The recognition module is also used to recognize the detection target in the non-key frame image in the preset group of frame images, amplify the detection box in the key frame image by a preset ratio to generate a pre-selection box, and mark the detection target in the non-key frame image by the pre-selection box, including: recognizing the detection target in the current non-key frame image in the preset group of frame images; amplifying the detection box in the previous key frame image corresponding to the current non-key frame image by a preset ratio to generate a pre-selection box, and marking the detection target in the current non-key frame image by the pre-selection box; recognizing the detection target in the next non-key frame image corresponding to the current non-key frame image; amplifying the pre-selection box in the current non-key frame image by a preset ratio to generate a first pre-selection box, and marking the detection target in the next non-key frame image corresponding to the current non-key frame image by the first pre-selection box, and so on, until the detection targets in all non-key frame images in the preset group of frame images are marked; A cropping module, used for cropping the non-key frame image according to the pre-selected frame to obtain a plurality of pre-selected frame images; A processing module, used for inputting the plurality of pre-selected frame images into a non-key frame detection network to obtain the position of the detection target in the pre-selected frame; and The processing module is further used to map the detected target to the original image corresponding to the non-key frame according to the position of the detected target in the pre-selected frame.

8. A server, characterized in that: The server includes a processor and a memory, and the processor is used to implement the video object acceleration detection method according to any one of claims 1 to 6 when executing a computer program stored in the memory.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the video object acceleration detection method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Key point detection method and apparatus, storage medium, computer program and electronic device

    CN108230357A

  • Method and system for video clip compression

    US20060228029A1

  • Feature flow for video recognition

    US20180268208A1