Target detection method and system

By acquiring camera video image sequences and determining the static state of target objects in the target detection method, and using lightweight convolutional neural networks and superpixel segmentation, the problem of inaccurate target recognition during dynamic processes is solved, thereby improving the processing efficiency and accuracy of the monitoring system.

CN115909117BActive Publication Date: 2026-02-17CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111150435.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-29
Publication Date
2026-02-17
Estimated Expiration
2041-09-29

AI Technical Summary

Technical Problem

In existing target detection methods, the target objects in video images are inaccurate to identify due to their dynamic nature. The complex network structure increases the computational load, reduces processing efficiency, and makes it difficult to integrate into existing monitoring systems.

Method used

By acquiring video image sequences from cameras, determining whether a target object has entered the monitored area and confirming its static state, a lightweight linear transform is used to fuse a convolutional neural network for target detection. This is combined with superpixel segmentation and feature matching to improve detection accuracy.

Benefits of technology

It effectively solves the problems of blurred and incomplete images caused by the target object in motion, improves the accuracy of target recognition, and reduces computational complexity, making it suitable for existing monitoring systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115909117B_ABST
    Figure CN115909117B_ABST
Patent Text Reader

Abstract

The application provides a target detection method and system, which comprises the following steps: acquiring a video image sequence captured by a camera; judging whether a target object starts to enter a monitoring area of the camera according to the video image; after determining that the target object starts to enter the monitoring area, acquiring at least three continuous first video images from the video image sequence, and determining a change rate of edge pixels of each two adjacent first video images, if the change rate meets a preset change rate interval, determining that the target object has entered the monitoring area completely; after determining that the target object has entered the monitoring area completely, acquiring at least three continuous second video images from the video image sequence, and determining a first gray difference image of each two adjacent second video images, judging whether the target object is static according to the first gray difference image; determining a to-be-detected image according to the video image in which the target object is static; and performing target detection on the to-be-detected image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The embodiment of the present application relates to the technical field of artificial intelligence, in particular to a target detection method and system. BACKGROUND

[0002] The existing specific target detection method through a monitoring camera system is to input all frames or frame-extracted frames of a video stream processed by a monitoring camera into an AI (artificial intelligence) model based on deep learning for processing and outputting results.

[0003] Target objects in a video image are in a dynamic process, so that the target objects in the acquired video image are not complete, are occluded, are overlapped and the like, thereby affecting a target recognition result, in the prior art, deep-level feature information in a video image is often extracted through a complex network structure to improve accuracy, a complex model brings greater calculation amount, a large amount of redundant calculation is caused, processing efficiency is reduced, and it is not conducive to integrating a target detection system into an existing monitoring system. SUMMARY

[0004] The embodiment of the present application provides a target detection method and system, which are used for solving the problem that target objects in a video image in an existing target detection process are in a dynamic process and cause inaccurate recognition.

[0005] In order to solve the above technical problem, the present application is implemented as follows:

[0006] In a first aspect, the embodiment of the present application provides a target detection method, comprising:

[0007] acquiring a video image sequence photographed by a camera;

[0008] judging whether a target object starts to enter a monitoring area of the camera according to the video image;

[0009] when it is judged that the target object starts to enter the monitoring area, acquiring at least three continuous first video images from the video image sequence, and determining a change rate of edge pixels of each two adjacent first video images, if the change rate meets a preset change rate interval, judging that the target object has entered the monitoring area completely;

[0010] when it is judged that the target object has entered the monitoring area completely, acquiring at least three continuous second video images from the video image sequence, and determining a first gray difference image of each two adjacent second video images, judging whether the target object is in a static state according to the first gray difference image;

[0011] determining a to-be-detected image according to the video image in which the target object is in the static state;

[0012] perform target detection on the image to be detected.

[0013] Optionally, determining whether a target object starts to enter the monitoring area of the camera according to the video image comprises:

[0014] calculating a second gray difference image of the video image and a reference image, the reference image being an image of a background in the monitoring area of the camera;

[0015] calculating a contour area of the target object in the second gray difference image;

[0016] if the contour area of the target object is greater than or equal to a first set threshold, determining that the target object starts to enter the monitoring area of the camera.

[0017] Optionally, determining whether the target object is static according to the first gray difference image comprises:

[0018] performing an AND operation on at least two first gray difference images corresponding to at least three continuous second video images to obtain a target difference image;

[0019] calculating an area of a contour in the target gray difference image;

[0020] if the area of the contour in the target gray difference image is less than or equal to a second set threshold, determining that the target object is static.

[0021] Optionally, the following formula is used to perform the AND operation on the at least two first gray difference images corresponding to the at least three continuous second video images:

[0022] I n ′(x,y) = |f n (x,y) - f n-1 (x,y) |∩|f n+1 (x,y) - f n (x,y) |

[0023] wherein I’ n (x,y) is the first gray difference image, f n (x,y), f n-1 (x,y) and f n+1 (x,y) are gray data of the n, n-1 and n+1 frames of the second video images respectively.

[0024] Optionally, the image to be detected is determined according to the video image in which the target object is static.

[0025] acquiring whether a preset attribute value of the video image in which the target object is static meets a preset condition, the preset attribute value including brightness and / or definition;

[0026] taking the video image in which the target object that meets the preset condition is static as the to-be-detected image.

[0027] Optionally, the target detection on the to-be-detected image includes:

[0028] extracting image features of the to-be-detected image using a linear transformation fusion convolutional neural network, a number of convolution kernels of the linear transformation fusion convolutional neural network being less than a preset number.

[0029] Optionally, the target detection on the to-be-detected image further includes:

[0030] acquiring detection results of N frames of continuous to-be-detected images, N being a positive integer greater than or equal to 2;

[0031] performing superpixel segmentation on the target object in the detection results of the N frames of continuous to-be-detected images;

[0032] performing feature matching on superpixels of adjacent frames in the N frames of continuous to-be-detected images, and acquiring the first M superpixels with the highest similarity as effective target superpixels, M being a positive integer less than or equal to N;

[0033] matching the effective target superpixels with feature data in target feature data to obtain a matching degree of each effective target superpixel;

[0034] if a proportion of effective target superpixels with a matching degree greater than a preset threshold to a total number of superpixels exceeds a preset proportion, determining that the target detection result is accurate.

[0035] In a second aspect, an embodiment of the present application provides a target detection device, including:

[0036] a first acquisition module configured to acquire a video image sequence captured by a camera;

[0037] a first processing module configured to determine, according to the video image, whether a target object starts to enter a monitoring area of the camera;

[0038] a second processing module configured to, after determining that the target object starts to enter the monitoring area, acquire at least three continuous first video images from the video image sequence, and determine a change rate of edge pixels of each two adjacent first video images, and if the change rate meets a preset change rate interval, determine that the target object has entered the monitoring area completely.

[0039] the third processing module is configured to acquire at least three continuous second video images from the video image sequence after determining that the target object has entered the monitoring area completely, and determine a first gray difference image of each two adjacent second video images, and determine whether the target object is in static state according to the first gray difference image;

[0040] the determining module is configured to determine the to-be-detected image according to the video image in which the target object is in static state;

[0041] the target detection module is configured to perform target detection on the to-be-detected image.

[0042] In a third aspect, an electronic device is provided, which includes a processor, a memory, and a program stored in the memory and capable of running on the processor, and the program, when executed by the processor, implements the steps of the target detection method in the first aspect.

[0043] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the target detection method in the first aspect.

[0044] In the embodiments of the present application, the to-be-detected image containing the target object in static state can be obtained from the video image sequence acquired by the camera, and the problem that the target object in dynamic process causes the extraction of blurred, incomplete and other images and affects the recognition is effectively solved. BRIEF DESCRIPTION OF DRAWINGS

[0045] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of preferred embodiments, and are not meant to limit the present application. Moreover, the same reference numerals in the attached drawings indicate the same or similar components. In the drawings:

[0046] Figure 1 FIG. 1 is a flowchart of a target detection method according to an embodiment of the present application;

[0047] Figure 2 FIG. 2 is a structural diagram of a target detection device according to an embodiment of the present application;

[0048] Figure 3 FIG. 3 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0049] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of the present application.

[0050] Please refer to Figure 1 The embodiment of the present application provides a target detection method, comprising:

[0051] Step 11: obtaining a video image sequence captured by a camera;

[0052] Step 12: judging whether a target object starts to enter a monitoring area of the camera according to the video image;

[0053] Step 13: when it is determined that the target object starts to enter the monitoring area, obtaining at least three continuous first video images from the video image sequence, and determining a change rate of edge pixels of each two adjacent first video images, if the change rate meets a preset change rate interval, it is determined that the target object has completely entered the monitoring area;

[0054] The at least three continuous first video images are located after the video image in which it is determined that the target object enters the monitoring area.

[0055] For example, assuming that three continuous video images (n-1th, nth and n+1th images) are obtained, the change rates of edge pixels of the n-1th and nth video images, and the change rates of edge pixels of the nth and n+1th video images are determined.

[0056] It can be understood that when an object enters the monitoring area of the camera, the object enters the monitoring area from the edge of the monitoring area, so that the edge pixels of the video image captured by the camera at the edge will change. That is, the edge pixels of the video image in this step refer to the pixels located at the edge of the video image.

[0057] According to the process of the target object entering the monitoring area, the change rates of the edge pixels in adjacent video images will have smooth waveform changes.

[0058] The above-mentioned preset change rate interval is a range interval of the change rates of the edge pixels of adjacent video images, which is obtained in advance through a number of experiments under the condition that the shape of the target object and the distance parameter of the camera are fixed, and can also be called an effective change rate interval.

[0059] When the target object completely enters the monitoring area, the detection accuracy can be improved, which can avoid the decrease of the detection accuracy caused by the problems such as incompleteness, shielding and overlapping of the target.

[0060] Step 14: after determining that the target object enters the monitoring area completely, obtaining at least three frames of continuous second video images from the video image sequence, and determining a first gray difference image of each adjacent two frames of second video images, judging whether the target object is in static state according to the first gray difference image;

[0061] The at least three frames of continuous second video images are located after the video image in which it is determined that the target object enters the monitoring area completely.

[0062] After the target object enters the monitoring range completely, the picture may not be stable, and thus it is necessary to determine whether the target object is in static state to obtain a stable video image, which is beneficial to the target detection.

[0063] Step 15: determining a to-be-detected image according to the video image in which the target object is in static state.

[0064] Step 16: performing target detection on the to-be-detected image.

[0065] In the embodiment of the application, the to-be-detected image containing the target object in static state can be obtained from the video image sequence obtained by the camera, and the problem that the extraction of a blurred, incomplete or the like image caused by the target object in a dynamic process affects recognition is effectively solved.

[0066] In the embodiment of the application, optionally, judging whether a target object starts to enter the monitoring area of the camera according to the video image comprises:

[0067] Step 121: calculating a second gray difference image of the video image and a reference image, the reference image being an image of a background in the monitoring area of the camera;

[0068] In the embodiment of the application, the first frame read by the camera after the system is reset can be taken as the reference image.

[0069] Step 122: calculating a contour area S' of the target object in the second gray difference image;

[0070] In the embodiment of the application, the second gray difference image can be subjected to a binarization operation, then subjected to an inflation operation, and finally the contour is extracted and the area S' of the contour is calculated. In the binarization operation, the threshold value can be 25, and the maximum value can be 255. Each point of the A structure is placed at the center point of the B structure, and the inflation is performed outside the B structure. In the inflation operation, the iteration number can be 2.

[0071] Step 123: if the profile area of the target object is greater than or equal to the first set threshold T1, it is determined that the target object starts to enter the monitoring area of the camera, at this time, the detected object can be the target to be detected, or can be other interference.

[0072] In the embodiment of the present application, optionally, the determining whether the target object is in static state according to the first gray difference image comprises:

[0073] Step 141: performing AND operation on at least two first gray difference images corresponding to the at least three continuous second video images to obtain a target difference image;

[0074] In the embodiment of the present application, optionally, the following formula is used to perform AND operation on a plurality of first gray difference images:

[0075] I n ′(x,y)=|f n (x,y)-f n-1 (x,y)|∩|f n+1 (x,y)-f n (x,y)|

[0076] Wherein, I’ n (x,y) is the first gray difference image, f n (x,y), f n-1 (x,y) and f n+1 (x,y) are the gray data of the n, n-1 and n+1 frames of second video images respectively.

[0077] The so-called difference is also known as difference function or difference operation, and the result of difference reflects the change between discrete quantities.

[0078] Step 142: calculating the area S of the profile in the target gray difference image;

[0079] In the embodiment of the present application, the area S of the profile in the target gray difference image can be calculated by first performing opening operation on the target gray difference image and then performing closing operation.

[0080] Opening operation is to erode first and then dilate, which has the effect of eliminating small objects, separating objects at fine places and smoothing the boundaries of large objects.

[0081] Closing operation is to dilate first and then erode, which has the effect of filling small cavities in the object, connecting adjacent objects and smoothing the boundary.

[0082] Step 143: If the area of ​​the contour in the target grayscale difference image is less than or equal to the second set threshold T2 (a small contour area in the target grayscale difference image indicates a small difference between several frames, indicating a small motion amplitude; less than a certain threshold can be considered as static and stable), the target object is determined to be static, that is, the target object is relatively stable in the video image, and the video image is suitable for target detection.

[0083] In this embodiment of the invention, optionally, determining the image to be detected based on a video image of the target object in a static state includes:

[0084] Step 151: Determine whether the preset attribute values ​​of the static video image of the target object meet the preset conditions. The preset attribute values ​​include brightness and / or sharpness.

[0085] In this embodiment of the invention, the brightness of the video image can be calculated using the following formula:

[0086] luminance (I rgb )=ω r I r +ω g I g +ω b I b

[0087] Among them, luminance(I rgb ) represents brightness, ω r ω g ω b As the weight, I r I represents the pixel value of the red sub-pixel. g I represents the pixel value of the blue sub-pixel. b The pixel value represents the blue sub-pixel.

[0088] In this embodiment of the invention, the sharpness of a video image can be calculated using the following formula:

[0089]

[0090] Among them, sharpness (I gray For clarity, I gray It represents the pixel value of the grayscale image, d. x I gray and d y I gray Let x be the derivative in the x and y directions.

[0091] Step 152: Use a static video image of the target object that meets the preset conditions as the image to be detected.

[0092] Since the static stable frame containing the target object has been obtained in the early stage, a light target detection model can be used in the later stage to output the detection result (containing the bounding box information and the confidence information). In addition, since there may be a target occlusion problem, the edge information of the target is needed to be extracted. In the embodiment of the present application, the target detection of the to-be-detected image includes: using a linear transformation fusion convolutional neural network to extract image features of the to-be-detected image, the number of convolution kernels of the linear transformation fusion convolutional neural network is less than a preset number, that is, a small number of intrinsic features are generated using a small number of convolution kernels, which is suitable for a light target detection model.

[0093] In the embodiment of the present application, after the target detection of the to-be-detected image, the method further includes:

[0094] Step 21: obtaining detection results of N frames of continuous to-be-detected images, N being a positive integer greater than or equal to 2;

[0095] Step 22: performing superpixel segmentation on the target object in the detection results of the N frames of continuous to-be-detected images;

[0096] Superpixel segmentation is a process of subdividing a digital image into a plurality of image sub-regions (collections of pixels) (also known as superpixels). A superpixel is a small region composed of a series of adjacent pixels with similar color, brightness, texture and other characteristics.

[0097] Step 23: performing feature matching on superpixels of adjacent frames in the N frames of continuous to-be-detected images, and obtaining the first M superpixels with the highest similarity as effective target superpixels, M being a positive integer less than or equal to N;

[0098] Step 24: matching the effective target superpixels with feature data in target feature data to obtain a matching degree of each effective target superpixel;

[0099] Step 25: if the proportion of the effective target superpixels with a matching degree greater than a preset threshold to the total number of superpixels exceeds a preset proportion, determining that the target detection result is accurate.

[0100] The superpixel segmentation adopts calculating the distance of each clustering center to the pixel of S*S region (S is the scale of superpixel segmentation), and in the embodiment of the application, the SLIC (simple linear iterative cluster) algorithm can be adopted to reduce the superpixel search region, make the algorithm complexity irrelevant to the number of superpixels, and greatly accelerate the search speed. The superpixel image processing effect is different at different segmentation scales, and experiments show that the larger the segmentation scale is, the more the number of superpixels is, and the better the boundary contour segmentation effect is, but too large segmentation scale will affect the algorithm running speed, and in the embodiment of the application, a smaller segmentation scale can be adopted, for example, a segmentation scale of about 200-500.

[0101] In the embodiment of the application, the method of superpixel segmentation for characteristic template matching is used to twice verify the detection accuracy of the video image, and is especially suitable for difficult samples with target overlapping and occlusion problems, and in the difficult sample verification set, the addition of the method can improve the accuracy by about 2-3%.

[0102] Please refer to Figure 2 The embodiment of the application further provides a target detection device 20, comprising:

[0103] A first acquisition module 21 is configured to acquire a video image sequence captured by a camera;

[0104] A first processing module 22 is configured to determine whether a target object starts to enter a monitoring area of the camera according to the video image;

[0105] A second processing module 23 is configured to, after determining that the target object starts to enter the monitoring area, acquire at least three continuous first video images from the video image sequence, and determine the change rate of the edge pixels of each adjacent two first video images, and if the change rate meets a preset change rate interval, determine that the target object has completely entered the monitoring area;

[0106] A third processing module 24 is configured to, after determining that the target object has completely entered the monitoring area, acquire at least three continuous second video images from the video image sequence, and determine the first gray difference image of each adjacent two second video images, and determine whether the target object is in a static state according to the first gray difference image;

[0107] A determination module 25 is configured to determine a to-be-detected image according to the video image in which the target object is in a static state;

[0108] A target detection module 26 is configured to perform target detection on the to-be-detected image.

[0109] In the embodiment of the present application, the stable to-be-detected image containing the static target object can be obtained from the video image sequence acquired by the camera, and the problem that the fuzzy, incomplete image is extracted when the target object is in a dynamic process and the recognition is affected is effectively solved.

[0110] Optionally, the first processing module 22 comprises:

[0111] a first calculation unit, configured to calculate a second gray difference image of the video image and a reference image, the reference image being an image of a background in a monitoring area of the camera;

[0112] a second calculation unit, configured to calculate a contour area of the target object in the second gray difference image;

[0113] a first determination unit, configured to determine that the target object starts to enter the monitoring area of the camera if the contour area of the target object is greater than or equal to a first set threshold.

[0114] Optionally, the third processing module 24 comprises:

[0115] a taking unit, configured to perform a taking operation on at least two first gray difference images corresponding to at least three continuous second video images to obtain a target difference image;

[0116] a third calculation unit, configured to calculate an area of a contour in the target gray difference image;

[0117] a second determination unit, configured to determine that the target object is static if the area of the contour in the target gray difference image is less than or equal to a second set threshold.

[0118] Optionally, the taking unit determines the first gray difference image of each adjacent two second video images by using the following formula:

[0119] I n ′(x,y)=|f n (x,y)-f n-1 (x,y)|∩|f n+1 (x,y)-f n (x,y)|

[0120] wherein, I’ n (x,y) is the first gray difference image, f n (x,y), f n-1 (x,y) and f n+1 (x,y) are the gray data of the nth, n-1th and n+1th second video images respectively.

[0121] Optionally, the determination module 25 comprises:

[0122] The first obtaining unit is configured to obtain whether a preset attribute value of a video image in which the target object is static meets a preset condition, the preset attribute value including brightness and / or definition; and the video image in which the target object is static and meets the preset condition is taken as the to-be-detected image.

[0123] Optionally, the target detection module 26 is configured to extract image features of the to-be-detected image using a linear transformation fusion convolutional neural network, a number of convolution kernels of the linear transformation fusion convolutional neural network being less than a preset number.

[0124] Optionally, the target detection apparatus 20 further includes:

[0125] The second obtaining module is configured to obtain detection results of N continuous to-be-detected images, N being a positive integer greater than or equal to 2.

[0126] The superpixel segmentation module is configured to perform superpixel segmentation on the target object in the detection results of the N continuous to-be-detected images.

[0127] The feature matching module is configured to perform feature matching on superpixels of adjacent frames in the N continuous to-be-detected images, and obtain the first M superpixels with the highest similarity as effective target superpixels, M being a positive integer less than or equal to N.

[0128] The matching module is configured to match the effective target superpixels with feature data in target feature data, to obtain a matching degree of each effective target superpixel.

[0129] The determining module is configured to determine that the target detection result is accurate if a proportion of effective target superpixels with a matching degree greater than a preset threshold to a total number of superpixels exceeds a preset proportion.

[0130] For reference Figure 3 The embodiment of the present application further provides an electronic device 30, including a processor 31, a memory 32, a computer program stored in the memory 32 and executable on the processor 31, which, when executed by the processor 31, implements each process of the above target detection method embodiment and achieves the same technical effect. To avoid repetition, it will not be repeated here.

[0131] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to realize each process of the target detection method embodiment and achieve the same technical effects. To avoid repetition, details are not described herein. The computer readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, and the like.

[0132] It should be noted that, in this document, the terms "comprising", "containing", or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article, or apparatus that comprises a list of elements not only includes those elements, but also includes other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0133] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by software and necessary general hardware platforms, of course, they can also be realized by hardware, but in many cases, the former is a better embodiment. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a plurality of instructions for making a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the methods described in each embodiment of the present application.

[0134] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, which are only illustrative and not restrictive. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope of protection of the claims.

Claims

1. A target detection method characterized by, The method comprises the following steps: acquiring a video image sequence captured by a camera; judging whether a target object starts to enter a monitoring area of the camera according to the video image; after determining that the target object starts to enter the monitoring area, acquiring at least three continuous first video images from the video image sequence, and determining a change rate of edge pixels of each two adjacent first video images, if the change rate meets a preset change rate interval, determining that the target object has entered the monitoring area completely; after determining that the target object has entered the monitoring area completely, acquiring at least three continuous second video images from the video image sequence, and determining a first gray difference image of each two adjacent second video images, and judging whether the target object is static according to the first gray difference image; determining a to-be-detected image according to the video image in which the target object is static; performing target detection on the to-be-detected image; wherein, judging whether the target object is static according to the first gray difference image comprises: performing AND operation on at least two first gray difference images corresponding to the at least three continuous second video images to obtain a target difference image; calculating an area of a contour in the target gray difference image; if the area of the contour in the target gray difference image is less than or equal to a second set threshold, determining that the target object is static.

2. The method of claim 1, wherein, judging whether a target object starts to enter a monitoring area of the camera according to the video image comprises: calculating a second gray difference image of the video image and a reference image, the reference image being an image of a background in the monitoring area of the camera; calculating a contour area of the target object in the second gray difference image; if the contour area of the target object is greater than or equal to a first set threshold, determining that the target object starts to enter the monitoring area of the camera.

3. The method of claim 1, wherein, The following formula is used to perform AND operation on at least two first gray difference images corresponding to the at least three continuous second video images: I n '(x,y) = |f n (x,y) - f n-1 (x,y) |∩|f n+1 (x,y) - f n (x,y) | where I n (x,y) is the first gray difference image, f n (x,y) is the first gray difference image, f n-1 (x,y) is the first gray difference image, f n+1 (x,y) are the gray data of the second video image of the n, n-1 and n+1 frames, respectively.

4. The method of claim 1, wherein, determining a to-be-detected image according to the video image in which the target object is static comprises: judging whether a preset attribute value of the video image in which the target object is static meets a preset condition, the preset attribute value including brightness and / or definition; taking the video image in which the target object is static and meeting the preset condition as the to-be-detected image.

5. The method of claim 1, wherein, performing target detection on the to-be-detected image comprises: extracting image features of the to-be-detected image using a linear transformation fusion convolutional neural network, the number of convolution kernels of the linear transformation fusion convolutional neural network being less than a preset number.

6. The method of claim 1, wherein, After performing target detection on the to-be-detected image, the following steps are further included: acquiring detection results of N continuous to-be-detected images, N being a positive integer greater than or equal to 2; performing superpixel segmentation on the target object in the detection results of the N continuous to-be-detected images; performing feature matching on superpixels of adjacent frames in the N continuous to-be-detected images, and taking the first M superpixels with the highest similarity as effective target superpixels, M being a positive integer less than or equal to N; Matching the effective target super-pixel with feature data in target feature data, to obtain a matching degree of each effective target super-pixel; If the proportion of the effective target super-pixel with the matching degree greater than the preset threshold to the total number of super-pixels exceeds the preset proportion, it is determined that the target detection result is accurate.

7. A target detection apparatus characterized by comprising: The method comprises the steps of: The first acquisition module is configured to acquire a video image sequence captured by a camera; The first processing module is configured to determine whether a target object starts to enter a monitoring area of the camera according to the video images; The second processing module is configured to, after determining that the target object starts to enter the monitoring area, acquire at least three continuous first video images from the video image sequence, and determine a change rate of edge pixels of each two adjacent first video images, and if the change rate meets a preset change rate interval, it is determined that the target object has entered the monitoring area completely; The third processing module is configured to, after determining that the target object has entered the monitoring area completely, acquire at least three continuous second video images from the video image sequence, and determine a first gray difference image of each two adjacent second video images, and determine whether the target object is in a static state according to the first gray difference image; The determining module is configured to determine a to-be-detected image according to the video image in which the target object is in the static state; The target detection module is configured to perform target detection on the to-be-detected image. The third processing module comprises: The taking-and-uniting unit is configured to perform a taking-and-uniting operation on at least two first gray difference images corresponding to the at least three continuous second video images, to obtain a target difference image; The third calculation unit is configured to calculate an area of a contour in the target gray difference image; The second determination unit is configured to, if the area of the contour in the target gray difference image is less than or equal to a second set threshold, determine that the target object is in the static state.

8. An electronic device, comprising: The processor, the memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the target detection method according to any one of claims 1 to 6. The computer program is stored in the computer readable storage medium, and when executed by the processor, implements the steps of the target detection method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, ​

Citation Information

Patent Citations

  • Object area intrusion detection method, system and device and readable storage medium

    CN110458144A

  • Moving target detection method based on inter-frame difference and superpixel segmentation

    CN111862152A