Juvenile identification method and device

By combining human face characteristics and dressing features, the age of pedestrians in the video stream solves the problem of low accuracy of minor recognition accuracy in existing technologies, and achieves higher recognition accuracy.

CN119360418APending Publication Date: 2025-01-24E SURFING VISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411486493.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing minor recognition methods only rely on facial features, have low accuracy, making it difficult to effectively identify minors.

Method used

By combining human face characteristics and dressing features, predict the age of pedestrians from the video stream, and determine whether it is a minor. Specific steps include: obtain monitoring videos, detect pedestrians, extract face and human characteristics, use the CNN model to predict age, and judge whether it is minor based on the prediction results.

Benefits of technology

Improve the accuracy of underage recognition, and to enhance the accuracy of identification through multi -scale characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119360418A_ABST
    Figure CN119360418A_ABST
Patent Text Reader

Abstract

The invention relates to a juvenile identification method and device, and belongs to the technical field of juvenile identification, and the method comprises the steps: obtaining a monitoring video in a to-be-identified juvenile scene; performing frame extraction and decoding on a video stream in the monitoring video to obtain a picture, and inputting the picture into the Yolo pedestrian detection model to detect whether there is a pedestrian; if the pedestrian is detected, intercepting the pedestrian to obtain a pedestrian picture; inputting the pedestrian picture into a Yolo human face and human body detection model to detect whether a human face and a human body exist in the pedestrian picture; if the detection result is that both the face and the human body exist, intercepting a face picture, inputting the face picture into a CNN face age recognition model to output a predicted age a1 of the face picture, and inputting the human body picture into a CNN pedestrian age group classification model to output a pedestrian clothing applicable age group classification result a2; predicting the age b of the pedestrian according to a1 and a2; and judging whether juveniles exist or not according to b. According to the invention, the precision of juvenile identification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of minor identification, and in particular, relates to a method and device for minor identification. Background Art

[0002] Computer vision is an important branch of artificial intelligence, which aims to study how to make computers perceive, analyze and process the real world intelligently like the human visual system. Various computer vision algorithms with images and videos as information carriers have long penetrated into people's daily lives, such as face recognition, human-computer interaction, product retrieval, intelligent monitoring, visual navigation, etc. Video target retrieval, as one of the basic and important research directions in the field of computer vision, has always been a hot topic for researchers. For example, face recognition in security scenarios is to compare the features of sample faces with the faces appearing in the video to find the location of people who are similar or identical to the sample faces. In the security license plate recognition scenario, the license plates of the vehicles appearing in the video are analyzed to obtain the corresponding license plate numbers of the vehicles, so as to identify the vehicles of interest; the existing methods for identifying minors only use facial features to identify age and determine whether the target is a minor, which has low accuracy. Summary of the invention

[0003] In view of the above deficiencies in the prior art, the purpose of the invention is to provide a method and device for identifying minors, which predicts the age of pedestrians in a video stream based on two scales: facial features and clothing features, so as to identify whether the pedestrian target is a minor. Compared with the method of identifying minors based only on facial features, the accuracy of identifying minors is improved.

[0004] The first aspect of the present invention provides a method for identifying minors, comprising seven steps S1 to S7:

[0005] S1: Obtain surveillance video of the scene where the minor is to be identified;

[0006] S2: extract frames and decode the video stream in the surveillance video to obtain a picture, and input the picture into the Yolo pedestrian detection model to detect whether there is a pedestrian in the picture;

[0007] S3: If the detection result is that there is a pedestrian in the picture, capture the pedestrian in the picture to obtain a pedestrian picture;

[0008] S4: inputting the pedestrian image into a Yolo face and body detection model to detect whether there is a face or a body in the pedestrian image;

[0009] S5: If the detection result shows that the pedestrian image contains both a face and a body, capture the face image in the pedestrian image, input the face image into the CNN face age recognition model to output the predicted age a1 of the face image, and input the body image into the CNN pedestrian age group classification model to output the pedestrian clothing applicable age group classification result a2;

