CN111507286B - Dummy detection method and device - Google Patents

Dummy detection method and device Download PDF

Info

Publication number
CN111507286B
CN111507286B CN202010320502.8A CN202010320502A CN111507286B CN 111507286 B CN111507286 B CN 111507286B CN 202010320502 A CN202010320502 A CN 202010320502A CN 111507286 B CN111507286 B CN 111507286B
Authority
CN
China
Prior art keywords
video frame
frame sequence
dummy
target
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010320502.8A
Other languages
Chinese (zh)
Other versions
CN111507286A (en
Inventor
詹渝
翁仁亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aibee Technology Co Ltd
Original Assignee
Beijing Aibee Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Aibee Technology Co Ltd filed Critical Beijing Aibee Technology Co Ltd
Priority to CN202010320502.8A priority Critical patent/CN111507286B/en
Publication of CN111507286A publication Critical patent/CN111507286A/en
Application granted granted Critical
Publication of CN111507286B publication Critical patent/CN111507286B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/103Static body considered as a whole, e.g. static pedestrian or occupant recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The application provides a dummy detection method and device, wherein the method comprises the following steps: acquiring a video frame sequence set; acquiring a video frame sequence with the frame number being greater than or equal to a preset frame number, and forming a first video frame sequence set; determining a video frame sequence of which the target pedestrian is a suspected dummy according to the intersection ratio of the region of each video frame sequence corresponding to each video frame sequence in each comparison frame and the region of each non-comparison frame in the first video frame sequence set, and forming a first candidate dummy sequence set; and for each video frame sequence in the first candidate dummy sequence set, determining whether the target pedestrian is a dummy or not according to the similarity of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the region of the target pedestrian in each non-comparison frame. According to the dummy detection method, whether the target pedestrian is a dummy or not can be determined according to the video frame sequence corresponding to the target pedestrian.

Description

Dummy detection method and device
Technical Field
The present disclosure relates to the field of target detection technologies, and in particular, to a method and an apparatus for detecting a dummy.
Background
In general, non-real persons in a specified video are collectively referred to as dummies, such as shop showcase models, poster models, showcase apparel, and the like in a surveillance video.
At present, a pedestrian detection algorithm can be adopted to detect pedestrians in a specified video. Since the pedestrian detection algorithm is usually implemented by using a convolutional neural network, and the training data of the convolutional neural network often contains a large amount of noise during training, when the pedestrian detection algorithm detects a target pedestrian in a specified video, a situation that a dummy in the specified video is detected as a true person may occur, for example, when the pedestrian detection algorithm is used for detecting a pedestrian in a monitoring video, a shop showcase model in the monitoring video is detected as a true person.
In order to obtain accurate pedestrian detection results, a need exists for a dummy detection method to further detect whether a target pedestrian (a pedestrian detected by a pedestrian detection algorithm) is a dummy.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for detecting a dummy, which are used for determining whether a pedestrian detected by using a pedestrian detection algorithm has a dummy, and the technical scheme is as follows:
a dummy detection method comprising:
acquiring a video frame sequence set, wherein the video frame sequence set comprises at least one video frame sequence corresponding to a target pedestrian, and the video frame sequence corresponding to the target pedestrian is a sequence formed by video frames of the target pedestrian detected from a designated video;
Acquiring a video frame sequence with the frame number greater than or equal to a preset frame number from a video frame sequence set to form a first video frame sequence set;
determining a video frame sequence of a corresponding target row artificial suspected dummy according to the intersection ratio of the region of each video frame sequence in each contrast frame and the region of each non-contrast frame in the first video frame sequence set, and forming a first candidate dummy sequence set by the determined video frame sequences, wherein the contrast frame in one video frame sequence is at least one video frame in the video frame sequence, and other video frames in the video frame sequences are non-contrast frames;
and for each video frame sequence in the first candidate dummy sequence set, determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the region of the target pedestrian in each non-comparison frame.
Optionally, determining, according to the intersection ratio of the region where the target pedestrian corresponding to each video frame sequence is located in each comparison frame and the region where the target pedestrian is located in each non-comparison frame in the first video frame sequence set, a video frame sequence of the corresponding target pedestrian artificial suspected dummy includes:
For each video frame sequence in the first set of video frame sequences:
calculating the cross-over ratio of the region where the target pedestrian corresponding to the video frame sequence is located in each comparison frame and the region where the target pedestrian corresponding to the video frame sequence is located in each non-comparison frame, and obtaining a plurality of cross-over ratios;
acquiring the number of the cross ratios which are larger than or equal to a preset first cross ratio threshold value from the plurality of cross ratios as a first number;
calculating a ratio of the first number to a second number, wherein the second number is a total number of calculated cross ratios;
if the ratio of the first quantity to the second quantity is larger than or equal to a preset cross ratio duty ratio threshold value, determining a target behavior suspected dummy corresponding to the video frame sequence;
and obtaining a video frame sequence of the corresponding target row artificial suspected dummy in the first video frame sequence set.
Optionally, determining whether the target pedestrian corresponding to the video frame sequence is a dummy according to the similarity between the region where the target pedestrian corresponding to the video frame sequence is located in each comparison frame and the region where the target pedestrian corresponding to each non-comparison frame is located in each comparison frame includes:
calculating the similarity of the region where the target pedestrian corresponding to the video frame sequence is located in each comparison frame and the region where the target pedestrian corresponding to the video frame sequence is located in each non-comparison frame, and obtaining a plurality of similarities;
Acquiring the number of the similarity which is larger than or equal to a preset similarity threshold value in the plurality of the similarities as a third number;
calculating a ratio of the third number to a fourth number, wherein the fourth number is a total number of calculated similarities;
and if the ratio of the third quantity to the fourth quantity is larger than or equal to a preset similarity ratio threshold value, determining a target artificial dummy corresponding to the video frame sequence.
Preferably, calculating the similarity between the region of the target pedestrian corresponding to the video frame sequence in each contrast frame and the region of the target pedestrian in each non-contrast frame includes:
acquiring the feature vector of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the feature vector of the region where the target pedestrian is located in each non-contrast frame;
and calculating the similarity of the feature vector of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the feature vector of the region of the target pedestrian in each non-comparison frame as the similarity of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the region of the target pedestrian in each non-comparison frame.
Optionally, the dummy detection method further includes:
if at least one target pedestrian corresponding to the video frame sequence exists in the first candidate dummy sequence set to be a dummy, acquiring a video frame sequence with the frame number smaller than the preset frame number from the video frame sequence set to form a second video frame sequence set;
Obtaining a video frame sequence of a corresponding target line artificial suspected dummy from a second video frame sequence set to form a second candidate dummy sequence set;
the video frame sequences of the corresponding target row artificial reality in the first candidate dummy sequence set and the video frame sequences in the second candidate dummy sequence set form a third candidate dummy sequence set;
for each video frame sequence in the third candidate dummy sequence set, determining whether a target pedestrian corresponding to the video frame sequence is a dummy or not according to the intersection ratio of the average area corresponding to the video frame sequence and the average area corresponding to the target video frame sequence;
the average area corresponding to any video frame sequence is the average value of the area of the target pedestrian corresponding to the video frame sequence in each video frame where the target pedestrian is located, and the target video frame sequence is a video frame sequence of which the corresponding target pedestrian is a dummy in the first candidate dummy sequence set.
Optionally, the dummy detection method further includes:
obtaining a video frame sequence of a corresponding target row artificial true person from the third candidate dummy sequence set to form a fourth candidate dummy sequence set;
for each video frame sequence in the fourth set of candidate dummy sequences:
Calculating the average value of the area of the target pedestrian corresponding to the video frame sequence in the video frame sequence as a target average area;
obtaining a background video frame closest to the shooting time of a first video frame in a video frame sequence from the background video frame sequence as a target background video frame, wherein the background video frame sequence is obtained by sampling a specified video;
and determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity between the target area in each non-target background video frame and the target area in the target background video frame, wherein the target area in any background video frame is the area in the background video frame at the position indicated by the target average area.
Optionally, the dummy detection method may further include:
a fifth candidate dummy sequence set is formed by the video frame sequences of the corresponding target row artificial reality in the first candidate dummy sequence set;
for each video frame sequence in the fifth set of candidate dummy sequences:
calculating the average value of the area of the target pedestrian corresponding to the video frame sequence in the video frame sequence as a target average area;
obtaining a background video frame closest to the shooting time of a first video frame in a video frame sequence from the background video frame sequence as a target background video frame, wherein the background video frame sequence is obtained by sampling the appointed video;
And determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity between the target area in each non-target background video frame and the target area in the target background video frame, wherein the target area in any background video frame is the area in the background video frame at the position indicated by the target average area.
A dummy detection apparatus comprising: the device comprises a video frame sequence set acquisition module, a first candidate dummy sequence set determination module and a first dummy judgment module;
the system comprises a video frame sequence set acquisition module, a video frame sequence detection module and a video frame sequence detection module, wherein the video frame sequence set is used for acquiring a video frame sequence set, the video frame sequence set comprises at least one video frame sequence corresponding to a target pedestrian, and the video frame sequence corresponding to the target pedestrian is a sequence formed by video frames of the target pedestrian detected from a specified video;
the first video frame sequence set acquisition module is used for acquiring video frame sequences with the frame number being greater than or equal to a preset frame number from the video frame sequence set to form a first video frame sequence set;
the first candidate dummy sequence set determining module is used for determining a video frame sequence of a corresponding target row of artificial suspected dummy according to the intersection ratio of the region where each video frame sequence corresponds to each contrast frame and the region where each non-contrast frame corresponds to in the first video frame sequence set, and the determined video frame sequences form the first candidate dummy sequence set, wherein the contrast frame in one video frame sequence is at least one video frame in the video frame sequence, and other video frames in the video frame sequence are non-contrast frames;
The first dummy judgment module is used for determining whether the target pedestrian corresponding to each video frame sequence in the first candidate dummy sequence set is a dummy or not according to the similarity of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the region of the target pedestrian in each non-comparison frame.
Optionally, the dummy detection apparatus may further include:
the second video frame sequence set acquisition module is used for acquiring a video frame sequence with the frame number smaller than the preset frame number from the video frame sequence set to form a second video frame sequence set if at least one target pedestrian corresponding to the video frame sequence exists in the first candidate dummy sequence set as a dummy;
the second candidate dummy sequence set acquisition module is used for acquiring video frame sequences of corresponding target lines of artificial suspected dummy from the second video frame sequence set to form a second candidate dummy sequence set;
the third candidate dummy sequence set acquisition module is used for forming a third candidate dummy sequence set from the video frame sequences of the corresponding target row artificial reality in the first candidate dummy sequence set and the video frame sequences in the second candidate dummy sequence set;
The second dummy judgment module is used for determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the intersection ratio of the average area corresponding to the video frame sequence and the average area corresponding to the target video frame sequence for each video frame sequence in the third candidate dummy sequence set;
the average area corresponding to any video frame sequence is an average value of areas of target pedestrians corresponding to the video frame sequence in each video frame where the target pedestrians are located, and the target video frame sequence is a video frame sequence of which the corresponding target pedestrians are dummy persons in the first candidate dummy sequence set.
Optionally, the dummy detection apparatus may further include:
the fourth candidate dummy sequence set acquisition module is used for acquiring a video frame sequence of a corresponding target row artificial true person from the third candidate dummy sequence set to form a fourth candidate dummy sequence set;
a third dummy judgment module, configured to, for each video frame sequence in the fourth candidate dummy sequence set: calculating the average value of the area of the target pedestrian corresponding to the video frame sequence in the video frame sequence as a target average area; obtaining a background video frame closest to the shooting time of a first video frame in a video frame sequence from the background video frame sequence as a target background video frame, wherein the background video frame sequence is obtained by sampling the appointed video; and determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity between the target area in each non-target background video frame and the target area in the target background video frame, wherein the target area in any background video frame is the area in the background video frame at the position indicated by the target average area.
According to the technical scheme, the dummy detection method provided by the application obtains a video frame sequence set, and obtains a video frame sequence with the frame number greater than or equal to the preset frame number from the video frame sequence set to form a first video frame sequence set; considering that the dummy in the designated video generally does not move in position, determining a video frame sequence of a corresponding target behavior suspected dummy according to the intersection ratio of the region where the target pedestrian corresponding to each video frame sequence is located in each comparison frame and the region where the target pedestrian corresponding to each non-comparison frame is located in the first video frame sequence set, and forming a first candidate dummy sequence set by the determined video frame sequences; further, the application also considers that the dummy in the designated video generally does not have apparent change, so that for each video frame sequence in the first candidate dummy sequence set, whether the target pedestrian corresponding to the video frame sequence is a dummy is determined according to the similarity of the region of the target pedestrian corresponding to the video frame sequence in each contrast frame and the region of the target pedestrian in each non-contrast frame. According to the dummy detection method, whether the target pedestrian is a dummy or not can be determined according to the video frame sequence corresponding to the target pedestrian.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
Fig. 1 is a flow chart of a method for detecting a dummy according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an area of a target pedestrian in a video frame;
FIGS. 3a-3c are schematic diagrams of a video frame sequence that includes 3 frames of video frames altogether;
fig. 4 is a schematic structural diagram of a dummy detection apparatus according to an embodiment of the present disclosure;
fig. 5 is a block diagram of a hardware structure of a dummy detection apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
At present, a pedestrian detection algorithm may be used to detect a pedestrian in a specified video, however, a dummy may be present in a pedestrian detected by the pedestrian detection algorithm, so as to avoid interference of the dummy on a subsequent target tracking algorithm, a dummy detection method is provided to determine whether a dummy exists in the pedestrian detected by the pedestrian detection algorithm, and the dummy detection method provided in the present application is described in detail by the following embodiments.
Referring to fig. 1, a flow chart of a method for detecting a dummy according to an embodiment of the present application is shown, where the method may include:
step S100, acquiring a video frame sequence set.
The video frame sequence set comprises at least one video frame sequence corresponding to a target pedestrian, wherein the video frame sequence corresponding to the target pedestrian is a sequence formed by video frames of the target pedestrian detected from the appointed video.
For example, if 3 target pedestrians are detected from the specified video frames by using the pedestrian detection algorithm, the video frame sequence set in step S100 includes a video frame sequence corresponding to the target pedestrian 1, a video frame sequence corresponding to the target pedestrian 2, and a video frame sequence corresponding to the target pedestrian 3, where the video frame sequence corresponding to any one target pedestrian is a sequence composed of video frames of the target pedestrian, for example, in the specified video, the video frames of the target pedestrian 1 are the 1 st to 5 th frames and the 8 th frames, the video frames of the target pedestrian 2 are the 2 nd to 9 th frames, and the video frames of the target pedestrian 3 are the 17 th to 20 th frames, and the video frame sequence set includes a video frame sequence 1 composed of the 1 st to 5 th frames and the 8 th frames (corresponding to the target pedestrian 1), a video frame sequence 2 composed of the 2 nd frames and the 9 th to 13 th frames (corresponding to the target pedestrian 2), and a video frame sequence 3 composed of the 17 th to 20 th frames (corresponding to the target pedestrian 3).
It should be noted that, each video frame in the video frame sequence corresponding to any target pedestrian is ordered according to the sequence of shooting time.
Step S110, a video frame sequence with the frame number larger than or equal to a preset frame number is obtained from the video frame sequence set to form a first video frame sequence set.
The video frame sequence set comprises a video frame sequence corresponding to a target pedestrian 1, a video frame sequence corresponding to a target pedestrian 2 and a video frame sequence corresponding to a target pedestrian 3, wherein the video frame sequence corresponding to the target pedestrian 1 is 10 frames in total, the video frame sequence corresponding to the target pedestrian 2 is 5 frames in total, and the video frame sequence corresponding to the target pedestrian 3 is 8 frames in total. If the preset frame number is 6 frames, the video frame sequence corresponding to the target pedestrian 1 and the video frame sequence corresponding to the target pedestrian 3 form a first video frame sequence set.
The preset frame number may be determined according to actual situations, and the application is not specifically limited.
Step S120, determining a video frame sequence of a corresponding target row of artificial suspected dummy according to the intersection ratio of the region of each contrast frame of the target pedestrian corresponding to each video frame sequence and the region of each non-contrast frame in the first video frame sequence set, and forming a first candidate dummy sequence set by the determined video frame sequences.
The reference frame in a video frame sequence is at least one video frame in the video frame sequence, optionally, the reference frame in a video frame sequence may be two video frames in the video frame sequence, preferably, the two video frames may be a first video frame and a last video frame in the video frame sequence, and of course, the application is not limited thereto, for example, the two video frames may also be a second video frame and a last second video frame in the video frame sequence, or a first video frame and a last second video frame in the video frame sequence, or a second video frame and a last video frame in the video frame sequence, and so on.
Specifically, for each video frame sequence in the first video frame sequence set, if the intersection ratio of the region where the target pedestrian corresponding to the video frame sequence is located in each comparison frame and the region where the target pedestrian is located in each non-comparison frame meets the intersection ratio condition, determining that the video frame sequence is a suspected dummy sequence, that is, the target pedestrian corresponding to the video frame sequence is a suspected dummy. And forming the determined suspected dummy sequence into a first candidate dummy sequence set.
Considering that the dummy does not normally move in position in the designated video, if the target pedestrian is a dummy, the intersection ratio of the region where the target pedestrian is located in each comparison frame to the region where the target pedestrian is located in each non-comparison frame will be large; in contrast, a true person generally moves in position in a specified video, and therefore, if a target pedestrian is a true person and the target pedestrian moves in position in the specified video, the cross-over ratio of the area where the target pedestrian is located in each contrast frame to the area where the target pedestrian is located in each non-contrast frame is small. Based on the above, the method can determine whether the target pedestrian is a suspected dummy according to the intersection ratio of the area of the target pedestrian in each comparison frame and the area of the target pedestrian in each non-comparison frame.
Step S130, for each video frame sequence in the first candidate dummy sequence set, determining whether the target pedestrian corresponding to the video frame sequence is a dummy according to the similarity between the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the region of the target pedestrian in each non-comparison frame.
Specifically, for each video frame sequence in the first candidate dummy sequence set, if the similarity between the region where the target pedestrian corresponding to the video frame sequence is located in each comparison frame and the region where the target pedestrian is located in each non-comparison frame meets the similarity condition, determining the target artificial dummy corresponding to the video frame sequence.
It should be understood that if a target pedestrian is a dummy, the region in the comparison frame will be highly similar to the region in the non-comparison frame, so the present application can determine whether the target pedestrian corresponding to the video frame sequence is a dummy according to the similarity of the region in each comparison frame and the region in each non-comparison frame of the target pedestrian corresponding to the video frame sequence.
According to the method for detecting the dummy, after the video frame sequence sets formed by the video frame sequences corresponding to the target pedestrians are obtained, the video frame sequences with the frame numbers larger than or equal to the preset frame number are firstly obtained from the video frame sequence sets to form the first video frame sequence set, and the fact that the position of the dummy in the specified video is not moved is considered, so that the method determines whether the target corresponding to the video frame sequence is a dummy or not according to the similarity of the region of the target pedestrian corresponding to the video frame sequence in each contrast frame to the region of the target pedestrian in each non-contrast frame in the first video frame sequence set, and the determined video frame sequences form the first candidate dummy sequence set. According to the dummy detection method, whether the target pedestrian is a dummy can be determined according to the video frame sequence corresponding to the target pedestrian.
The following describes "step S120, determining a video frame sequence of a corresponding target pedestrian artificial suspected dummy according to an intersection ratio of an area where each video frame sequence corresponds to each reference frame and an area where each non-reference frame corresponds to each reference frame" in the first video frame sequence set.
The key of step S120 is to determine whether the target pedestrian corresponding to each video frame sequence in the first set of video frame sequences is a suspected dummy, and taking a video frame sequence as an example, a process of determining whether the target pedestrian corresponding to the video frame sequence is a suspected dummy is given.
The process of determining whether a target pedestrian corresponding to a video frame sequence is a suspected dummy may include:
and A1, calculating the cross-over ratio of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the region where the target pedestrian corresponding to the video frame sequence is located in each non-contrast frame, and obtaining a plurality of cross-over ratios.
It has been described that each video frame in the video frame sequence is ordered according to the sequence of shooting times, and the first video frame and the last video frame after the ordering are preferably contrast frames, and the other video frames are non-contrast frames.
If the video frame sequence contains n frames of video frames in total, the number of comparison frames is 2, and the number of non-comparison frames is n-2.
For a first comparison frame, namely a first video frame in the video frame sequence, calculating the cross-over ratio of the area of the target pedestrian corresponding to the video frame sequence in the first comparison frame to the area of each non-comparison frame, and obtaining n-2 cross-over ratios; similarly, for the second comparison frame, i.e. the last video frame in the video frame sequence, calculating the cross-over ratio of the region where the target pedestrian corresponding to the video frame sequence is located in the second comparison frame and the region where the target pedestrian is located in each non-comparison frame, and obtaining n-2 cross-over ratios.
That is, if the video frame sequence contains n frames of video frames in total, this step obtains 2n-4 cross ratios in total.
And A2, acquiring the number of the cross ratios which are larger than or equal to a preset first cross ratio threshold value from the plurality of cross ratios as a first number.
It should be noted that, the larger the first number is, the greater the possibility of characterizing the target row artifacts corresponding to the video frame sequence is.
For example, assuming that the first overlap ratio threshold is 0.5, the obtained plurality of overlap ratios are 0.2, 0.3, 0.4, 0.5, 0.6, and 0.7, respectively, the first number is 3.
The first cross ratio threshold may be determined according to practical situations, which is not specifically limited in the present application.
And A3, calculating the ratio of the first quantity to the second quantity.
Wherein the second number is the total number of calculated cross ratios.
As can be seen from the description of the above step A1, if the video frame sequence includes n frames of video frames, the second number is 2n-4.
And A4, if the ratio of the first quantity to the second quantity is larger than or equal to a preset cross ratio duty ratio threshold value, determining a target artificial suspected dummy corresponding to the video frame sequence.
It will be appreciated that the position of the dummy in the sequence of video frames is generally fixed, i.e. the position of the dummy in each video frame corresponding to the sequence of video frames is fixed, and thus each of the obtained plurality of merging ratios is larger, i.e. the first number is larger, and the ratio of the first number to the second number is relatively larger; the position of the real person in the video frame sequence may change, for example, the position of the real person in the first m frames of the video frame sequence is not moved, and the position of the last n-m (n > m) frames is moved, so that the obtained multiple merging ratios may be only partially merged and larger, and the ratio of the first quantity to the second quantity is relatively smaller. That is, the ratio of the first number to the second number of dummies is relatively large, and the ratio of the first number to the second number of dummies is relatively small.
Based on this, the embodiment of the present application may preset a cross-over ratio threshold, and if the ratio of the first number to the second number is greater than or equal to the preset cross-over ratio threshold, determine the target behavioral suspected dummy corresponding to the video frame sequence.
By the method, the video frame sequence of the corresponding target row artificial suspected dummy in the first video frame sequence set can be obtained.
The following describes "step S130 in the above embodiment, determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity between the region where the target pedestrian corresponding to the video frame sequence is located in each comparison frame and the region where the target pedestrian corresponding to the video frame sequence is located in each non-comparison frame".
According to the similarity between the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the region of the target pedestrian in each non-comparison frame, the process of determining whether the target pedestrian corresponding to the video frame sequence is a dummy may include:
and B1, calculating the similarity of the region of the target pedestrian corresponding to the video frame sequence in each contrast frame and the region of the target pedestrian in each non-contrast frame to obtain a plurality of similarities.
If the video frame sequence contains k frames of video frames in total, the number of comparison frames is 2, and the number of non-comparison frames is k-2. For a first comparison frame, such as the first video frame in the video frame sequence, calculating the similarity of the region of the target pedestrian corresponding to the video frame sequence in the first comparison frame and the region of each non-comparison frame, so as to obtain k-2 similarities; similarly, for a second comparison frame, such as the last video frame in the video frame sequence, calculating the similarity between the region of the target pedestrian corresponding to the video frame sequence in the second comparison frame and the region of the target pedestrian in each non-comparison frame, and obtaining k-2 similarities. That is, if the video frame sequence contains k frames of video frames in total, this step obtains 2k-4 similarities in total.
And B2, acquiring the number of the similarity which is larger than or equal to a preset first similarity threshold value in the plurality of the similarities as a third number.
For example, assuming that the first similarity threshold is 0.6, the obtained plurality of similarities are 0.2, 0.3, 0.4, 0.5, 0.6, and 0.7, respectively, the third number is 2.
It should be noted that, the larger the third number is, the greater the possibility that the target row corresponding to the video frame sequence is a dummy.
The first similarity threshold may be determined according to practical situations, and the application is not specifically limited.
And B3, calculating the ratio of the third quantity to the fourth quantity.
Wherein the fourth number is the total number of calculated similarities.
As can be seen from the description of the above step B1, if the video frame sequence includes k video frames in total, the fourth number is 2k-4.
And B4, if the ratio of the third quantity to the fourth quantity is larger than or equal to a preset first similarity ratio threshold value, determining a target artificial dummy corresponding to the video frame sequence.
Considering that the dummy does not normally have a variation in performance, each of the obtained plurality of similarities is larger, i.e., the third number is larger, then the ratio of the third number to the fourth number is relatively larger; and even if the true person does not move in the video frame sequence, the apparent change of the true person can occur, for example, the double arms of the true person in the previous p frames of the video frame sequence are positioned at the front chest, the double arms of the true person in the next k-p frames of the video frame sequence are lifted by the top of the head to form a lazy shape, and then the obtained multiple similarities can only have larger partial similarities, and the ratio of the third quantity to the fourth quantity is relatively smaller. That is, the ratio of the third number to the fourth number of dummies is relatively large, and the ratio of the third number to the fourth number of dummies is relatively small.
Based on this, the first similarity ratio threshold may be preset, and if the ratio of the third number to the fourth number is greater than or equal to the preset first similarity ratio threshold, the target artificial dummy corresponding to the video frame sequence is determined.
By the method provided by the application, the dummy in the target pedestrian corresponding to each video frame sequence in the first candidate dummy sequence set can be accurately identified.
In an alternative embodiment, the implementation process of the step B1 may include:
and C1, acquiring the characteristic vector of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the characteristic vector of the region where the target pedestrian is located in each non-contrast frame.
Optionally, the process of obtaining the feature vector of the area where the target pedestrian is located in a video frame may include: dividing the video frame into a plurality of image blocks with the same size; the feature vector of each image block is obtained respectively, and optionally, the feature vector of each image block can be an HOG (Histogram of Oriented Gradient, directional gradient histogram) feature vector; thirdly, the feature vectors of the image blocks corresponding to the region where the target pedestrian is located in the video frame are spliced, and the spliced vectors are used as the feature vectors of the region where the target pedestrian is located in the video frame.
For example, in determining the feature vector of the shadow portion of the region of a video frame where the target pedestrian is located, as shown in fig. 2, the video frame shown in fig. 2 may be divided into 64 image blocks with the same size, and in order to distinguish the 64 image blocks, an identifier may be assigned to the 64 image blocks, for example, the identifiers of the 64 image blocks are a1-a64. Since the region where the target pedestrian is located includes a2-a4, a10-a12, a18-a20, a26-a28 and a34-a36, the feature vectors of a2-a4, a10-a12, a18-a20, a26-a28 and a34-a36 can be obtained respectively, and then the feature vectors of the region where the target pedestrian is located in the video frame shown in fig. 2 are spliced by the feature vectors corresponding to a2-a4, a10-a12, a18-a20, a26-a28 and a34-a36 respectively.
Considering that the sizes of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame may be different from the sizes of the region where the target pedestrian is located in each non-contrast frame, the number of image blocks corresponding to the region where the target pedestrian is located in each contrast frame may be different from the number of image blocks corresponding to the region where the target pedestrian is located in each non-contrast frame, for this reason, the following strategy may be used to determine the feature vector of the region where the target pedestrian corresponding to a video frame sequence is located in each contrast frame and the feature vector of the region where the target pedestrian is located in each non-contrast frame:
Dividing each contrast frame and each non-contrast frame into a plurality of image blocks in the same dividing mode, respectively endowing marks for the plurality of image blocks of each contrast frame and each non-contrast frame, endowing the marks for the image blocks of each contrast frame and each non-contrast frame with the same rule, determining the common marks of the image blocks corresponding to the areas of the contrast frames and the non-contrast frames of the target pedestrians corresponding to the video frame sequence, taking the common marks as the target marks, acquiring the image blocks marked as the target marks from the plurality of image blocks of the video frame for any one of the contrast frames and the non-contrast frames, splicing the characteristic vectors of the target image blocks, and taking the spliced vectors as the characteristic vectors of the areas of the target pedestrians corresponding to the video frame sequence in the video frame, thereby obtaining the characteristic vectors of the areas of the target pedestrians corresponding to the video frame sequence in each contrast frame and the characteristic vectors of the areas of the non-contrast frames.
Illustratively, a video frame sequence includes two contrast frames and three non-contrast frames, wherein the image blocks corresponding to the region of the video frame sequence corresponding to the target pedestrian in the first contrast frame include image blocks identified as a2-a5, a10-a13, a18-a21, a26-a29, and a34-a37, the image blocks corresponding to the region of the video frame sequence corresponding to the target pedestrian in the second contrast frame include image blocks identified as a1-a5, a9-a13, a17-a21, a25-a29, and a33-a37, the image blocks corresponding to the region of the video frame sequence corresponding to the target pedestrian in the first non-contrast frame include image blocks identified as a2-a4, a10-a12, a18-a20, a26-a28, a34-a36, and a42-a44, the image blocks corresponding to the areas of the second non-contrast frame corresponding to the target pedestrian in the video frame sequence comprise the image blocks identified as a2-a5, a10-a13, a18-a21, a26-a29, a34-a37 and a42-a45, the image blocks corresponding to the areas of the third non-contrast frame corresponding to the target pedestrian in the video frame sequence comprise the image blocks identified as a1-a4, a9-a12, a17-a20, a25-a28 and a33-a36, and the image blocks corresponding to the target pedestrian in the video frame sequence are respectively identified as a2-a4, a10-a12, a18-a20, a26-a28 and a34-a36 in the plurality of image blocks of each contrast frame are respectively identified as a2-a4, a10-a12, a18-a20, the characteristic vectors of the image blocks a26-a28 and a34-a36 are spliced to obtain the characteristic vector of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame, and the characteristic vectors of the image blocks marked as a2-a4, a10-a12, a18-a20, a26-a28 and a34-a36 in the plurality of image blocks of each non-comparison frame are spliced to obtain the characteristic vector of the region of the target pedestrian corresponding to the video frame sequence in each non-comparison frame.
And C2, calculating the similarity of the feature vector of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the feature vector of the region of the target pedestrian in each non-comparison frame, and taking the similarity as the similarity of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the region of the target pedestrian in each non-comparison frame.
In this embodiment of the present application, the distance between the feature vector of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the feature vector of the region where the target pedestrian is located in each non-contrast frame may be calculated, and then the similarity may be determined based on the distance. Specifically, if the distance between the feature vector of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the feature vector of the region where the target pedestrian corresponding to the video frame sequence is located in each non-contrast frame is represented by d, the similarity between the feature vector of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the feature vector of the region where the target pedestrian corresponding to the video frame sequence is located in each non-contrast frame is 1-d.
In the foregoing embodiment, the determining whether the target pedestrian corresponding to each video frame sequence in the first candidate dummy sequence set is a dummy, and in an optional embodiment, if there is at least one target pedestrian corresponding to the video frame sequence in the first candidate dummy sequence set that is a dummy, the determining whether other target pedestrians in the video frame sequence set are dummy may include:
And D1, if at least one target pedestrian corresponding to the video frame sequence exists in the first candidate dummy sequence set to be a dummy, acquiring a video frame sequence with the frame number smaller than the preset frame number from the video frame sequence set to form a second video frame sequence set.
The video frame sequence set comprises a video frame sequence corresponding to a target pedestrian 1, a video frame sequence corresponding to a target pedestrian 2 and a video frame sequence corresponding to a target pedestrian 3, wherein the video frame sequence corresponding to the target pedestrian 1 is 10 frames in total, the video frame sequence corresponding to the target pedestrian 2 is 5 frames in total, and the video frame sequence corresponding to the target pedestrian 3 is 4 frames in total. If the preset frame number is 6 frames, the video frame sequence corresponding to the target pedestrian 2 and the video frame sequence corresponding to the target pedestrian 3 form a second video frame sequence set.
And D2, acquiring a video frame sequence of the corresponding target line artificial suspected dummy from the second video frame sequence set to form a second candidate dummy sequence set.
Optionally, a video frame sequence of the corresponding target pedestrian artificial suspected dummy may be determined according to an intersection ratio of an area where the target pedestrian corresponding to each video frame sequence is located in each comparison frame and an area where the target pedestrian corresponding to each non-comparison frame is located in the second video frame sequence set, and the determined video frame sequences form the second candidate dummy sequence set.
Here, the method for determining whether the target pedestrian is a suspected dummy is similar to the method for determining whether the target pedestrian is a suspected dummy in step S120, and the detailed description will be omitted herein.
And D3, combining the video frame sequences of the corresponding target row artificial reality in the first candidate dummy sequence set and the video frame sequences in the second candidate dummy sequence set into a third candidate dummy sequence set.
According to the method and the device for determining the target pedestrian, whether the target pedestrian corresponding to each video frame sequence in the third candidate dummy sequence set is a dummy or not can be determined according to the video frame sequences, in the first candidate dummy sequence set, of which the corresponding target pedestrian is determined to be the dummy.
For example, if the video frame sequence set includes a video frame sequence corresponding to the target pedestrian 1, a video frame sequence corresponding to the target pedestrian 2, and a video frame sequence corresponding to the target pedestrian 3, it is assumed that the video frame sequence corresponding to the target pedestrian 1 and the video frame sequence corresponding to the target pedestrian 3 form a first candidate dummy sequence set, and the video frame sequence corresponding to the target pedestrian 2 forms a second candidate dummy sequence set. If the target pedestrian 1 is determined to be a dummy and the target pedestrian 2 is determined to be a true person, the video frame sequence corresponding to the target pedestrian 2 and the video frame sequence corresponding to the target pedestrian 3 may be combined into a third candidate dummy sequence set. Further, the embodiment of the present application can determine whether the target pedestrian 2 and the target pedestrian 3 are dummy persons according to the target pedestrian 1.
And D4, for each video frame sequence in the third candidate dummy sequence set, determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the intersection ratio of the average area corresponding to the video frame sequence and the average area corresponding to the target video frame sequence.
The average area corresponding to any video frame sequence is the average value of the area of the target pedestrian corresponding to the video frame sequence in each video frame where the target pedestrian is located, and the target video frame sequence is a video frame sequence of which the corresponding target pedestrian is a dummy in the first candidate dummy sequence set.
Specifically, for each video frame sequence in the third candidate dummy sequence set, if the intersection ratio of the average area corresponding to the video frame sequence and the average area corresponding to the target video frame sequence is greater than a preset second intersection ratio threshold, determining the target artificial dummy corresponding to the video frame sequence.
The second cross ratio threshold may be determined according to practical situations, which is not specifically limited in the present application.
Here, according to the intersection ratio of the average area corresponding to the video frame sequence and the average area corresponding to the target video frame sequence, the basis for determining whether the target pedestrian corresponding to the video frame sequence is a dummy is as follows: and if the average area of the target pedestrian corresponding to the video frame sequence is very close to the average area of the dummy, the possibility of the target artificial dummy corresponding to the video frame sequence is higher.
Optionally, in this step, the method for calculating the average area corresponding to a video frame sequence may be: and determining an average area corresponding to the video frame sequence according to the detection frames in each video frame of the target pedestrian corresponding to the video frame sequence. Specifically, the coordinates of the detection frames of the target pedestrians corresponding to the video frame sequence in the video frames where the target pedestrians are located are determined, then the average value of the coordinates of the detection frames in the corresponding positions of the video frames is calculated, and the area surrounded by the 4 average values corresponding to the target pedestrians is used as the average area corresponding to the video frame sequence.
For example, referring to fig. 3a-3c, a schematic diagram of a video frame sequence containing 3 frames of video frames together is shown. Then the average of A1, B1 and C1 shown in the upper left corner can be calculated as the first average; calculating the average value of A2, B2 and C2 shown in the upper right corner as a second average value; calculating the average value of A3, B3 and C3 shown in the lower left corner as a third average value; calculating the average value of A4, B4 and C4 shown in the lower right corner as a fourth average value; and the area surrounded by the first average value, the second average value, the third average value and the fourth average value is used as the average area corresponding to the video frame sequence shown in fig. 3a-3 c.
In another embodiment of the present application, a video frame sequence of a corresponding target artificial real person may be further obtained from the third candidate dummy sequence set to form a fourth candidate dummy sequence set, and then each target pedestrian in the fourth candidate dummy sequence set is detected again to further determine whether the target pedestrian is a dummy, and then, for each video frame sequence in the fourth candidate dummy sequence set, the method may include:
and E1, calculating the average value of the area of the target pedestrian corresponding to the video frame sequence in the video frame sequence, and taking the average value as a target average area.
The method for calculating the target average area in this step may be similar to the method for calculating the average area corresponding to the video frame sequence in the above-mentioned step D4, and the detailed description thereof will not be repeated here.
And E2, acquiring a background video frame closest to the shooting time of the first video frame in the video frame sequence from the background video frame sequence as a target background video frame.
Wherein the sequence of background video frames may be sampled from the specified video.
Alternatively, multi-frame images may be randomly sampled from the specified video as a background video frame sequence in which the video frames may be ordered according to the order of the shooting times.
By way of example, assume that 5 video frames are randomly sampled from a specified video, and the photographing times of these 5 video frames are 5 hours 20 minutes, 5 hours 23 minutes, 5 hours 40 minutes, 6 hours 2 minutes, and 6 hours 30 minutes, respectively. And the shooting time of the first video frame in the video frame sequence is 5 hours and 41 minutes, the image corresponding to 5 hours and 40 minutes can be used as the target background video frame. Here, the first video frame in the video frame sequence is a frame in the designated video in which the target pedestrian corresponding to the video frame sequence appears for the first time.
And E3, determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity between the target area in each non-target background video frame and the target area in the target background video frame.
The target area in any background video frame is the area in the background video frame at the position indicated by the target average area.
Optionally, the method for determining whether the target pedestrian corresponding to the video frame sequence is a dummy in this step may include: calculating the similarity between the target area in each non-target background video frame and the target area in the target background video frame to obtain a plurality of similarities; obtaining the number of the similarity larger than or equal to a preset second similarity threshold value from the plurality of the similarity as a fifth number; calculating a ratio of a fifth number to a sixth number, wherein the sixth number is a total number of calculated similarities; and if the ratio of the fifth number to the sixth number is greater than or equal to a preset second similarity duty ratio threshold, determining a target artificial dummy corresponding to the video frame sequence.
In this embodiment of the present application, each target pedestrian in the fourth candidate dummy sequence set is detected again, so as to further determine whether the target pedestrian is a dummy.
It should be noted that, in an alternative implementation manner, after determining whether the target pedestrian corresponding to each video frame sequence in the first candidate dummy sequence set is a dummy by adopting steps S100 to S130, the video frame sequences of the corresponding target behavioral real persons in the first candidate dummy sequence set may also be formed into a fifth candidate dummy sequence set; for each video frame sequence in the fifth candidate dummy sequence set, determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not by adopting the mode of the steps E1 to E3. Based on this, the third candidate dummy sequence set in the step D3 just needs to include the video frame sequences in the second candidate dummy sequence set.
The embodiment of the application further provides a dummy detection device, and the dummy detection device provided by the embodiment of the application is described below, and the dummy detection device described below and the dummy detection method described above can be referred to correspondingly.
Referring to fig. 4, a schematic structural diagram of a dummy detection apparatus provided in an embodiment of the present application is shown, and as shown in fig. 4, the dummy detection apparatus may include: a video frame sequence set acquisition module 41, a first video frame sequence set acquisition module 42, a first candidate dummy sequence set determination module 43, and a first dummy judgment module 44.
The video frame sequence set acquisition module 41 is configured to acquire a video frame sequence set.
The video frame sequence set comprises at least one video frame sequence corresponding to a target pedestrian, wherein the video frame sequence corresponding to the target pedestrian is a sequence formed by video frames of the target pedestrian detected from the appointed video.
The first video frame sequence set obtaining module 42 is configured to obtain a video frame sequence with a frame number greater than or equal to a preset frame number from the video frame sequence set, to form a first video frame sequence set.
The first candidate dummy sequence set determining module 43 is configured to determine a video frame sequence of a corresponding target row of artificial suspected dummy according to an intersection ratio of an area where each video frame sequence corresponds to each reference frame and an area where each non-reference frame corresponds to each target pedestrian in the first video frame sequence set, and form the first candidate dummy sequence set from the determined video frame sequences.
Wherein the reference frame in a video frame sequence is at least one video frame in the video frame sequence, optionally, the reference frame in a video frame sequence may be two video frames in the video frame sequence, preferably, the two video frames may be the first video frame and the last video frame in the video frame sequence.
The first dummy judgment module 44 is configured to determine, for each video frame sequence in the first candidate dummy sequence set, whether the target pedestrian corresponding to the video frame sequence is a dummy according to the similarity between the region where the target pedestrian corresponding to the video frame sequence is located in each comparison frame and the region where the target pedestrian corresponding to each non-comparison frame is located.
According to the dummy detection device, after the video frame sequence sets formed by the video frame sequences corresponding to the target pedestrians are obtained, the video frame sequences with the frame numbers larger than or equal to the preset frame number are obtained from the video frame sequence sets to form the first video frame sequence set, and the fact that the position of a dummy in a specified video is not moved is considered, so that in the first video frame sequence set, according to the intersection ratio of the area where each target pedestrian corresponding to each video frame sequence is located in each contrast frame and the area where each non-contrast frame is located, the video frame sequence corresponding to the target pedestrian is determined, which is a suspected dummy, the determined video frame sequences form the first candidate dummy sequence set, and further, the fact that apparent change of the dummy in the specified video is not usually generated is considered in the first candidate dummy sequence set is considered, and whether the target pedestrian corresponding to the video frame sequence is a dummy is determined according to the similarity of the area where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the area where the non-contrast frame is located. According to the dummy detection device, whether the target pedestrian is a dummy can be determined according to the video frame sequence corresponding to the target pedestrian.
In one possible implementation manner, the first candidate dummy sequence set determining module may include, for each video frame sequence in the first video frame sequence set: the device comprises an cross ratio acquisition unit, a first quantity determination unit, a first ratio calculation unit and a suspected dummy determination unit.
And the cross-over ratio acquisition unit is used for calculating the cross-over ratio of the area of the target pedestrian corresponding to the video frame sequence in each comparison frame and the area of the target pedestrian in each non-comparison frame to obtain a plurality of cross-over ratios.
The first number determining unit is used for obtaining the number of the cross ratios which are larger than or equal to a preset first cross ratio threshold value from the plurality of cross ratios as a first number.
And the first ratio calculating unit is used for calculating the ratio of the first quantity to the second quantity, wherein the second quantity is the total quantity of the calculated cross ratios.
The suspected dummy determining unit is configured to determine a target behavior suspected dummy corresponding to the video frame sequence if the ratio of the first number to the second number is greater than or equal to a preset cross ratio duty ratio threshold.
In one possible implementation manner, the first dummy judgment module may include: a similarity acquisition unit, a third number acquisition unit, a second ratio calculation unit, and a dummy determination unit.
And the similarity acquisition unit is used for calculating the similarity of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the region where the target pedestrian corresponding to the video frame sequence is located in each non-contrast frame, so as to obtain a plurality of similarities.
A third number obtaining unit, configured to obtain, as a third number, a number of similarities greater than or equal to a preset similarity threshold, from the plurality of similarities.
And the second ratio calculating unit is used for calculating the ratio of the third quantity to the fourth quantity, wherein the fourth quantity is the total quantity of the calculated similarities.
And the dummy determining unit is used for determining a target artificial dummy corresponding to the video frame sequence if the ratio of the third number to the fourth number is greater than or equal to a preset similarity ratio threshold value.
In one possible implementation manner, the similarity obtaining unit may include: the feature vector acquisition unit and the feature vector similarity calculation unit.
The characteristic vector acquisition unit is used for acquiring the characteristic vector of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the characteristic vector of the region where the target pedestrian corresponding to the video frame sequence is located in each non-contrast frame.
And the feature vector similarity calculation unit is used for calculating the similarity of the feature vector of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the feature vector of the region where the target pedestrian corresponding to the video frame sequence is located in each non-contrast frame, and the similarity is used as the similarity of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the region where the target pedestrian corresponding to the video frame sequence is located in each non-contrast frame.
In one possible implementation manner, the dummy detection apparatus provided in the embodiment of the present application may further include: the device comprises a second video frame sequence set acquisition module, a second candidate dummy sequence set acquisition module, a third candidate dummy sequence set acquisition module and a second dummy judgment module.
And the second video frame sequence set acquisition module is used for acquiring a video frame sequence with the frame number smaller than the preset frame number from the video frame sequence set to form a second video frame sequence set if at least one target pedestrian corresponding to the video frame sequence exists in the first candidate dummy sequence set as a dummy.
The second candidate dummy sequence set obtaining module is used for obtaining the video frame sequences of the corresponding target row artificial suspected dummy from the second video frame sequence set to form a second candidate dummy sequence set.
The third candidate dummy sequence set obtaining module is configured to combine the video frame sequence of the corresponding target row of artificial reality in the first candidate dummy sequence set with the video frame sequence in the second candidate dummy sequence set to form a third candidate dummy sequence set.
And the second dummy judgment module is used for determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the intersection ratio of the average area corresponding to the video frame sequence and the average area corresponding to the target video frame sequence for each video frame sequence in the third candidate dummy sequence set.
The average area corresponding to any video frame sequence is the average value of the area of the target pedestrian corresponding to the video frame sequence in each video frame where the target pedestrian is located, and the target video frame sequence is a video frame sequence of which the corresponding target pedestrian is a dummy in the first candidate dummy sequence set.
In one possible implementation manner, the dummy detection apparatus provided in the embodiment of the present application may further include:
the fourth candidate dummy sequence set obtaining module is used for obtaining the video frame sequence of the corresponding target artificial true person from the third candidate dummy sequence set to form a fourth candidate dummy sequence set.
A third dummy judgment module, configured to, for each video frame sequence in the fourth candidate dummy sequence set: calculating the average value of the area of the target pedestrian corresponding to the video frame sequence in the video frame sequence as a target average area; obtaining a background video frame closest to the shooting time of a first video frame in a video frame sequence from the background video frame sequence as a target background video frame, wherein the background video frame sequence is obtained by sampling the appointed video; and determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity between the target area in each non-target background video frame and the target area in the target background video frame, wherein the target area in any background video frame is the area in the background video frame at the position indicated by the target average area.
The embodiment of the application also provides a dummy detection device. Alternatively, fig. 5 shows a block diagram of a hardware structure of the dummy detection apparatus, and referring to fig. 5, the hardware structure of the dummy detection apparatus may include: at least one processor 501, at least one communication interface 502, at least one memory 503, and at least one communication bus 504;
in the embodiment of the present application, the number of the processor 501, the communication interface 502, the memory 503, and the communication bus 504 is at least one, and the processor 501, the communication interface 502, and the memory 503 complete communication with each other through the communication bus 504;
the processor 501 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention, etc.;
the memory 503 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory), etc., such as at least one magnetic disk memory;
wherein the memory 503 stores a program, the processor 501 may call the program stored in the memory 503, the program being for:
acquiring a video frame sequence set, wherein the video frame sequence set comprises at least one video frame sequence corresponding to a target pedestrian, and the video frame sequence corresponding to the target pedestrian is a sequence formed by video frames of the target pedestrian detected from a designated video;
Acquiring a video frame sequence with the frame number greater than or equal to a preset frame number from a video frame sequence set to form a first video frame sequence set;
determining a video frame sequence of a corresponding target row artificial suspected dummy according to the intersection ratio of the region of each video frame sequence in each contrast frame and the region of each non-contrast frame in the first video frame sequence set, and forming a first candidate dummy sequence set by the determined video frame sequences, wherein the contrast frame in one video frame sequence is at least one video frame in the video frame sequence, and other video frames in the video frame sequences are non-contrast frames;
and for each video frame sequence in the first candidate dummy sequence set, determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the region of the target pedestrian in each non-comparison frame.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
The embodiment of the application also provides a readable storage medium, on which a computer program is stored, which when executed by a processor, implements the above-mentioned dummy detection method.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A dummy detection method, comprising:
acquiring a video frame sequence set, wherein the video frame sequence set comprises at least one video frame sequence corresponding to a target pedestrian, and the video frame sequence corresponding to the target pedestrian is a sequence formed by video frames of the target pedestrian detected from a specified video;
acquiring a video frame sequence with the frame number greater than or equal to a preset frame number from the video frame sequence set to form a first video frame sequence set;
determining a video frame sequence of a corresponding target pedestrian artificial suspected dummy according to the intersection ratio of the region of each video frame sequence in each contrast frame and the region of each non-contrast frame in the first video frame sequence set, and forming a first candidate dummy sequence set by the determined video frame sequences, wherein the contrast frame in one video frame sequence is at least one video frame in the video frame sequence, and other video frames in the video frame sequence are non-contrast frames;
and for each video frame sequence in the first candidate dummy sequence set, determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the region of the target pedestrian in each non-comparison frame.
2. The method according to claim 1, wherein determining the video frame sequence of the corresponding target pedestrian as the suspected dummy according to the cross-point ratio of the region of each reference frame to the region of each non-reference frame in the first video frame sequence set includes:
for each video frame sequence in the first set of video frame sequences:
calculating the cross-over ratio of the region where the target pedestrian corresponding to the video frame sequence is located in each comparison frame and the region where the target pedestrian corresponding to the video frame sequence is located in each non-comparison frame, and obtaining a plurality of cross-over ratios;
acquiring the number of the cross ratios which are larger than or equal to a preset first cross ratio threshold value from the plurality of cross ratios as a first number;
calculating a ratio of the first number to a second number, wherein the second number is a total number of calculated cross ratios;
if the ratio of the first quantity to the second quantity is larger than or equal to a preset cross ratio duty ratio threshold, determining a target artificial suspected dummy corresponding to the video frame sequence;
and obtaining a video frame sequence of the corresponding target row artificial suspected dummy in the first video frame sequence set.
3. The method for detecting a dummy according to claim 1, wherein determining whether the target pedestrian corresponding to the video frame sequence is a dummy according to the similarity between the region of the target pedestrian corresponding to the video frame sequence in each of the comparison frames and the region of the target pedestrian in each of the non-comparison frames comprises:
calculating the similarity of the region where the target pedestrian corresponding to the video frame sequence is located in each comparison frame and the region where the target pedestrian corresponding to the video frame sequence is located in each non-comparison frame, and obtaining a plurality of similarities;
obtaining the number of the similarity which is larger than or equal to a preset first similarity threshold value from the plurality of the similarity as a third number;
calculating a ratio of the third number to a fourth number, wherein the fourth number is a total number of calculated similarities;
and if the ratio of the third quantity to the fourth quantity is larger than or equal to a preset first similarity ratio threshold value, determining a target artificial dummy corresponding to the video frame sequence.
4. A method of detecting a dummy according to claim 3, wherein the calculating the similarity between the region of the target pedestrian corresponding to the video frame sequence in each of the comparison frames and the region of the target pedestrian in each of the non-comparison frames comprises:
Acquiring the feature vector of the region where the target pedestrian corresponding to the video frame sequence is located in each contrast frame and the feature vector of the region where the target pedestrian is located in each non-contrast frame;
and calculating the similarity of the feature vector of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the feature vector of the region of the target pedestrian in each non-comparison frame as the similarity of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the region of the target pedestrian in each non-comparison frame.
5. The method according to any one of claims 1 to 4, characterized by further comprising:
if at least one target pedestrian corresponding to the video frame sequence exists in the first candidate dummy sequence set to be a dummy, acquiring a video frame sequence with the frame number smaller than the preset frame number from the video frame sequence set to form a second video frame sequence set;
obtaining a video frame sequence of a corresponding target line artificial suspected dummy from the second video frame sequence set to form a second candidate dummy sequence set;
the video frame sequences of the corresponding target row artificial reality in the first candidate dummy sequence set and the video frame sequences in the second candidate dummy sequence set form a third candidate dummy sequence set;
For each video frame sequence in the third candidate dummy sequence set, determining whether a target pedestrian corresponding to the video frame sequence is a dummy or not according to the intersection ratio of the average area corresponding to the video frame sequence and the average area corresponding to the target video frame sequence;
the average area corresponding to any video frame sequence is an average value of areas of target pedestrians corresponding to the video frame sequence in each video frame where the target pedestrians are located, and the target video frame sequence is a video frame sequence of which the corresponding target pedestrians are dummy persons in the first candidate dummy sequence set.
6. The method according to any one of claims 5, further comprising:
obtaining a video frame sequence of a corresponding target row artificial true person from the third candidate dummy sequence set to form a fourth candidate dummy sequence set;
for each video frame sequence in the fourth set of candidate dummy sequences:
calculating the average value of the area of the target pedestrian corresponding to the video frame sequence in the video frame sequence as a target average area;
obtaining a background video frame closest to the shooting time of a first video frame in a video frame sequence from the background video frame sequence as a target background video frame, wherein the background video frame sequence is obtained by sampling the appointed video;
And determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity between the target area in each non-target background video frame and the target area in the target background video frame, wherein the target area in any background video frame is the area in the background video frame at the position indicated by the target average area.
7. The method according to any one of claims 1 to 4, characterized by further comprising:
a fifth candidate dummy sequence set is formed by the video frame sequences of the corresponding target row artificial reality in the first candidate dummy sequence set;
for each video frame sequence in the fifth set of candidate dummy sequences:
calculating the average value of the area of the target pedestrian corresponding to the video frame sequence in the video frame sequence as a target average area;
obtaining a background video frame closest to the shooting time of a first video frame in a video frame sequence from the background video frame sequence as a target background video frame, wherein the background video frame sequence is obtained by sampling the appointed video;
and determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity between the target area in each non-target background video frame and the target area in the target background video frame, wherein the target area in any background video frame is the area in the background video frame at the position indicated by the target average area.
8. A dummy detection apparatus, comprising:
the system comprises a video frame sequence set acquisition module, a video frame sequence detection module and a video frame sequence detection module, wherein the video frame sequence set is used for acquiring a video frame sequence set, the video frame sequence set comprises at least one video frame sequence corresponding to a target pedestrian, and the video frame sequence corresponding to the target pedestrian is a sequence formed by video frames of the target pedestrian detected from a specified video;
the first video frame sequence set acquisition module is used for acquiring video frame sequences with the frame number being greater than or equal to a preset frame number from the video frame sequence set to form a first video frame sequence set;
the first candidate dummy sequence set determining module is used for determining a video frame sequence of a corresponding target row artificial suspected dummy according to the cross-over ratio of the region where each video frame sequence corresponds to each contrast frame to the region where each non-contrast frame corresponds to in the first video frame sequence set, and the determined video frame sequences form a first candidate dummy sequence set, wherein the contrast frame in one video frame sequence is at least one video frame in the video frame sequence, and other video frames in the video frame sequence are non-contrast frames;
The first dummy judgment module is used for determining whether the target pedestrian corresponding to each video frame sequence in the first candidate dummy sequence set is a dummy or not according to the similarity of the region of the target pedestrian corresponding to the video frame sequence in each comparison frame and the region of the target pedestrian in each non-comparison frame.
9. The dummy detection apparatus according to claim 8, further comprising:
the second video frame sequence set acquisition module is used for acquiring a video frame sequence with the frame number smaller than the preset frame number from the video frame sequence set to form a second video frame sequence set if at least one target pedestrian corresponding to the video frame sequence exists in the first candidate dummy sequence set as a dummy;
the second candidate dummy sequence set acquisition module is used for acquiring video frame sequences of corresponding target lines of artificial suspected dummy from the second video frame sequence set to form a second candidate dummy sequence set;
the third candidate dummy sequence set acquisition module is used for forming a third candidate dummy sequence set from the video frame sequences of the corresponding target row artificial reality in the first candidate dummy sequence set and the video frame sequences in the second candidate dummy sequence set;
The second dummy judgment module is used for determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the intersection ratio of the average area corresponding to the video frame sequence and the average area corresponding to the target video frame sequence for each video frame sequence in the third candidate dummy sequence set;
the average area corresponding to any video frame sequence is an average value of areas of target pedestrians corresponding to the video frame sequence in each video frame where the target pedestrians are located, and the target video frame sequence is a video frame sequence of which the corresponding target pedestrians are dummy persons in the first candidate dummy sequence set.
10. The dummy detection apparatus according to claim 9, further comprising:
the fourth candidate dummy sequence set acquisition module is used for acquiring a video frame sequence of a corresponding target row artificial true person from the third candidate dummy sequence set to form a fourth candidate dummy sequence set;
a third dummy judgment module, configured to, for each video frame sequence in the fourth candidate dummy sequence set: calculating the average value of the area of the target pedestrian corresponding to the video frame sequence in the video frame sequence as a target average area; obtaining a background video frame closest to the shooting time of a first video frame in a video frame sequence from the background video frame sequence as a target background video frame, wherein the background video frame sequence is obtained by sampling the appointed video; and determining whether the target pedestrian corresponding to the video frame sequence is a dummy or not according to the similarity between the target area in each non-target background video frame and the target area in the target background video frame, wherein the target area in any background video frame is the area in the background video frame at the position indicated by the target average area.
CN202010320502.8A 2020-04-22 2020-04-22 Dummy detection method and device Active CN111507286B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010320502.8A CN111507286B (en) 2020-04-22 2020-04-22 Dummy detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010320502.8A CN111507286B (en) 2020-04-22 2020-04-22 Dummy detection method and device

