Target detection and identification method, system and device and storage medium
By introducing a method based on visual saliency and sparse learning model in video object detection, eliminating video background interference and extracting target outline information, the problem of inaccurate object detection in the prior art is solved, and a better goal is achieved Detect and identify effects.
Patent Information
- Application Number
- CN202411530706.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-11
AI Technical Summary
The prior art cannot completely eliminate the interference of video background on the target, resulting in the inability to effectively extract the outline information of the training target.
The object detection and recognition method based on visual significance and sparse learning models is adopted to eliminate background interference through the visual color contour detection model, and the object contour extraction and training is used using the sparse learning model.
Effectively eliminate the interference of video background on the target and improve the accuracy and efficiency of target detection and recognition.
Smart Images

Figure CN119418246A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection and recognition, and in particular to a target detection and recognition method, system, device and storage medium. Background Art
[0002] Target detection and behavior recognition are important links in the visual system. Target detection and behavior recognition technologies have broad application prospects in video surveillance, autonomous driving, behavior analysis and other fields. In real-world scenarios, abnormal behaviors of surveillance videos are mainly detected, such as counter monitoring, security monitoring and other videos. By learning the pattern of normal behavior, a model of normal behavior is constructed, and test samples that deviate from the normal model are judged as abnormal. In the model training stage, it is necessary to extract features with certain descriptive and discriminative properties from the video to achieve modeling of the motion behavior of the target or the characteristics of the scene in the video, and then learn to train the normal behavior pattern from the features of the video through machine learning algorithms. In the testing stage, the trained model is used to obtain the feature representation of the test video and classify it, so as to determine whether there is abnormal behavior in the counter monitoring video.
[0003] However, in the prior art, it is impossible to completely eliminate the interference of the video background on the target, so that the contour information of the training target cannot be effectively extracted.
[0004] Therefore, there is an urgent need for an object detection and recognition method based on visual saliency and sparse learning models to solve the above problems. Summary of the invention
[0005] The purpose of the present invention is to provide a target detection and recognition method, system, device and storage medium, which can eliminate the interference of video background on the target, combine with the visual color contour detection model to effectively extract the contour information of the training target, and have a good detection and recognition effect on the detection and recognition of the target.
[0006] In order to achieve the above object, the present invention is implemented through the following technical solutions:
[0007] On the one hand, a method is provided.
[0008] Preferably, a target detection and identification method comprises the following steps:
[0009] S1: Obtain a training image set, which is defined as {I m , m = 1, 2, ... N};
[0010] S2: Perform visual saliency measurement on the acquired image set;
[0011] S3: Establish a multi-view contour detection model, and use a sparse learning model to extract and train the target contour of the established view contour detection model;
[0012] S4: Target detection and recognition are performed on the target contour.
[0013] Preferably, the step S2 is specifically:
[0014] Using the linear iterative clustering method, regularly shaped pixel blocks are generated to grid each training image, and the search space is limited to an area proportional to the size of the divided pixel blocks, thereby significantly reducing the complexity of distance calculation in the optimization process. The size and compactness of the divided pixel blocks are effectively controlled by combining color and spatial weighted distance metrics. The strategy of weighted contrast of image areas can effectively eliminate the complex background in the image.
[0015] Preferably, the step S3 specifically includes: using a computational model based on a visual color antagonism mechanism on the training image with the background removed to detect boundary information in the training image.
[0016] Preferably, in step S2, the ratio of the area of each region in the image connected to the image boundary to the square root of the overall area of the region is calculated:
[0017]
[0018] Among them, B is the set of image boundary blocks, R is the set of target area blocks, and p is the image block; the number of grids connecting the target and the image edge is much less than the number of grids connecting the background and the image edge. A threshold is set to distinguish the target from the background and eliminate the background.
[0019] Preferably, the calculation model process based on the visual color antagonism mechanism in step S3 is as follows:
[0020] S31: Divide each training image processed by the background measurement model into four channels: R, G, B, and Y, where Y = (R + G) / 2, and perform Gaussian smoothing of the same scale on the images of the four channels to obtain the cone cell response, denoted as R ′ , G ′ , B ′ and Y ′ ;
[0021] S32: Ganglion cells / LGN layer receives input from cones and ′ -G ′ and B ′ -Y ′ Calculate single antagonist response of the channel:
[0022] H(x, y)=λ1*R ′ (x,y,α)+λ2*G ′ (x, y, α)
[0023] Where λ1 and λ2 are the input weights from cone cells to ganglion cells, and λ1λ2≤0, |λ1|, |λ1|∈[0,1], α is the Gaussian smoothing scale; when λ1=λ2, ganglion cells / LGN cells do not respond to brightness information; when λ1≠λ2, they respond to both brightness and color information;
[0024] S33: Set one of λ1 and λ2 to 1 and the other to [-1, 0], detect boundary information in four different channels respectively, normalize the response of each channel to [0, 1] by linear normalization, and then use the maximum value operation to calculate the contour response from different directions. The final contour response is {C n , n=1, 2,…N}.
[0025] Preferably, the step S4 is specifically as follows: the sparse learning model is a probability distribution defined on the contour response c:
[0026]
[0027] Among them, s(c) is a known Gaussian white noise distribution model, following the independent N(0,δ 2 )distributed,
[0028] is the subset selected by the training image sharing Gabor basis function, μ = (μ i , 1, 2…n) depends on (x i ,s i , α i ) is the filter response coefficient, Z(μ) is the normalization constant;
[0029] S41: L(c, F, μ) is used as a deformable template, allowing The basis functions in perturb their positions and orientations, so that F is deformed into Where (Δx m,i , Δα m,i ) is the perturbation range of the position and direction of the i-th basis function in the m-th image; each contour response image is projected onto the subspace spanned by the selected basis function, then Among them, b m,i is the least squares reconstruction coefficient of the linear projection, ε m is the residual image;
[0030] S42: Using the minimum sum of reconstruction errors To choose The extended matching pursuit algorithm is used to select the basis function, and the local perturbation of the basis function is achieved through local maximum sharing.
[0031] S43: The initial setting model is a Gaussian white noise model, and a shared sparse coding method is used to select a set of basis functions, namely: The model parameters are estimated by the maximum likelihood using the selected basis functions and the stochastic gradient algorithm, and the deformable template is generated and the model parameters are optimized through Gibbs sampling.
[0032] Preferably, the step S4 is specifically as follows: input the test image {I m , m=1,2,…N}, an alternating and maximum computational framework is used to combine bottom-up and top-down algorithms to locate the target in the image; bottom-up detection is to scan and match the test image on the maximum structure to determine the position of the target in the test image; while the top-down algorithm is to find the contour that best matches the target in the test image, so as to achieve accurate positioning of the target; the sparse learning model is used as a deformable template to match each position of the test image, and the template matching score of each position can be used After calculation, take the global maximum value of all matching scores and finally mark the target.
[0033] On the other hand, a target detection and recognition system is provided, comprising:
[0034] The image acquisition module is used to: obtain a training image set;
[0035] An image measurement module, for: performing visual saliency measurement on the acquired image set;
[0036] The model building module is used to: build a multi-view contour detection model, and use a sparse learning model to extract and train the target contour of the built view contour detection model;
[0037] The target output module is used to detect and identify the target contour.
[0038] On the other hand, a device for identifying product information is provided, comprising a processor and a memory for storing a computer program, wherein when the processor executes the computer program, the steps of the above method are implemented.
[0039] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by one or more processors, the steps of the above method are implemented.
[0040] Compared with the prior art, the beneficial effects of the present invention are:
[0041] The present invention eliminates the interference of video background on the target by introducing a visual color contour detection model based on visual salient background measurement, and effectively extracts the contour information of the training target in combination with the visual color contour detection model; and has good detection and recognition effects on the detection and recognition of the target through a video target detection method based on a sparse learning model in combination with the context information of the video. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flow chart of the method of the present invention.
[0043] Figure 2 It is a schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION
[0044] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the application equally.
[0045] In the present invention, terms such as "upper", "lower", "left", "right", "front", "back", "vertical", "horizontal", "side", "bottom", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings. They are relational words determined only for the convenience of describing the structural relationships of the various parts or elements of the present invention, and do not specifically refer to any part or element in the present invention and should not be understood as limitations on the present invention.
[0046] In the present invention, terms such as "fixed connection", "connected", "connection", etc. should be understood in a broad sense, indicating that it can be fixedly connected, integrally connected or detachably connected; it can be directly connected or indirectly connected through an intermediate medium. Relevant scientific research or technical personnel in this field can determine the specific meanings of the above terms in the present invention according to specific circumstances, and they should not be understood as limiting the present invention.
[0047] Example:
[0048] like Figure 1 As shown, this embodiment provides a target detection and recognition method, comprising the following steps:
[0049] S1: Get training images, {I m , m = 1, 2, ... N};
[0050] S2: Image visual saliency measurement: Since the background of the training image greatly interferes with the extraction of the training target contour and affects the subsequent model learning, visual saliency detection is introduced. The linear iterative clustering method is used to generate regular pixel blocks to grid each training image, and the search space is limited to an area proportional to the size of the divided pixel blocks, thereby significantly reducing the complexity of distance calculation in the optimization process. By combining color and space weighted distance metrics, the size and compactness of the divided pixel blocks are effectively controlled. The strategy of combining image area weighted contrast can effectively eliminate the complex background in the image;
[0051] S3: Multi-view visual contour detection model: A computational model based on the visual color antagonism mechanism is used to detect the boundary information in the training image after the background is removed.
[0052] S4: Sparse learning model: Use the sparse learning model to extract the target contour and train the model;
[0053] S5: Object detection and recognition: implemented using alternating and maximum bottom-up and top-down algorithms.
[0054] Among them, in step 2, the ratio of the area of each region in the image connected to the image boundary to the square root of the overall area of the region is calculated:
[0055]
[0056] Among them, B is the set of image boundary blocks, R is the set of target area blocks, and p is the image block; the number of grids connecting the target and the image edge is much less than the number of grids connecting the background and the image edge. A threshold is set to distinguish the target from the background and eliminate the background.
[0057] In step 3, the computational model process based on the visual color antagonism mechanism is as follows:
[0058] Each training image processed by the background measurement model is divided into four channels: R, G, B, and Y, where Y = (R + G) / 2. The images of the four channels are Gaussian smoothed at the same scale to obtain the cone cell response, which is recorded as R ′ , G ′ , B ′ and Y ′ ;
[0059] The ganglion cells / LGN layer receive input from cones and ′ -G ′ and B ′ -Y ′ Calculate single antagonist response of the channel:
[0060] H(x, y)=λ1*R′ (x,y,α)+λ2*G ′ (x, y, α)
[0061] Where λ1 and λ2 are the input weights from cone cells to ganglion cells, and λ1λ2≤0, |λ1|, |λ1|∈[0,1], α is the Gaussian smoothing scale; when λ1=λ2, ganglion cells / LGN cells do not respond to brightness information; when λ1≠λ2, they respond to both brightness and color information;
[0062] Set one of λ1 and λ2 to 1 and the other to [-1, 0]. Detect boundary information in four different channels respectively. Normalize the response of each channel to [0, 1] by linear normalization. Then use the maximum value operation to calculate the contour response from different directions. The final contour response is {C n , n=1, 2,…N}.
[0063] Step 4 is specifically as follows: the sparse learning model is a probability distribution defined on the contour response c:
[0064]
[0065] Among them, s(c) is a known Gaussian white noise distribution model, following the independent N(0,δ 2 )distributed, is the subset selected by the training image sharing Gabor basis function, μ = (μ i , 1, 2…n) depends on (x i ,s i , α i ) is the filter response coefficient, Z(μ) is the normalization constant L(c, F, μ) as a deformable template, allowing The basis functions in perturb their positions and orientations, so that F is deformed into Where (Δx m,i , Δα m,i ) is the perturbation range of the position and direction of the i-th basis function in the m-th image; each contour response image is projected onto the subspace spanned by the selected basis function, then Among them, b m,i is the least squares reconstruction coefficient of the linear projection, ε m is the residual image;
[0066] By minimizing the sum of reconstruction errors To choose The extended matching pursuit algorithm is used to select the basis function, and the local perturbation of the basis function is achieved through local maximum sharing.
[0067] The initial setting model is a Gaussian white noise model, and the shared sparse coding method is used to select a set of basis functions, namely: The model parameters are estimated by the maximum likelihood using the selected basis functions and the stochastic gradient algorithm, and the deformable template is generated and the model parameters are optimized through Gibbs sampling.
[0068] Step S5: input the test image {I m , m=1,2,…N}, an alternating and maximum computational framework is used to combine bottom-up and top-down algorithms to locate the target in the image; bottom-up detection is to scan and match the test image on the maximum structure to determine the position of the target in the test image; while the top-down algorithm is to find the contour that best matches the target in the test image, so as to achieve accurate positioning of the target; the sparse learning model is used as a deformable template to match each position of the test image, and the template matching score of each position can be used After calculation, take the global maximum value of all matching scores and finally mark the target.
[0069] like Figure 2 As shown, this embodiment also provides a target detection and recognition system, including:
[0070] The image acquisition module is used to: obtain a training image set;
[0071] An image measurement module, for: performing visual saliency measurement on the acquired image set;
[0072] The model building module is used to: build a multi-view contour detection model, and use a sparse learning model to extract and train the target contour of the built view contour detection model;
[0073] The target output module is used to detect and identify the target contour.
Claims
1. A target detection and recognition method, characterized in that: The following steps are involved: S1: Obtain a training image set, the image set is defined as {I m , m = 1, 2, ... N}; S2: Perform visual saliency measurement on the acquired image set; S3: Establish a multi-view contour detection model, and use a sparse learning model to extract and train the target contour of the established view contour detection model; S4: Target detection and recognition are performed on the target contour.
2. A target detection and recognition method according to claim 1, characterized in that: The step S2 is specifically as follows: Using the linear iterative clustering method, regularly shaped pixel blocks are generated to grid each training image, and the search space is limited to an area proportional to the size of the divided pixel blocks, thereby significantly reducing the complexity of distance calculation in the optimization process. The size and compactness of the divided pixel blocks are effectively controlled by combining color and spatial weighted distance metrics. The strategy of weighted contrast of image areas can effectively eliminate the complex background in the image.
3. A target detection and recognition method according to claim 2, characterized in that: The step S3 specifically includes: using a computational model based on a visual color antagonism mechanism to detect boundary information in the training image with the background removed.
4. The target detection and recognition method according to claim 2, characterized in that: In step S2, the ratio of the area of each region in the image connected to the image boundary to the square root of the overall area of the region is calculated: Among them, B is the set of image boundary blocks, R is the set of target area blocks, and p is the image block; the number of grids connecting the target and the image edge is much less than the number of grids connecting the background and the image edge. A threshold is set to distinguish the target from the background and eliminate the background.
5. A target detection and recognition method according to claim 4, characterized in that: The calculation model process based on the visual color antagonism mechanism in step S3 is as follows: S31: Divide each training image processed by the background measurement model into four channels: R, G, B, and Y, where Y = (R + G) / 2, and perform Gaussian smoothing of the same scale on the images of the four channels to obtain the cone cell response, denoted as R ′ , G ′ , B ′ and Y ′ ; S32: Ganglion cells / LGN layer receives input from cones and ′ -G ′ and B ′ -Y ′ Calculate single antagonist response of the channel: H(x,y)=λ1*R ′ (x, y, α)+λ2*G ′ (x, y, a) Where λ1 and λ2 are the input weights from cone cells to ganglion cells, and λ1λ2≤0, |λ1|, |λ1|∈[0,1], α is the Gaussian smoothing scale; when λ1=λ2, ganglion cells / LGN cells do not respond to brightness information; when λ1≠λ2, they respond to both brightness and color information; S33: Set one of λ1 and λ2 to 1 and the other to [-1, 0], detect boundary information in four different channels respectively, normalize the response of each channel to [0, 1] by linear normalization, and then use the maximum value operation to calculate the contour response from different directions. The final contour response is {C n , n=1, 2,…N}.
6. A target detection and recognition method according to claim 5, characterized in that: The step S4 is specifically as follows: the sparse learning model is a probability distribution defined on the contour response c: Among them, s(c) is a known Gaussian white noise distribution model, following the independent N(0,δ 2 )distributed, is the subset selected by the training image sharing Gabor basis function, μ = (μ i , 1, 2…n) depends on (x i ,s i , α i ) is the filter response coefficient, Z(μ) is the normalization constant; S41: L(c, F, μ) is used as a deformable template, allowing The basis functions in perturb their positions and orientations, so that F is deformed into Where (Δx m,i , Δα m,i ) is the perturbation range of the position and direction of the i-th basis function in the m-th image; each contour response image is projected onto the subspace spanned by the selected basis function, then Among them, b m,i is the least squares reconstruction coefficient of the linear projection, ε m is the residual image; S42: Using the minimum sum of reconstruction errors To choose The extended matching pursuit algorithm is used to select the basis function, and the local perturbation of the basis function is achieved through local maximum sharing. S43: The initial setting model is a Gaussian white noise model, and a shared sparse coding method is used to select a set of basis functions, namely: The model parameters are estimated by the maximum likelihood using the selected basis functions and the stochastic gradient algorithm, and the deformable template is generated and the model parameters are optimized through Gibbs sampling.
7. A target detection and recognition method according to claim 6, characterized in that: The step S4 specifically includes: inputting a test image {I m , m=1,2,…N}, an alternating and maximum computational framework is used to combine bottom-up and top-down algorithms to locate the target in the image; bottom-up detection is to scan and match the test image on the maximum structure to determine the position of the target in the test image; while the top-down algorithm is to find the contour that best matches the target in the test image, so as to achieve accurate positioning of the target; the sparse learning model is used as a deformable template to match each position of the test image, and the template matching score of each position can be used After calculation, take the global maximum value of all matching scores and finally mark the target.
8. A target detection and recognition system, characterized in that: include: The image acquisition module is used to: obtain a training image set; An image measurement module, for: performing visual saliency measurement on the acquired image set; The model building module is used to: build a multi-view contour detection model, and use a sparse learning model to extract and train the target contour of the built view contour detection model; The target output module is used to detect and identify the target contour.
9. A device for identifying product information, characterized in that: The method comprises a processor and a memory for storing a computer program, wherein when the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the steps of the method according to any one of claims 1 to 7 are implemented.