[0010] S6: predict the pedestrian’s age b according to the formula q*a1+(1-q)*a2;

[0011] S7: judging whether there is a minor in the surveillance video of the scene where the minor is to be identified according to the age b of the pedestrian;

[0012] Among them, q represents the weight set according to demand.

[0013] Furthermore, the above-mentioned method for identifying minors further includes:

[0014] If the detection result shows that there is only a face in the pedestrian image, capture the face image in the pedestrian image, input the face image into the CNN face age recognition model, and output the predicted age a1 of the face image;

[0015] It is determined whether there are minors in the surveillance video of the scene where minors are to be identified based on the predicted age a1.

[0016] Furthermore, the above-mentioned method for identifying minors further includes:

[0017] If the detection result shows that there is no pedestrian in the image, the process is restarted from step S2.

[0018] Furthermore, the above-mentioned method for identifying minors further includes:

[0019] If the detection result is that there is no face in the pedestrian image, re-execute from step S2.

[0020] Furthermore, in the above-mentioned method for identifying minors, the human body image is input into the CNN pedestrian age classification model to output the pedestrian clothing applicable age classification result a2, including:

[0021] Use CNN neural network to extract features from human body images to obtain two different sets of features;

[0022] The two sets of different features are concatenated to obtain fused features;

[0023] The fused features are passed through a fully connected layer to obtain a feature vector;

[0024] Predict human age group through feature vector;

[0025] The training strategy of the CNN pedestrian age classification model is: use e-commerce model pictures to train the model parameters. The training set annotation information includes clothing model age classification labels and clothing multi-attribute labels;

[0026] The inference strategy of the CNN pedestrian age classification model is to output the prediction of the applicable age group of the pedestrian clothing instead of the clothing attribute prediction for the input human body image.

[0027] Furthermore, in the above-mentioned method for identifying minors, the training method of the CNN pedestrian age classification model includes:

[0028] The first set of features in the two different sets of features is passed through the sigmoid function, and the binary cross entropy loss function is used to calculate the multi-label prediction loss of clothing attributes;

[0029] After the fused features are processed by the softmax function, the multi-category cross entropy loss function is used to calculate the single-label prediction loss of the applicable age group of pedestrian clothing;

[0030] The binary cross entropy loss function and the multi-category cross entropy loss function jointly guide the model training process.

[0031] Furthermore, in the above-mentioned method for identifying minors, the age classification labels of clothing models include at least: infants, children, teenagers, middle-aged, and middle-aged and elderly;

[0032] The multi-attribute labels of clothing include at least: basic style labels, color labels, style labels, occasion labels and matching item labels.

[0033] A second aspect of the present invention further provides a device for identifying minors, comprising:

[0034] Acquisition module: used to acquire surveillance videos of scenes where minors are to be identified;

[0035] The first input module is used to extract frames and decode the video stream in the surveillance video to obtain a picture, and input the picture into the Yolo pedestrian detection model to detect whether there is a pedestrian in the picture;

[0036] Interception module: used to intercept the pedestrian in the picture to obtain the pedestrian picture if the detection result is that there is a pedestrian in the picture;

[0037] Detection module: used to input pedestrian pictures into the Yolo face and body detection model to detect whether there are faces and bodies in the pedestrian pictures;

[0038] The second input module is used for, if the detection result shows that the pedestrian picture contains both a face and a body, intercepting the face picture in the pedestrian picture, inputting the face picture into the CNN face age recognition model to output the predicted age a1 of the face picture, and inputting the body picture into the CNN pedestrian age classification model to output the pedestrian clothing applicable age classification result a2;

[0039] Prediction module: used to predict the pedestrian’s age b according to the formula q*a1+(1-q)*a2;

[0040] Judgment module: used to judge whether there are minors in the surveillance video of the scene where minors are to be identified according to the age b of the pedestrian;

[0041] Among them, q represents the weight set according to demand.

[0042] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory;

[0043] The processor calls the program or instruction stored in the memory to execute any of the above methods for identifying minors.

[0044] The fourth aspect of the present invention also proposes a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute any one of the above methods for identifying minors.

[0045] The beneficial effects of the present invention are as follows: the present invention obtains surveillance video in the scene of minors to be identified; extracts frames and decodes the video stream in the surveillance video to obtain pictures, and inputs the pictures into the Yolo pedestrian detection model to detect whether there are pedestrians in the pictures; if the detection result is that there are pedestrians, the pedestrians are intercepted to obtain pedestrian pictures; the pedestrian pictures are input into the Yolo face and body detection model to detect whether there are faces and bodies in the pedestrian pictures; if the detection result contains both faces and bodies, the face pictures are intercepted, the face pictures are input into the CNN face age recognition model to output the predicted age a1 of the face pictures, and the body pictures are input into the CNN pedestrian age classification model to output the applicable age classification result a2 of the pedestrian clothing; the pedestrian's age b is predicted based on a1 and a2; and whether there are minors is determined based on the pedestrian's age b. The present invention predicts the age of pedestrians in the video stream from two scales, namely, facial features and clothing features, so as to identify whether the pedestrian target is a minor. Compared with the method of identifying minors based only on facial features, the accuracy of identifying minors is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

[0047] Figure 1 A method for identifying minors provided in an embodiment of the present invention Figure 1 ;

[0048] Figure 2 A method for identifying minors provided in an embodiment of the present invention Figure 2 ;

[0049] Figure 3 A method diagram of inputting a human body picture into a CNN pedestrian age classification model to output a pedestrian clothing applicable age classification result provided by an embodiment of the present invention;

[0050] Figure 4 A diagram of a training method for a CNN pedestrian age classification model provided in an embodiment of the present invention;

[0051] Figure 5 A diagram of a minor identification device provided in an embodiment of the present invention;

[0052] Figure 6 A schematic block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.

[0054] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.

[0055] In the description of the present invention, the terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be internal communication between two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0056] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.

[0057] The present invention proposes a method, device, electronic device and storage medium for identifying minors. The method predicts the age of pedestrians in a video stream based on two scales: facial features and clothing features, thereby identifying whether the pedestrian target is a minor. Compared with the method of identifying minors based only on facial features, the accuracy of identifying minors is improved.

[0058] Before introducing the embodiments of the present invention, professional terms involved in the present invention are first introduced.

[0059] CNN (Convolutional Neural Network): A deep learning model that has achieved great success in the field of computer vision. Their design is inspired by the visual system in biology and aims to simulate the way human vision processes. In the past few years, CNN has made significant progress in image recognition, object detection, image generation and many other fields, becoming an important part of computer vision and deep learning research.

[0060] Yolo: (Target Detection Model): is a real-time target detection system. Since it was proposed by Joseph Redmon et al. in 2015, it has undergone multiple updates and iterations, including Yolo v1 to Yolo v8.

[0061] Method Embodiment

[0062] Figure 1 A method for identifying minors provided in an embodiment of the present invention Figure 1 .

[0063] The first aspect of the present invention provides a method for identifying minors, comprising seven steps S1 to S7:

[0064] S1: Obtain surveillance video of the scene where minors are to be identified.

[0065] Specifically, in the embodiment of the present invention, the surveillance video may be a surveillance video of a specific scene, such as a surveillance video of an Internet cafe, an arcade, or the like.

[0066] It should be understood that in the present invention, the acquisition of surveillance videos in scenes where minors are to be identified and the subsequent processing steps of the video streams in the surveillance videos are all subject to user permission and authorization and comply with local laws and administrative regulations.

[0067] S2: Extract frames and decode the video stream in the surveillance video to obtain images, and input the images into the Yolo pedestrian detection model to detect whether there are pedestrians in the images.

[0068] Specifically, in an embodiment of the present invention, the Yolo pedestrian detection model uses the Yolo algorithm to detect pedestrian targets appearing in the monitoring screen, obtains a picture by extracting frames and decoding the video stream in the monitoring video, and inputs the picture into the Yolo pedestrian detection model to detect whether there are pedestrian targets in the picture.

[0069] S3: If the detection result shows that there is a pedestrian in the image, the pedestrian in the image is captured to obtain a pedestrian image.

[0070] Specifically, in the embodiment of the present invention, if a pedestrian is detected in the picture by the Yolo pedestrian detection model, the pedestrian in the picture is intercepted according to the coordinates to obtain a pedestrian picture.

[0071] S4: Input the pedestrian image into the Yolo face and body detection model to detect whether there are faces and bodies in the pedestrian image.

[0072] Specifically, in the embodiment of the present invention, for the captured pedestrian image, the Yolo face and body detection model is used to detect whether there is a face and body of a pedestrian in the pedestrian image.

[0073] S5: If the detection result shows that there are both faces and bodies in the pedestrian image, capture the face image in the pedestrian image, input the face image into the CNN face age recognition model to output the predicted age a1 of the face image, and input the body image into the CNN pedestrian age group classification model to output the classification result a2 of the applicable age group of the pedestrian clothing.

[0074] Specifically, in an embodiment of the present invention, if the detection result of the Yolo face and body detection model is that there are both faces and bodies in the pedestrian picture, the face picture and the body picture are respectively captured according to the picture, the face picture is input into the CNN face age recognition model to predict the corresponding age of the face picture, and the body picture is input into the CNN pedestrian age group classification model to output the classification result a2 of the applicable age group of the pedestrian clothing.

[0075] For example, if the CNN pedestrian age classification model predicts that the applicable age group of the clothing is infants, then a2=6; if the CNN pedestrian age classification model predicts that the applicable age group of the clothing is teenagers, then a2=9; if the CNN pedestrian age classification model predicts that the applicable age group of the clothing is adolescents, then a2=18; if the CNN pedestrian age classification model predicts that the applicable age group of the clothing is middle-aged, then a2=45; if the CNN pedestrian age classification model predicts that the applicable age group of the clothing is middle-aged and elderly, then a2=60.

[0076] S6: Predict the pedestrian’s age b according to the formula q*a1+(1-q)*a2.

[0077] Specifically, in the embodiment of the present invention, q in the formula q*a1+(1-q)*a2 represents a weight set according to demand, and b=q*a1+(1-q)*a2.

[0078] S7: Determine whether there is a minor in the surveillance video of the scene where the minor is to be identified based on the age b of the pedestrian.

[0079] Specifically, in the embodiment of the present invention, if q*a1+(1-q)*a2<18, it is determined that there are minors in the surveillance video of the scene where minors are to be identified.

[0080] In some embodiments, after determining that the person is a minor, the administrator in the scene may also be reminded through a prompt message.

[0081] Figure 2 A method for identifying minors provided in an embodiment of the present invention Figure 2 .

[0082] Furthermore, the above-mentioned method for identifying minors is combined with Figure 2 , and also includes two steps S21 to S22:

[0083] S21: If the detection result shows that there is only a face in the pedestrian image, capture the face image in the pedestrian image, input the face image into the CNN face age recognition model, and output the predicted age a1 of the face image;

[0084] S22: Determine whether there are minors in the surveillance video of the scene where minors are to be identified based on the predicted age a1.

[0085] Specifically, in an embodiment of the present invention, if the detection result of the Yolo face and body detection model is that there is only a face in the pedestrian picture, the face picture is captured according to the coordinates, and the face picture is input into the CNN face age recognition model to predict the corresponding age of the face picture, such as a1=17, and it is determined whether there are minors in the surveillance video of the scene of minors to be identified based on the predicted age a1.

[0086] Furthermore, the above-mentioned method for identifying minors further includes:

[0087] If the detection result shows that there is no pedestrian in the image, the process is restarted from step S2.

[0088] Specifically, in the embodiment of the present invention, the picture is input into the Yolo pedestrian detection model. If there is no pedestrian in the detection result picture, the next picture is input into the Yolo pedestrian detection model for detection starting from step S2.

[0089] Furthermore, the above-mentioned method for identifying minors further includes:

[0090] If the detection result is that there is no face in the pedestrian image, re-execute from step S2.

[0091] Specifically, in the embodiment of the present invention, if the detection result of the Yolo face and body detection model is that there is no face in the pedestrian picture, the next picture is input into the Yolo pedestrian detection model for detection starting from step S2.

[0092] Figure 3 A method diagram of an embodiment of the present invention provides a method of inputting a human body image into a CNN pedestrian age classification model to output a classification result of the age group applicable to pedestrian clothing.

[0093] Furthermore, in the above-mentioned method for identifying minors, the human body image is input into the CNN pedestrian age classification model to output the pedestrian clothing applicable age classification result a2, combined with Figure 3 , including four steps from S31 to S34:

[0094] S31: Use CNN neural network to extract features from human body images to obtain two different sets of features.

[0095] Specifically, in the embodiment of the present invention, a CNN neural network is used to extract features from pedestrian images, and two different groups of features are extracted, namely, n-dimensional feature 1 and m-dimensional feature 2.

[0096] S32: Concatenate two different sets of features to obtain fused features.

[0097] Specifically, in the embodiment of the present invention, after feature 1 and feature 2 are concatenated, a (n+m)-dimensional fusion feature 3 is obtained.

[0098] S33: The fused features are passed through a fully connected layer to obtain a feature vector.

[0099] Specifically, in the embodiment of the present invention, feature 3 passes through a fully connected layer to finally obtain a 5-dimensional feature vector.

[0100] S34: Predict human age group through feature vector.

[0101] Specifically, in the embodiment of the present invention, the age group of a human body is predicted by a 5-dimensional feature vector.

[0102] The training strategy of the CNN pedestrian age classification model is: use e-commerce model pictures to train the model parameters. The training set annotation information includes clothing model age classification labels and clothing multi-attribute labels;

[0103] The inference strategy of the CNN pedestrian age classification model is to output the prediction of the applicable age group of the pedestrian clothing instead of the clothing attribute prediction for the input human body image.

[0104] Specifically, in an embodiment of the present invention, during model training, clothing attributes are used to guide the model to classify pedestrian age groups; during model inference, pedestrian images are input, the prediction of clothing label attributes is ignored, and only the prediction of the pedestrian age group is output.

[0105] Figure 4 A diagram of a training method for a CNN pedestrian age classification model provided in an embodiment of the present invention.

[0106] Furthermore, in the above-mentioned method for identifying minors, the training method of the CNN pedestrian age classification model is combined with Figure 4 , including two steps from S41 to S43:

[0107] S41: After the first set of features in the two different sets of features are processed by the sigmoid function, the binary cross entropy loss function is used to calculate the multi-label prediction loss of clothing attributes;

[0108] S42: After the fused features are processed by the softmax function, the multi-category cross entropy loss function is used to calculate the single-label prediction loss of the applicable age group of pedestrian clothing;

[0109] S43: The binary cross entropy loss function and the multi-category cross entropy loss function jointly guide the model training process.

[0110] Specifically, in the embodiment of the present invention, after feature 1 passes through the sigmoid function, the binary cross entropy loss function is used to calculate the multi-label prediction loss function of clothing attributes; after the fusion feature 3 passes through the softmax function, the multi-category cross entropy loss function is used to calculate the single-label prediction loss function of the pedestrian age group. The binary cross entropy loss function and the multi-category cross entropy loss function jointly guide the training process of the model.

[0111] Furthermore, in the above-mentioned method for identifying minors, the age classification labels of clothing models include at least: infants, children, teenagers, middle-aged, and middle-aged and elderly;

[0112] The multi-attribute labels of clothing include at least: basic style labels, color labels, style labels, occasion labels and matching item labels.

[0113] Specifically, in the embodiment of the present invention, the basic style labels include at least: T-shirts, shirts, dresses, jackets, jeans, casual pants, sneakers, casual shoes; the color labels include at least: red, blue, green, white, black; the style labels include at least: casual, business, sports, retro, sweet; the suitable occasion labels include at least: home, travel, work, banquet; the matching items include at least: pants, skirts, shoes, socks, scarves, hats, glasses, gloves, handbags.

[0114] Device Embodiment

[0115] Figure 5 A diagram of a device for identifying minors provided in an embodiment of the present invention.

[0116] In a second aspect of the present invention, a device for identifying minors is provided, Figure 5 ,include:

[0117] Acquisition module 51: used to acquire surveillance video of the scene where minors are to be identified.

[0118] Specifically, in the embodiment of the present invention, the surveillance video acquired by the acquisition module 51 may be a surveillance video of a specific scene, such as a surveillance video of an Internet cafe, an arcade, or the like.

[0119] The first input module 52 is used to extract frames and decode the video stream in the monitoring video to obtain a picture, and input the picture into the Yolo pedestrian detection model to detect whether there is a pedestrian in the picture.

[0120] Specifically, in an embodiment of the present invention, the Yolo pedestrian detection model uses the Yolo algorithm to detect pedestrian targets appearing in the monitoring screen, and obtains a picture by extracting frames and decoding the video stream in the monitoring video. The first input module 52 inputs the picture into the Yolo pedestrian detection model to detect whether there are pedestrian targets in the picture.

[0121] The interception module 53 is used to intercept the pedestrian in the picture to obtain a pedestrian picture if the detection result shows that there is a pedestrian in the picture.

[0122] Specifically, in the embodiment of the present invention, if a pedestrian is detected in the picture by the Yolo pedestrian detection model, the interception module 53 intercepts the pedestrian in the picture according to the coordinates to obtain a pedestrian picture.

[0123] Detection module 54: used to input the pedestrian image into the Yolo face and body detection model to detect whether there are faces and bodies in the pedestrian image.

[0124] Specifically, in the embodiment of the present invention, for the captured pedestrian image, the detection module 54 uses the Yolo face and body detection model to detect whether there is a pedestrian's face and body in the pedestrian image.

[0125] The second input module 55 is used to intercept the face picture in the pedestrian picture if the detection result shows that the pedestrian picture contains both a face and a body, input the face picture into the CNN face age recognition model to output the predicted age a1 of the face picture, and input the body picture into the CNN pedestrian age group classification model to output the classification result a2 of the applicable age group of the pedestrian's clothing.

[0126] Specifically, in an embodiment of the present invention, if the detection result of the Yolo face and body detection model is that there are both faces and bodies in the pedestrian picture, the face picture and the body picture are respectively captured according to the picture, and the second input module 55 inputs the face picture into the CNN face age recognition model to predict the corresponding age of the face picture, and inputs the body picture into the CNN pedestrian age group classification model to output the classification result a2 of the applicable age group of the pedestrian clothing.

[0127] For example, if the CNN pedestrian age classification model predicts that the applicable age group of the clothing is infants, then a2=6; if the CNN pedestrian age classification model predicts that the applicable age group of the clothing is teenagers, then a2=9; if the CNN pedestrian age classification model predicts that the applicable age group of the clothing is adolescents, then a2=18; if the CNN pedestrian age classification model predicts that the applicable age group of the clothing is middle-aged, then a2=45; if the CNN pedestrian age classification model predicts that the applicable age group of the clothing is middle-aged and elderly, then a2=60.

[0128] Prediction module 56: used to predict the age b of the pedestrian according to the formula q*a1+(1-q)*a2.

[0129] Specifically, in the embodiment of the present invention, the prediction module 56 predicts the age b of the pedestrian according to the formula q*a1+(1-q)*a2, where q represents a weight value set according to demand.

[0130] The judgment module 57 is used to judge whether there are minors in the surveillance video of the scene where minors are to be identified according to the age b of the pedestrian.

[0131] Specifically, in the embodiment of the present invention, if the judgment module 57 determines that q*a1+(1-q)*a2<18, it is determined that there are minors in the surveillance video of the scene where minors are to be identified.

[0132] In some embodiments, after determining that the person is a minor, the administrator in the scene may also be reminded through a prompt message.

[0133] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory;

[0134] The processor calls the program or instruction stored in the memory to execute any of the above methods for identifying minors.

[0135] The fourth aspect of the present invention also proposes a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute any one of the above methods for identifying minors.

[0136] Figure 6 It is a schematic block diagram of an electronic device provided by an embodiment of the present invention.

[0137] like Figure 6 As shown, the electronic device includes: at least one processor 601, at least one memory 602 and at least one communication interface 603. The various components in the electronic device are coupled together through a bus system 604. The communication interface 603 is used to transmit information between external devices. It can be understood that the bus system 604 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 604 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 6 Various buses are labeled as bus system 604 .

[0138] It can be understood that the memory 602 in this embodiment can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.

[0139] In some implementations, the memory 602 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system and application programs.

[0140] The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. A program that implements any method of a method for identifying minors provided in an embodiment of the present invention can be included in the application.

[0141] In an embodiment of the present invention, the processor 601 calls a program or instruction stored in the memory 602, specifically, a program or instruction stored in an application, and the processor 601 is used to execute the steps of each embodiment of a method for identifying minors provided in an embodiment of the present invention.

[0142] S1: Obtain surveillance video of the scene where the minor is to be identified;

[0143] S2: extract frames and decode the video stream in the surveillance video to obtain a picture, and input the picture into the Yolo pedestrian detection model to detect whether there is a pedestrian in the picture;

[0144] S3: If the detection result is that there is a pedestrian in the picture, capture the pedestrian in the picture to obtain a pedestrian picture;

[0145] S4: Input the pedestrian image into the Yolo face and body detection model to detect whether there is a face and a body in the pedestrian image;

[0146] S5: If the detection result shows that there are both faces and bodies in the pedestrian picture, intercept the face picture in the pedestrian picture, input the face picture into the CNN face age recognition model to output the predicted age a1 of the face picture, and input the body picture into the CNN pedestrian age group classification model to output the pedestrian clothing applicable age group classification result a2;

[0147] S6: predict the pedestrian’s age b according to the formula q*a1+(1-q)*a2;

[0148] S7: judging whether there is a minor in the surveillance video of the scene where the minor is to be identified according to the age b of the pedestrian;

[0149] Among them, q represents the weight set according to demand.

[0150] Any method in the method for identifying minors provided in an embodiment of the present invention can be applied to the processor 601, or implemented by the processor 601. The processor 601 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 601 or instructions in the form of software. The above-mentioned processor 601 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0151] The steps of any method in the method for identifying minors provided in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software units in the decoding processor. The software unit can be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the method in combination with its hardware.

[0152] Those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present invention and to form different embodiments.

[0153] Those skilled in the art will appreciate that the description of each embodiment has its own emphasis, and for parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0154] Although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

[0155] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for identifying minors, characterized in that: It includes seven steps from S1 to S7: S1: Obtain surveillance video of the scene where the minor is to be identified; S2: extract frames and decode the video stream in the surveillance video to obtain a picture, and input the picture into the Yolo pedestrian detection model to detect whether there is a pedestrian in the picture; S3: If the detection result is that there is a pedestrian in the picture, capture the pedestrian in the picture to obtain a pedestrian picture; S4: inputting the pedestrian image into a Yolo face and body detection model to detect whether there is a face or a body in the pedestrian image; S5: If the detection result shows that the pedestrian image contains both a face and a body, capture the face image in the pedestrian image, input the face image into the CNN face age recognition model to output the predicted age a1 of the face image, and input the body image into the CNN pedestrian age group classification model to output the pedestrian clothing applicable age group classification result a2; S6: predict the pedestrian’s age b according to the formula q*a1+(1-q)*a2; S7: judging whether there is a minor in the surveillance video of the scene where the minor is to be identified according to the age b of the pedestrian; Among them, q represents the weight set according to demand.

2. A method for identifying minors according to claim 1, characterized in that: The method further comprises: If the detection result shows that there is only a face in the pedestrian picture, intercept the face picture in the pedestrian picture, input the face picture into the CNN face age recognition model to output the predicted age a1 of the face picture; It is determined whether there are minors in the surveillance video of the scene where minors are to be identified based on the predicted age a1.

3. A method for identifying minors according to claim 1, characterized in that: The method further comprises: If the detection result is that there is no pedestrian in the image, the process is restarted from step S2.

4. A method for identifying minors according to claim 1, characterized in that: The method further comprises: If the detection result is that there is no face in the pedestrian image, the process is repeated from step S2.

5. A method for identifying minors according to claim 1, characterized in that: The step of inputting the human body image into the CNN pedestrian age classification model to output the pedestrian clothing applicable age classification result a2 includes: Use CNN neural network to extract features from human body images to obtain two different sets of features; The two sets of different features are concatenated to obtain fused features; The fused features are passed through a fully connected layer to obtain a feature vector; Predict human age group through feature vector; The training strategy of the CNN pedestrian age classification model is: using e-commerce model pictures to train model parameters, and the training set annotation information includes clothing model age classification labels and clothing multi-attribute labels; The reasoning strategy of the CNN pedestrian age classification model is to not output clothing attribute predictions for input human body images, but only output predictions of the age groups applicable to the pedestrian clothing.

6. A method for identifying minors according to claim 5, characterized in that: The training method of the CNN pedestrian age classification model includes: After the first set of features in the two different sets of features are processed by the sigmoid function, the binary cross entropy loss function is used to calculate the multi-label prediction loss of clothing attributes; After the fused features are processed by the softmax function, the multi-category cross entropy loss function is used to calculate the single-label prediction loss of the applicable age group of pedestrian clothing; The binary cross entropy loss function and the multi-category cross entropy loss function jointly guide the model training process.

7. A method for identifying minors according to claim 5, characterized in that: The age classification labels of the clothing models include at least: infants, children, teenagers, middle-aged, and middle-aged and elderly; The clothing multi-attribute label includes at least: a basic style label, a color label, a style label, a suitable occasion label and a matching item label.

8. A device for identifying minors, characterized in that: include: Acquisition module: used to acquire surveillance videos of scenes where minors are to be identified; The first input module is used to extract frames and decode the video stream in the surveillance video to obtain a picture, and input the picture into the Yolo pedestrian detection model to detect whether there is a pedestrian in the picture; A capture module: used for capturing the pedestrian in the picture to obtain a pedestrian picture if the detection result shows that there is a pedestrian in the picture; Detection module: used to input the pedestrian picture into the Yolo face and body detection model to detect whether there is a face or a body in the pedestrian picture; The second input module is used for, if the detection result shows that the pedestrian picture contains both a face and a body, intercepting the face picture in the pedestrian picture, inputting the face picture into the CNN face age recognition model to output the predicted age a1 of the face picture, and inputting the body picture into the CNN pedestrian age group classification model to output the pedestrian clothing applicable age group classification result a2; Prediction module: used to predict the pedestrian’s age b according to the formula q*a1+(1-q)*a2; A judgment module: used for judging whether there is a minor in the surveillance video of the scene to be identified as a minor according to the age b of the pedestrian; Among them, q represents the weight set according to demand.

9. An electronic device, characterized in that: include: Processor and memory; The processor is used to execute a method for identifying minors as described in any one of claims 1 to 7 by calling the program or instructions stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores programs or instructions, and the programs or instructions enable a computer to execute a method for identifying minors as described in any one of claims 1 to 7.