Publications (2)

Publication Number Publication Date
CN111507286A CN111507286A (en) 2020-08-07
CN111507286B true CN111507286B (en) 2023-05-02

Family

ID=71864854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010320502.8A Active CN111507286B (en) 2020-04-22 2020-04-22 Dummy detection method and device

Country Status (1)

Country Link
CN (1) CN111507286B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201113818A (en) * 2009-10-05 2011-04-16 Hung-Shiun Tang Anti-fake human head photo image pattern with human face features coded on its border, and its producing and validation process units
CN106599880A (en) * 2016-12-29 2017-04-26 湖南强视信息科技有限公司 Discrimination method of the same person facing examination without monitor
CN108038469A (en) * 2017-12-27 2018-05-15 百度在线网络技术(北京)有限公司 Method and apparatus for detecting human body
CN108124486A (en) * 2017-12-28 2018-06-05 深圳前海达闼云端智能科技有限公司 Face living body detection method based on cloud, electronic device and program product
CN110097568A (en) * 2019-05-13 2019-08-06 中国石油大学(华东) A kind of the video object detection and dividing method based on the double branching networks of space-time
GB201910720D0 (en) * 2019-07-26 2019-09-11 Tomtom Global Content Bv Generative adversarial Networks for image segmentation
CN110443192A (en) * 2019-08-01 2019-11-12 中国科学院重庆绿色智能技术研究院 A kind of non-interactive type human face in-vivo detection method and system based on binocular image
WO2019217281A1 (en) * 2018-05-09 2019-11-14 Figure Eight Technologies, Inc. Video object tracking
CN110532985A (en) * 2019-09-02 2019-12-03 北京迈格威科技有限公司 Object detection method, apparatus and system
CN110929635A (en) * 2019-11-20 2020-03-27 华南理工大学 False face video detection method and system based on face cross-over ratio under trust mechanism

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201113818A (en) * 2009-10-05 2011-04-16 Hung-Shiun Tang Anti-fake human head photo image pattern with human face features coded on its border, and its producing and validation process units
CN106599880A (en) * 2016-12-29 2017-04-26 湖南强视信息科技有限公司 Discrimination method of the same person facing examination without monitor
CN108038469A (en) * 2017-12-27 2018-05-15 百度在线网络技术(北京)有限公司 Method and apparatus for detecting human body
CN108124486A (en) * 2017-12-28 2018-06-05 深圳前海达闼云端智能科技有限公司 Face living body detection method based on cloud, electronic device and program product
WO2019217281A1 (en) * 2018-05-09 2019-11-14 Figure Eight Technologies, Inc. Video object tracking
CN110097568A (en) * 2019-05-13 2019-08-06 中国石油大学(华东) A kind of the video object detection and dividing method based on the double branching networks of space-time
GB201910720D0 (en) * 2019-07-26 2019-09-11 Tomtom Global Content Bv Generative adversarial Networks for image segmentation
CN110443192A (en) * 2019-08-01 2019-11-12 中国科学院重庆绿色智能技术研究院 A kind of non-interactive type human face in-vivo detection method and system based on binocular image
CN110532985A (en) * 2019-09-02 2019-12-03 北京迈格威科技有限公司 Object detection method, apparatus and system
CN110929635A (en) * 2019-11-20 2020-03-27 华南理工大学 False face video detection method and system based on face cross-over ratio under trust mechanism

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵伟."基于极短视频的人脸活体检测方法".《中国优秀硕士学位论文全文数据库 信息科技辑》.2019,(第08期),全文. *

