Method and device for extracting children's features in a shopping mall monitoring environment

Through the convolutional neural network combined with the SE module and the multi-head self-attention mechanism, the optimization module processes children's features and generates children's multi-label features, which solves the problem of insufficient accuracy and speed of child recognition in traditional technology and realizes the detection in shopping mall monitoring environment. Efficient child feature extraction and identification.

CN117523616BActive Publication Date: 2024-09-13SHENZHEN COSUN SIGN ENG CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311762486.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2024-09-13
Estimated Expiration
2043-12-20

AI Technical Summary

Technical Problem

Traditional child identification technology has limitations in accuracy and speed, and a single tag cannot meet the needs of complex applications. It is especially difficult to effectively identify children's characteristics in a shopping mall surveillance environment.

Method used

Using a convolutional neural network combined with the SE module and the multi-head self-attention mechanism, the optimization module performs weight analysis and feature classification on children's features to generate children's multi-label features to achieve efficient and accurate child feature extraction.

Benefits of technology

It improves the distinction and discrimination ability of children's characteristics, meets the high standard requirements of modern society for child supervision and safety management, and achieves fast and accurate identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117523616B
    Figure CN117523616B
Patent Text Reader

Abstract

The present invention relates to a method for extracting child features in a shopping mall monitoring environment, comprising the following steps: obtaining child features in a picture, extracting the child features through a convolutional neural network to obtain a first child feature; processing the first child feature through an optimization module to obtain a child multi-label feature; wherein the optimization module comprises a first optimization module and a second optimization module; the processing of the first child feature through the optimization module to obtain a child multi-label feature comprises: performing a weight analysis on the first child feature through the first optimization module; obtaining a first child weight feature; inputting the first child weight feature into the second optimization module for feature classification processing to obtain a child multi-label feature. The beneficial effect of quickly extracting the child's features is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method, device, computer equipment and storage medium for extracting child features in a shopping mall monitoring environment. Background Art

[0002] With the advancement of technology, including the growth of computing power and the development of smart devices such as mobile phones, surveillance cameras, and industrial cameras, the volume, resolution, and storage of image and video data have increased significantly. Research on technologies to extract the desired information from existing images or videos has become extremely important. Computer vision applications in video include video classification, video object detection and tracking, video security detection, and object recognition. Object recognition can be further categorized into object recognition, face recognition, posture recognition, and behavior recognition.

[0003] In recent years, child safety has been a major societal concern, especially in public settings, where the protection and supervision of children is paramount. In this context, accurate identification and analysis of children has become crucial. Traditional child identification technologies primarily rely on facial recognition or other biometric features, which have limitations in accuracy and speed. Furthermore, with the development of society and advancements in technology, using only a single label to represent children's characteristics is no longer sufficient to meet the increasingly complex needs of applications. Summary of the Invention

[0004] The main purpose of the present invention is to provide a method, device, computer equipment and storage medium for extracting children's features in a shopping mall monitoring environment, which achieves the beneficial effect of quickly obtaining children's features for identity recognition.

[0005] To achieve the above object, the present invention provides a method for extracting child features in a shopping mall monitoring environment, comprising the following steps:

[0006] Obtaining child features in the image, and extracting the child features through a convolutional neural network to obtain a first child feature;

[0007] Processing the first child feature through an optimization module to obtain a child multi-label feature; wherein the optimization module includes a first optimization module and a second optimization module;

[0008] The processing of the first child feature by the optimization module to obtain the child multi-label feature includes the following steps:

[0009] Performing a weight analysis on the first child feature using a first optimization module to obtain a first child weight feature; wherein the first optimization module is a combination of an SE module added to C2-C4 in a Resnet-50 module, the SE module is used to enhance the convolutional neural network for extracting the child feature, and the Resnet-50 module is used to quickly obtain the first child feature for identity recognition;

[0010] The first child weight feature is input into the second optimization module for feature classification processing to obtain the child multi-label feature, wherein the second optimization module is a combination of replacing the C5 in the Resnet-50 module with a multi-head self-attention mechanism module.

[0011] As a further solution of the present invention, the optimization module also includes a function module, which inputs the first child weight feature into the function model to obtain the second child weight feature, and determines whether the second child weight feature has a child attribute. If not, it is fed back to the optimization module. If so, the child multi-label feature is output. The function model is used to determine whether the first child weight feature belongs to the attribute possessed by children.

[0012] As a further solution of the present invention, inputting the first child weight feature into a function model to obtain the second child weight feature includes:

[0013] The first child weight feature is input into the Excitation module, and the activation value of the channel corresponding to the first child weight feature is adjusted based on the sigmoid activation function in the Excitation module; the second child weight feature is obtained; and the Excitation module is used to calculate the first child weight feature.

[0014] As a further solution of the present invention, a first optimization module performs weight analysis on the first child feature; the obtained first child weight feature includes:

[0015] Obtaining the first child feature, and inputting the first child feature into a first optimization module; wherein the SE module includes a Squeeze module;

[0016] A first child weighted feature is obtained by performing channel compression processing on each of the first child features based on a Squeeze module; wherein the Squeeze module is used to compress the channels of the first child features.

[0017] As a further solution of the present invention, the first child weight feature is input into the second optimization module for feature classification processing, and the obtained child multi-label feature includes:

[0018] Obtaining the first child weighted feature, extracting the first child weighted feature to obtain a first child multi-label classification feature vector, inputting the first child multi-label classification feature vector into the query matrix and the key matrix in the transformation matrix to obtain a matrix of the first child multi-label classification features;

[0019] The matrix of the first child's multi-label classification features is obtained by the inner product of the query matrix and the key matrix to obtain a first matrix; wherein the first matrix is ​​processed by a softmax module to obtain a self-attention coefficient matrix A, and the attention coefficient matrix A is the correlation distribution of the first child's multi-label classification features; wherein the softmax module is used to convert the values ​​of the first matrix into the values ​​of the correlation distribution of the first child's multi-label classification features;

[0020] The vector of the attention coefficient matrix A is multiplied by the vector product of the value matrix to obtain the child multi-label feature.

[0021] As a further solution of the present invention, the first child multi-label classification feature vector is input into the query matrix and the key matrix in the transformation matrix. When each first child multi-label classification feature vector is obtained, a two-dimensional position encoding is introduced. The two-dimensional position encoding is used to capture the absolute information and relative information between the first child multi-label classification feature vectors.

[0022] As a further solution of the present invention, the step of obtaining the features of children in the image includes:

[0023] Acquire training data and perform training optimization on the training data; wherein the training optimization includes one or more of the following: (1) randomly increasing or decreasing the brightness of an image; (2) randomly adding shadows to an image; (3) performing mosaic enhancement on an image;

[0024] Divide the optimized training data into training set and test set;

[0025] The convolutional neural network is trained and tested based on the training set and the test set.

[0026] The present invention also provides a device for extracting children's features in a shopping mall monitoring environment, comprising:

[0027] an acquisition module, configured to acquire child features in the image, and extract the child features through a convolutional neural network to obtain a first child feature;

[0028] a processing module, configured to process the first child feature through an optimization module to obtain a child multi-label feature; wherein the optimization module includes a first optimization module and a second optimization module;

[0029] The processing module includes:

[0030] A weight analysis submodule, configured to perform a weight analysis on the first child feature using a first optimization module to obtain a first child weight feature; wherein the first optimization module is a combination of an SE module added to C2-C4 in a Resnet-50 module;

[0031] The classification submodule is used to input the first child weight feature into the second optimization module for feature classification processing to obtain the child multi-label feature; wherein, the second optimization module is a combination of replacing the C5 in the Resnet-50 module with the multi-head self-attention mechanism module.

[0032] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0033] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0034] The present invention provides a method, device, computer equipment and storage medium for extracting child features in a shopping mall monitoring environment; obtaining child features in a picture, extracting the child features through a convolutional neural network to obtain a first child feature; processing the first child feature through an optimization module to obtain a child multi-label feature; wherein the optimization module includes a first optimization module and a second optimization module; processing the first child feature through the optimization module to obtain the child multi-label feature includes: performing weight analysis on the first child feature through the first optimization module; obtaining a first child weight feature; wherein the first optimization module is a combination of adding an SE module to C2-C4 in a Resnet-50 module, inputting the first child weight feature into the second optimization module for feature classification processing to obtain a child multi-label feature, wherein the second optimization module is a combination of replacing C5 in the Resnet-50 module with a multi-head self-attention mechanism module; through the combination of the SE module and the multi-head self-attention mechanism, the problem of inaccurate extraction of child features using facial recognition or other biometric features in traditional technologies is solved, and efficient and accurate child feature extraction is achieved, meeting the high standards of modern society for child supervision and safety management. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 1 is a schematic diagram of the steps of a method for extracting child features in a shopping mall monitoring environment according to one embodiment of the present invention;

[0036] Figure 2 This is a structural block diagram of a device for extracting child features in a shopping mall monitoring environment according to one embodiment of the present invention;

[0037] Figure 3 2 is a schematic diagram of a first child multi-label classification feature in one embodiment of the present invention;

[0038] Figure 4 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0039] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0041] Reference Figure 1 , Figure 1 FIG. 1 is a schematic diagram of steps of a method for extracting child features in a shopping mall monitoring environment according to an embodiment of the present invention. The method for extracting child features in a shopping mall monitoring environment according to an embodiment of the present invention includes:

[0042] Step S101: Acquire child features in the image, extract the child features through a convolutional neural network, and obtain a first child feature.

[0043] It is understandable that the specific embodiments are not limited here. The embodiment of the present invention is described by taking a server as an execution subject as an example.

[0044] It should be noted that converting images to a format suitable for convolutional neural network input involves resizing the image and normalizing the pixel value range, thereby building a convolutional neural network model suitable for image processing. Components such as convolutional layers, pooling layers, and fully connected layers are typically used to construct the network structure to effectively extract features from the image. The preprocessed image is then input into the convolutional neural network for forward propagation. This results in the extraction of image features through a series of convolution and pooling operations, which gradually become more abstract and meaningful. Feature representations are obtained from the intermediate layers of the convolutional neural network model (usually the layer before the fully connected layer). These features can be considered an abstract representation of the image at this layer, retaining only information related to the child's characteristics.

[0045] The above steps have the following beneficial effects: through convolution and pooling operations, the convolutional neural network can gradually learn more discriminative image features, which helps to accurately extract child features. Once it reaches a specific layer, the convolutional neural network model will discard information irrelevant to child features, thereby retaining only abstract features related to child features. Doing so helps to further improve the discriminability of features. The convolutional neural network captures spatial local relationships in the image by sharing weights in the convolutional layer, but maintains the semantic information of the features during the feature extraction process. This helps to deal with problems such as scale transformation, rotation or partial occlusion of the image, thereby improving the robustness of the features. In summary, by extracting child features from images through a convolutional neural network, the first child feature can be effectively obtained by learning discriminative feature representations, removing irrelevant information and retaining semantic information.

[0046] Processing the first child feature through an optimization module to obtain a child multi-label feature; wherein the optimization module includes a first optimization module and a second optimization module;

[0047] Specifically, the optimization module will be applied to the first child feature to obtain the child multi-label feature. The goal of the optimization module is to further process the first child feature according to task requirements to improve performance and accuracy.

[0048] The processing of the first child feature by the optimization module to obtain the child multi-label feature includes the following steps:

[0049] Step 1021: Perform weight analysis on the first child feature through a first optimization module to obtain a first child weight feature; wherein the first optimization module is a combination of adding the SE module to the C2-C4 in the Resnet-50 module.

[0050] It's important to note that the SE module is a lightweight attention mechanism that can be used to control the importance of each channel in a convolutional neural network. Adding the SE module to the C2-C4 layers of the ResNet-50 module learns the correlation between feature channels and adaptively adjusts channel weights. This compresses the C2-C4 features of the ResNet-50 module to reduce the spatial dimensionality of the features. This significantly reduces computational complexity and captures the correlation between channels. By learning a channel-dependent weight vector, the weights are redistributed across each channel. This weight can be used to adjust the responsiveness of features in each channel, thereby emphasizing important features.

[0051] The above steps have the following beneficial effects. In summary, the first optimization module can perform weight analysis on the first child feature and obtain the first child weighted feature. Feature weight analysis allows the network to focus more on important features while reducing reliance on redundant features. This helps improve the network's perception and classification accuracy, potentially achieving good technical results in tasks such as image classification and object recognition.

[0052] In step 1022, the first child weight feature is input into the second optimization module for feature classification processing to obtain a child multi-label feature, wherein the second optimization module is a combination of replacing the C5 in the Resnet-50 module with a multi-head self-attention mechanism module.

[0053] It is important to note that the multi-head self-attention mechanism module replaces the C5 layer in the ResNet-50 module with a multi-head self-attention mechanism module. The self-attention mechanism is a method that can learn the internal dependencies of the input sequence. The multi-head self-attention mechanism is more flexible and powerful, and can learn multiple different feature representations simultaneously. In the second optimization module, the multi-head self-attention mechanism module is used to process the first child weight feature. The second optimization module can adaptively capture the correlation and importance in the sequence and perform feature classification based on the different input features.

[0054] The above steps have the following advantages: In summary, the second optimization module transforms the first child weighted features into child multi-label features. Thanks to the introduction of the multi-head self-attention mechanism, the second optimization module can better capture the relationships between features and provide more flexible and accurate feature classification. This helps improve the discriminative and discriminative power of features, potentially making the child multi-label features more accurate and useful.

[0055] In an embodiment of the present invention, a child feature in a picture is obtained, and the child feature is extracted using a convolutional neural network to obtain a first child feature; the first child feature is processed by an optimization module to obtain a child multi-label feature; wherein the optimization module includes a first optimization module and a second optimization module; the processing of the first child feature by the optimization module to obtain the child multi-label feature includes:

[0056] The first child feature is weighted and analyzed by the first optimization module; the first child weight feature is obtained; wherein the first optimization module is a combination of adding the SE module to the C2-C4 in the Resnet-50 module, and the first optimization module is used to perform weight analysis on the first child feature; the first child weight feature is input into the second optimization module for feature classification processing to obtain a child multi-label feature, wherein the second optimization module is a combination of replacing the C5 in the Resnet-50 module with the multi-head self-attention mechanism module, and the second optimization module is used to classify the first child weight feature.

[0057] Specifically, a convolutional neural network is used to extract child features from an image to obtain a first child feature. This feature is then processed using an optimization module to obtain a child multi-label feature. The optimization module includes a first optimization module and a second optimization module. The first optimization module performs feature weight analysis by adding a Sequencing Engine (SE) module to the C2-C4 layers of a ResNet-50 module. The SE module learns the correlations between feature channels and adaptively adjusts channel weights. The first optimization module extracts the first child weighted feature and inputs it into the second optimization module. The second optimization module replaces the C5 layer of the ResNet-50 module with a multi-head self-attention mechanism module. The multi-head self-attention mechanism module adaptively captures the correlation and importance between features and performs feature classification based on the input features. Through these steps, the second optimization module converts the first child weighted feature into a child multi-label feature. The technical effects of these operations include improving the discrimination and discriminative power of the child feature, making the multi-label feature more accurate and useful. By introducing the SE module and the multi-head self-attention mechanism module, the optimization module can better analyze feature weights and relationships, thereby improving the classification accuracy and robustness of the child feature. It will provide better performance for children's image classification and label prediction tasks.

[0058] In a specific embodiment, the optimization module also includes a function module, which inputs the first child weight feature into a function model to obtain a second child weight feature, and determines whether the second child weight feature has a child attribute. If not, it is fed back to the optimization module. If so, the child multi-label feature is output. The function model is used to determine whether the first child weight feature belongs to the attribute possessed by children.

[0059] Specifically, it should be noted that the optimization module includes a system of function modules, the purpose of which is to process the first child weight feature and generate the second child weight feature. The function model is used to determine whether the first child weight feature has a child attribute. If the second child weight feature does not have a child attribute, the optimization module will feed it back to the internal processing for further processing. However, if the second child weight feature has a child attribute, a child multi-label feature will be output. The purpose of the function model is to determine whether the first child weight feature belongs to the attribute possessed by the child. Through the above steps, a further description and classification of the first child weight feature is obtained. If the function model can accurately determine whether the first child weight feature belongs to the child attribute, an accurate child multi-label feature will be obtained.

[0060] In a specific embodiment, the first child weight feature is input into the Excitation module, and the activation value of the channel corresponding to the first child weight feature is adjusted based on the sigmoid activation function in the Excitation module; the second child weight feature is obtained; and the Excitation module is used to calculate the first child weight feature.

[0061] Specifically, the function of the Excitation module is to input the first child weight feature and use the sigmoid activation function to adjust the activation value of each channel in the first child weight feature. The second child weight feature can be generated, and the purpose of the Excitation module is to calculate the first child weight feature. By using the sigmoid activation function, the activation value of each channel is adjusted, and the weight is calculated based on the adjusted value of the activation value of each channel. The weight at this time can be used to further process the child's multi-label features, and the performance of the Excitation module will affect the results. By adjusting the activation value of the channel corresponding to the first child weight feature, the correlation and importance between features can be better captured. It helps to improve the accuracy and effect of multi-label classification, thereby better understanding the characteristics of the first child and producing more accurate classification results.

[0062] In a specific embodiment, the process of executing step S1021 specifically includes the following steps:

[0063] Obtaining the first child feature, and inputting the first child feature into a first optimization module; wherein the SE module includes a Squeeze module;

[0064] A first child weighted feature is obtained by performing channel compression processing on each of the first child features based on a Squeeze module; wherein the Squeeze module is used to compress the channels of the first child features.

[0065] Specifically, the first optimization module includes the SE module, which includes the Squeeze module. First, the features of the first child are obtained and input into the first optimization module. The Squeeze module in the SE module compresses the channels of each first child feature. The above steps help reduce the dimension and extract the important information of each channel to generate the first child weight feature. The function of the Squeeze module is to compress the channels of the first child feature. Specifically, the number of channels can be reduced to obtain a more compact and effective feature representation. This compression processing can help reduce the requirements of calculation and storage while retaining important feature information. The compression processing of the Squeeze module can improve the interpretability and classification performance of the features. By reducing the number of channels, a more compact and useful feature representation is obtained, thereby improving the accuracy and effect of classification. The above steps can help better understand the features of the first child and produce more accurate multi-label classification results.

[0066] In a specific embodiment, the method includes the following steps:

[0067] Obtaining the first child weighted feature, extracting the first child weighted feature to obtain a first child multi-label classification feature vector, inputting the first child multi-label classification feature vector into the query matrix and the key matrix in the transformation matrix to obtain a matrix of the first child multi-label classification features;

[0068] The matrix of the first child's multi-label classification features is obtained by the inner product of the query matrix and the key matrix to obtain a first matrix; wherein the first matrix is ​​processed by a softmax module to obtain a self-attention coefficient matrix A, and the attention coefficient matrix A is the correlation distribution of the first child's multi-label classification features; wherein the softmax module is used to convert the values ​​of the first matrix into the values ​​of the correlation distribution of the first child's multi-label classification features;

[0069] The vector of the attention coefficient matrix A is multiplied by the vector product of the value matrix to obtain the child multi-label feature.

[0070] Specifically, the query matrix and the key matrix are used to extract the multi-label classification feature vector of the first child, and the corresponding feature matrix is ​​obtained. Then, the first matrix is ​​obtained by performing an inner product operation on the feature matrix, the query matrix, and the key matrix. By processing the first matrix through the softmax module, the self-attention coefficient matrix A can be obtained, which represents the correlation distribution of the multi-label classification features of the first child. Finally, the vectors of the attention coefficient matrix A are multiplied and added with the vectors of the value matrix to obtain a specific description of the child's multi-label features. The effectiveness of the above steps depends on multiple factors, including the query matrix and key matrix used, the calculation method of the attention coefficient, and the definition of the value matrix. Generally, by calculating the attention coefficient, the input multi-label classification features can be weighted and aggregated, thereby highlighting features related to the target task and suppressing features irrelevant to the task. The attention mechanism can improve the representation ability and generalization performance of the model and help learn better feature representations. However, the specific technical effects and application scenarios need to be evaluated based on specific circumstances.

[0071] In a specific embodiment, when the first child multi-label classification feature vector is input into the query matrix and the key matrix in the transformation matrix to obtain each first child multi-label classification feature vector, a two-dimensional position encoding is introduced, and the two-dimensional position encoding is used to capture the absolute information and relative information between the first child multi-label classification feature vectors.

[0072] Specifically, the two-dimensional position encoding adds a position-related value to each element on the feature vector to represent the position information of the element. It can help the model distinguish features at different positions, so as to better understand and utilize the local structure of the input data. By introducing position encoding, it is possible to learn the expression and semantics of features at different positions based on the position of the features in the input. It greatly solves the problem of missing position information in the self-attention algorithm and improves the model's ability to understand the input sequence. The introduction of two-dimensional position encoding can improve the model's ability to model the input. It can help the model more accurately understand and associate multi-label classification features at different positions and capture the relative relationship and absolute position information between them. This can better adapt to different input modes and improve the ability to model the relationship between features. It will eventually lead to more accurate and robust multi-label classification results. The specific technical effect also depends on the design and implementation of the position encoding. In a specific embodiment, the step of obtaining the child's features in the image includes:

[0073] Acquiring training data and performing training optimization on the training data;

[0074] Divide the optimized training data into training set and test set;

[0075] The convolutional neural network is trained and tested based on the training set and the test set.

[0076] Specifically, the optimized training data is divided into a training set and a test set. Typically, a large portion of the data is used for training, while a smaller portion is used for testing. An appropriate convolutional neural network architecture is selected, including convolutional layers, pooling layers, and fully connected layers. The network design should be optimized based on the characteristics of the problem and the properties of the dataset, and the network weights and biases are initialized. Random initialization methods, such as normal or uniform distributions, are typically used. Forward propagation is performed on the samples in the training set, and the network calculates the prediction for each sample. Forward propagation transfers features from the input layer to the output layer, and a loss function is used to calculate the difference between the current prediction and the true label. Common loss functions include cross-entropy loss and mean squared error. Backpropagation is used to calculate the derivative of the loss function with respect to the network weights and biases. This derivative is used to update the network parameters to reduce the loss function. An optimization algorithm, such as gradient descent, is used to update the network weights and biases based on the calculated gradients. This process is repeated until a predetermined number of training iterations is reached or a certain convergence condition is met. By training the convolutional neural network on the training set, the network parameters can be optimized to minimize the loss function. This helps improve the model's predictive accuracy and generalization capabilities. By evaluating the trained network using the test set, we can objectively assess the model's performance on unseen data. This helps verify the model's generalization capabilities and guides further improvements and adjustments. By observing the training and test results, we can understand the model's performance on different data and adjust parameters and optimize the network architecture as needed. This helps improve the model's performance and stability. In summary, training and testing convolutional neural networks based on training and test sets can achieve beneficial results such as model optimization, generalization capability assessment, and parameter tuning.

[0077] In a specific embodiment, the training optimization includes data augmentation, and the data augmentation includes one or more of the following:

[0078] (1) Randomly increase or decrease the brightness of the image;

[0079] (2) Randomly add shadows to the image;

[0080] (3) Perform mosaic enhancement on the image.

[0081] Specifically, the original image is segmented into multiple regions, each of which can be adjusted in size as needed. Typically, the segments are small, and a mosaic processing algorithm is applied to each region. Mosaic processing replaces each region in the original image with a specific pattern or pixel block, creating a mosaic effect. Typically, mosaic processing algorithms set the pixel values ​​of each region to the same value to hide the details of the original region. The mosaic-processed regions are then merged into a new image. The merging process can use the average pixel value of adjacent regions or other strategies to determine the pixel value of the merged region. By applying mosaic enhancement, samples similar to but slightly different from the original image can be generated. This increases the diversity of training data, enabling the model to better adapt to different scenarios and variations. Mosaic enhancement can also improve the model's robustness to partially occluded or blurred images. When applied to real-world scenarios, noise or privacy issues may arise. Mosaic enhancement can help the model better handle these situations. By generating more diverse data samples, the model can prevent overfitting to the training set. Overfitting occurs when a model performs well on the training set but performs poorly on new data. By increasing the diversity of training samples, the generalization ability of the model can be improved; in short, by mosaic augmentation of data, the diversity of training data can be increased, the robustness of the model can be enhanced, and overfitting can be prevented, thereby improving the performance and generalization ability of the model.

[0082] The above describes the method for extracting child features in a shopping mall monitoring environment according to an embodiment of the present invention. The following describes the device for extracting child features in a shopping mall monitoring environment according to an embodiment of the present invention. Figure 2 In one embodiment of the present invention, a device for extracting child features in a shopping mall monitoring environment includes:

[0083] an acquisition module 21 for acquiring a child feature in the image, and extracting the child feature through a convolutional neural network to obtain a first child feature;

[0084] A processing module 22 is configured to process the first child feature through an optimization module to obtain a child multi-label feature; wherein the optimization module includes a first optimization module and a second optimization module;

[0085] The processing module includes:

[0086] A weight analysis submodule, configured to perform a weight analysis on the first child feature using a first optimization module to obtain a first child weight feature; wherein the first optimization module is a combination of an SE module added to C2-C4 in a Resnet-50 module;

[0087] The classification submodule is used to input the first child weight feature into the second optimization module for feature classification processing to obtain the child multi-label feature; wherein, the second optimization module is a combination of replacing the C5 in the Resnet-50 module with the multi-head self-attention mechanism module.

[0088] See Figure 3 , Figure 3 This is a schematic diagram of the multi-label classification features of the first child in one embodiment of the present invention, including gender, hair length, estimated height, age, whether wearing glasses, clothing color, trouser length, shoe style, etc.

[0089] In this embodiment, for the specific implementation of each unit in the above device embodiment, please refer to the above method embodiment, which will not be repeated here.

[0090] Reference Figure 4 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 4 As shown. The computer device includes a processor, memory, display screen, input device, network interface and database connected via a system bus. The processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the above method is implemented.

[0091] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0092] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the above-described method when executed by a processor. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0093] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware using a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media provided herein and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM.

[0094] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.

[0095] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for extracting children's features in a shopping mall monitoring environment, characterized by: The following steps are involved: Acquire a child feature in the image, and extract the child feature through a convolutional neural network to obtain a first child feature; Processing the first child feature through an optimization module to obtain a child multi-label feature; wherein the optimization module includes a first optimization module and a second optimization module; The processing of the first child feature by the optimization module to obtain the child multi-label feature comprises the following steps: Performing a weight analysis on the first child feature through a first optimization module; obtaining a first child weight feature; wherein the first optimization module is a combination of adding an SE module to C2-C4 in a Resnet-50 module, the SE module is used to enhance the convolutional neural network to extract the child feature, and the Resnet-50 module is used to quickly obtain the first child feature for identity recognition; The first child weight feature is input into the second optimization module for feature classification processing to obtain the child multi-label feature; wherein the second optimization module is a combination of replacing the C5 in the Resnet-50 module with a multi-head self-attention mechanism module.

2. The method for extracting children's features in a shopping mall monitoring environment according to claim 1, characterized in that: The optimization module also includes a function module, which inputs the first child weight feature into a function model to obtain a second child weight feature, and determines whether the second child weight feature has a child attribute. If not, it is fed back to the optimization module. If so, the child multi-label feature is output. The function model is used to determine whether the first child weight feature belongs to the attribute possessed by a child.

3. The method for extracting children's features in a shopping mall monitoring environment according to claim 2, characterized in that: The inputting the first child weight feature into the function model to obtain the second child weight feature comprises: The first child weight feature is input into the Excitation module, and the activation value of the channel corresponding to the first child weight feature is adjusted based on the sigmoid activation function in the Excitation module; the second child weight feature is obtained; and the Excitation module is used to calculate the first child weight feature.

4. The method for extracting children's features in a shopping mall monitoring environment according to claim 1, characterized in that: Performing weight analysis on the first child feature by a first optimization module; The first child weight features are: Acquire the first child feature, and input the first child feature into a first optimization module; wherein the SE module includes a Squeeze module; Based on the Squeeze module, the channel of each of the first child features is compressed to obtain the first child weighted feature; wherein the Squeeze module is used to compress the channel of the first child feature.

5. The method for extracting children's features in a shopping mall monitoring environment according to claim 1, characterized in that: The first child weight feature is input into the second optimization module for feature classification processing, and the obtained child multi-label features include: Obtaining the first child weight feature, extracting the first child weight feature to obtain a first child multi-label classification feature vector, inputting the first child multi-label classification feature vector into a query matrix and a key matrix in a conversion matrix to obtain a matrix of the first child multi-label classification feature; The matrix of the first child multi-label classification feature is obtained by the inner product of the query matrix and the key matrix to obtain a first matrix; wherein the first matrix is ​​processed by the softmax module to obtain a self-attention coefficient matrix A, and the attention coefficient matrix A is the correlation distribution of the first child multi-label classification feature; wherein the softmax module is used to convert the value of the first matrix into the value of the correlation distribution of the first child multi-label classification feature; The vector of the attention coefficient matrix A is added to the vector product of the value matrix to obtain the child multi-label feature.

6. The method for extracting children's features in a shopping mall monitoring environment according to claim 5, characterized in that: The first child multi-label classification feature vector is input into the query matrix and the key matrix in the transformation matrix to obtain each first child multi-label classification feature vector, and a two-dimensional position encoding is introduced. The two-dimensional position encoding is used to capture the absolute information and relative information between the first child multi-label classification feature vectors.

7. The method for extracting children's features in a shopping mall monitoring environment according to claim 1, characterized in that: The step of obtaining the child features in the image includes: Acquire training data and perform training optimization on the training data; wherein the training optimization includes one or more of the following: (1) randomly increasing or decreasing the brightness of an image; (2) randomly adding shadows to an image; (3) performing mosaic enhancement on an image; Divide the optimized training data into training set and test set; The convolutional neural network is trained and tested based on the training set and the test set.

8. A device for extracting children's features in a shopping mall monitoring environment, characterized in that: include: An acquisition module, used for acquiring a child feature in the image, extracting the child feature through a convolutional neural network to obtain a first child feature; A processing module, configured to process the first child feature through an optimization module to obtain a child multi-label feature; wherein the optimization module includes a first optimization module and a second optimization module; The processing module comprises: A weight analysis submodule, used for performing weight analysis on the first child feature through a first optimization module to obtain a first child weight feature; wherein the first optimization module is a combination of adding the SE module to C2-C4 in the Resnet-50 module; The classification submodule is used to input the first child weight feature into the second optimization module for feature classification processing to obtain the child multi-label feature; wherein the second optimization module is a combination of replacing the C5 in the Resnet-50 module with a multi-head self-attention mechanism module.

9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, 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 having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.