Also Published As

Publication number Publication date
CN111507286A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
US10872262B2 (en) Information processing apparatus and information processing method for detecting position of object
US11087169B2 (en) Image processing apparatus that identifies object and method therefor
JP6494253B2 (en) Object detection apparatus, object detection method, image recognition apparatus, and computer program
CN108364310A (en) Solid matching method and equipment, image processing equipment and its training method
CN106960449B (en) Heterogeneous registration method based on multi-feature constraint
CN107944403B (en) Method and device for detecting pedestrian attribute in image
JP2011134114A (en) Pattern recognition method and pattern recognition apparatus
CN109033955B (en) Face tracking method and system
US10657625B2 (en) Image processing device, an image processing method, and computer-readable recording medium
CN107221005B (en) Object detection method and device
WO2022022695A1 (en) Image recognition method and apparatus
US11741615B2 (en) Map segmentation method and device, motion estimation method, and device terminal
WO2021084972A1 (en) Object tracking device and object tracking method
CN109784230A (en) A kind of facial video image quality optimization method, system and equipment
US11189053B2 (en) Information processing apparatus, method of controlling information processing apparatus, and non-transitory computer-readable storage medium
WO2014205787A1 (en) Vehicle detecting method based on hybrid image template
KR100691855B1 (en) Apparatus for extracting features from image information
CN107945119B (en) Method for estimating correlated noise in image based on Bayer pattern
CN111901499B (en) Method and equipment for calculating actual pixel distance in video image
CN111507286B (en) Dummy detection method and device
CN111753775A (en) Fish growth assessment method, device, equipment and storage medium
CN113762231B (en) End-to-end multi-pedestrian posture tracking method and device and electronic equipment
CN115841602A (en) Construction method and device of three-dimensional attitude estimation data set based on multiple visual angles
CN116051736A (en) Three-dimensional reconstruction method, device, edge equipment and storage medium
WO2019058487A1 (en) Three-dimensional reconstructed image processing device, three-dimensional reconstructed image processing method, and computer-readable storage medium having three-dimensional reconstructed image processing program stored thereon

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant