WO2022247343A1 - Recognition model training method and apparatus, recognition method and apparatus, device, and storage medium - Google Patents

Recognition model training method and apparatus, recognition method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2022247343A1
WO2022247343A1 PCT/CN2022/075119 CN2022075119W WO2022247343A1 WO 2022247343 A1 WO2022247343 A1 WO 2022247343A1 CN 2022075119 W CN2022075119 W CN 2022075119W WO 2022247343 A1 WO2022247343 A1 WO 2022247343A1
Authority
WO
WIPO (PCT)
Prior art keywords
target object
data
recognition model
image
prediction data
Prior art date
Application number
PCT/CN2022/075119
Other languages
French (fr)
Chinese (zh)
Inventor
苏翔博
王健
孙昊
Original Assignee
北京百度网讯科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京百度网讯科技有限公司 filed Critical 北京百度网讯科技有限公司
Priority to JP2022544196A priority Critical patent/JP2023530796A/en
Priority to KR1020227025100A priority patent/KR20220110321A/en
Publication of WO2022247343A1 publication Critical patent/WO2022247343A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/103Static body considered as a whole, e.g. static pedestrian or occupant recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/40Spoof detection, e.g. liveness detection
    • G06V40/45Detection of the body part being alive
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/12Bounding box

Definitions

  • the present disclosure relates to the technical field of artificial intelligence, in particular to the technical fields of deep learning and computer vision, and can be applied in smart cities and smart traffic scenarios.
  • Target recognition is an important means and purpose of image processing. Through target recognition, objects in videos, static images, human bodies, animals and other target objects can be recognized, and various uses such as identity authentication and security inspection can be realized based on the recognition results. .
  • the present disclosure provides a recognition model training method, a recognition method, a device, a device and a storage medium.
  • a recognition model training method including:
  • Output at least one feature map of the image to be processed through the feature output layer of the recognition model to be trained
  • the recognition model to be trained is optimized to obtain the trained recognition model.
  • an identification method including:
  • the recognition model is provided by any embodiment of the present disclosure The trained recognition model.
  • a recognition model training device including:
  • the first input module is used to input the image to be processed into the recognition model to be trained
  • the feature map module is used to output at least one feature map of the image to be processed through the feature output layer of the recognition model to be trained;
  • the prediction data module is used to obtain the prediction data of the first target object in the image to be processed and the prediction data of the first target object in the image to be processed according to at least one feature map through the head of the recognition model to be trained associated predicted data for the second target object;
  • the training module is used to optimize the recognition model to be trained according to the prediction data of the first target object, the prediction data of the second target object, the label data of the first target object and the label data of the second target object, and obtain the recognition after training Model.
  • an identification device including:
  • the second input module is used to input the image to be recognized into the recognition model, and obtain the prediction data of the first target object in the image to be recognized and the prediction data of the second target object associated with the first target object.
  • the recognition model is any of the present disclosure.
  • An embodiment provides a trained recognition model.
  • an electronic device including:
  • the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method in any embodiment of the present disclosure.
  • a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method in any embodiment of the present disclosure.
  • a computer program product including a computer program, and when the computer program is executed by a processor, the method in any embodiment of the present disclosure is implemented.
  • the prediction data of the first target object and the second target object can be obtained through the recognition model to be trained, and the recognition model to be trained can be optimized and trained according to the prediction data and label data, and the obtained recognition model is accurate to the first
  • the recognition of the target object and the second target object related to the first target object can realize the associated recognition of at least two target objects, make full use of the information provided in the image to be recognized, and output more recognition results with a smaller number of models , to improve the deployment and recognition efficiency of the model.
  • FIG. 1 is a schematic diagram of a recognition model training method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a recognition model training method according to another embodiment of the present disclosure.
  • FIG. 3 is a schematic diagram of a recognition model training method according to another embodiment of the present disclosure.
  • Fig. 4 is a schematic diagram of a recognition model training method according to an example of the present disclosure.
  • Fig. 5 is a schematic diagram of a recognition model training method according to another example of the present disclosure.
  • Fig. 6 is a schematic diagram of data processing according to an example of the present disclosure.
  • Fig. 7 is a schematic diagram of identification according to an example of the present disclosure.
  • Fig. 8 is a schematic diagram of a recognition model training device according to an embodiment of the present disclosure.
  • Fig. 9 is a schematic diagram of a recognition model training device according to another embodiment of the present disclosure.
  • Fig. 10 is a schematic diagram of a recognition model training device according to another embodiment of the present disclosure.
  • Fig. 11 is a schematic diagram of a recognition model training device according to an embodiment of the present disclosure.
  • Fig. 12 is a schematic diagram of a recognition model training device according to an embodiment of the present disclosure.
  • Fig. 13 is a block diagram of an electronic device for implementing the recognition model training method of the embodiment of the present disclosure.
  • Embodiments of the present disclosure first provide a recognition model training method, as shown in FIG. 1 , including:
  • Step S11 Input the image to be processed into the recognition model to be trained
  • Step S12 Output at least one feature map of the image to be processed through the feature output layer of the recognition model to be trained;
  • Step S13 Obtain the prediction data of the first target object in the image to be processed and the prediction data of the first target object in the image to be processed according to at least one feature map through the head of the recognition model to be trained associated predicted data for the second target object;
  • Step S14 According to the predicted data of the first target object, the predicted data of the second target object, the labeled data of the first target object and the labeled data of the second target object, optimize the recognition model to be trained to obtain the trained recognition model.
  • the image to be processed may be an image containing a target object to be identified.
  • the target object to be recognized can be any object, such as a person, a human face, a human eye, a human body, an animal, a still life, etc.
  • the feature output layer of the recognition model to be trained outputs two or more feature maps
  • the sizes of the two or more feature maps are different.
  • the head of the recognition model to be trained may be a layer structure in the recognition model to be trained. After the feature output layer of the recognition model to be trained outputs at least one feature map, at least one feature map is input to the head of the recognition model to be trained, and the head of the recognition model to be trained outputs the prediction data and Predicted data for the second target object.
  • the first target object and the second target object may be target objects in the image to be recognized.
  • the first target object may be a target object that has a geometric relationship with the second target object.
  • the second target object when the first target object is a human face, can be a human body related to the human face, that is, when the first target object is the face of person A, the second target object can be the face of person A. human body.
  • the first target object when the first target object is a human eye, the second target object can be a human face related to the human eye, that is, when the first target object is the eyes of person A, the second target object can be person A face.
  • the first target object and the second target object may contain or be included in each other.
  • the prediction data of the first target object may include identification data of the first target object, such as whether the first target object exists in the image to be identified, its position, and the like.
  • the prediction data of the first target object may also include data such as characteristics, attributes, and quality of the first target object. For example, the size level, integrity level, shape level, etc. of the first target object.
  • the prediction data of the first target object may include various kinds of prediction data.
  • the types of the predicted data of the first target object and the predicted data of the second target object may be the same or different.
  • the prediction data of the first target object in the image to be processed and the prediction data of the second target object can be obtained according to at least one feature map, which can be for each pixel of the feature map, output For predicting the data of the first target object and the data for predicting the second target object, according to the data of all pixels, the predicted data of the first target object and the predicted data of the second target object are obtained.
  • the predicted data of the first target object and the predicted data of the second target object can be used in scenarios such as smart city and intelligent transportation.
  • the prediction data of the first target object and the second target object can be obtained through the recognition model to be trained, and the recognition model to be trained is optimized and trained according to the prediction data and label data, and the obtained recognition model is accurate to the first target
  • the recognition of the object and the second target object related to the first target object can realize the associated recognition of at least two target objects, make full use of the information provided in the image to be recognized, and output more recognition results with a smaller number of models, Improve model deployment and identification efficiency.
  • the predicted data of the first target object includes the classification predicted data of the first target object and the attribute predicted data of the first target object;
  • the predicted data of the second target object includes the predicted data of the second target object and the predicted data of the first target object. Two attribute prediction data of the target object.
  • the classification prediction data of the first target object may be used to determine whether a certain area of the image to be recognized is the first target object.
  • the attribute prediction data of the first target object may be a parameter for judging the presentation quality of the first target object in the image to be recognized.
  • the classification prediction data of may be the determination data of the first target object, such as whether the first target object exists in the image, the anchor frame surrounding the first target object, and the like.
  • the classification prediction data of the second target object may be the same as the classification prediction data of the first target object, or may be different from the classification prediction data of the first target object.
  • the property prediction data of the second target object may be the same as the property prediction data of the first target object, or may be different from the property prediction data of the first target object.
  • the classification prediction data of the first target object and the attribute prediction data of the first target object can be obtained, and the classification prediction data and attribute prediction data of the second target object can also be obtained, so that at least two objects to be identified can be identified.
  • Correlating target objects for joint output so that not only can the recognition results of a large number of target objects be obtained through a small number of models, but also the process of recognizing the first target object and the second target object can be integrated to achieve a better recognition effect.
  • the predicted data of the first target object and the predicted data of the second target object associated with the predicted data of the first target object are output.
  • Step S21 For each pixel of the feature map, output the anchor box prediction data of the first target object and the anchor box prediction data of the second target object;
  • Step S22 Output the predicted data of the first target object and the predicted data of the second target object according to the predicted data of the anchor frame of the first target object and the predicted data of the anchor frame of the second target object.
  • the anchor frame prediction data of the first target object may include data such as the probability that the pixel is the first target object.
  • the anchor frame prediction data of the second target object may be the same as the anchor frame prediction data of the first target object.
  • the boundary points of the first target object can be determined in the feature map, thereby forming an anchor point frame surrounding the first target object, and determining the prediction data of the first target object according to the anchor point frame .
  • the prediction data for the second target object can be generated in the same manner as the prediction data for the first target object.
  • steps S21 and S22 can be performed by the head of the recognition model to be trained.
  • the anchor point frame prediction data for predicting the prediction data of the first target object and the second target object can be generated for each pixel of the feature map, so that the anchor point frame surrounding the target object can be obtained later, and more Accurately output the prediction data of the first target object and the second target object according to the information such as the anchor frame.
  • the first target object is a human face; the second target object is a human body.
  • the key frame image may contain at least one of a human face and a human body, and may be used for subsequent human face and/or human body retrieval.
  • the first target object can be set to be a human face
  • the second target object can be set to be a human body, so that it can be used for human body and face detection in a video stream capture system, and associate human bodies and human faces belonging to the same natural person , at the same time, in the video containing an uninterrupted trajectory of natural persons, select a frame image that is most suitable for recognition and store it in the database to provide important and high-quality information for subsequent tracking, retrieval, security and other operations.
  • the human face in the image to be recognized and the human body related to the human face can be recognized, so as to realize association recognition.
  • the feature output layer includes a backbone network and a feature pyramid network; through the feature output layer of the recognition model to be trained, output at least one feature map of the image to be processed, as shown in Figure 3, including:
  • Step S31 Output multiple first feature maps of the image to be processed through the backbone network (Backbone);
  • Step S32 input N second feature maps in multiple first feature maps into a feature pyramid network (Feature Pyramid Network, FPN), where N is an integer not less than 1;
  • FPN Feature Pyramid Network
  • Step S33 output N third feature maps through the feature pyramid network
  • Step S34 Use N third feature maps as feature maps.
  • the N second feature maps may be generated based on the N first feature maps with smaller sizes in the first feature map.
  • the backbone network outputs 5 first feature maps, F1, F2, F3, F4, and F5.
  • the size of F1-F5 gradually becomes smaller
  • the feature pyramid network outputs F6, F7, and F8 respectively according to F3, F4, and F5.
  • a second feature map may be generated based on the N first feature maps with smaller sizes in the first feature map.
  • the backbone network may include a multi-layer CNN (Convolutional Neural Networks, Convolutional Neural Network) sub-network, which can perform a convolution operation on the image to be recognized input to the recognition model to be trained to obtain multiple first feature maps.
  • CNN Convolutional Neural Networks, Convolutional Neural Network
  • the feature pyramid network can perform further convolution operations on the N first feature maps, so that the high-level semantic information in the image to be recognized can be integrated into the feature maps to obtain N second feature maps.
  • the N second feature maps may be feature maps of different sizes, which can be used to identify target objects of different sizes in the image to be recognized. For example, feature maps of smaller sizes can be used to identify target objects of larger sizes, Larger-sized feature maps can be used to recognize smaller-sized target objects.
  • the feature map of the image to be recognized can be obtained, so that the recognition and correlation of the first target object and the associated second target object can be performed subsequently according to the feature map. data prediction.
  • An embodiment of the present disclosure also provides an image recognition method, as shown in FIG. 4 , including:
  • Step S41 Input the image to be recognized into the recognition model, and obtain the prediction data of the first target object in the image to be recognized and the prediction data of the second target object associated with the first target object.
  • the recognition model is any embodiment of the present disclosure The provided trained recognition model.
  • the trained recognition model can be used to recognize the image to be recognized, and the associated prediction data of the first target object and the second target object can be obtained, so that a relatively small number of models can be used to obtain more prediction results.
  • the image to be identified is a frame image in the video to be identified; the identification method also includes:
  • the image frame with the best overall quality of the first target object and the second target object in the video to be recognized can be determined as the key frame image.
  • the prediction data of the first target object and the prediction data of the second target object respectively determine the image frame with the best overall quality of the first target object and the second target object in the video to be recognized as the key frame image of the first target object and the key image frame of the second target object.
  • the key image frames in the video to be recognized are obtained through the prediction data of the first target object and the second target object, so that face recognition, living body recognition, human body recognition, face tracking, Operations such as human body tracking can achieve better results in various scenarios and fields such as intelligent security and intelligent identification.
  • the recognition model training method can be applied to face and human body recognition, and may include steps as shown in Figure 5:
  • Step S51 Obtain an image to be recognized.
  • image frames may be extracted from real-time video streams of cameras in surveillance or other scenes, and may be extracted frame by frame, or may be extracted at set intervals.
  • the extracted image frames are first preprocessed and scaled to a fixed size, such as 416 ⁇ 416, and the uniform RGB mean value (such as [104, 117, 123]) is subtracted, so that the size and RGB mean value of each image to be recognized are in the recognition model to be trained
  • the training process is unified, thereby enhancing the robustness of the trained recognition model.
  • Step S52 Input the image to be recognized into the model.
  • the preprocessed image to be recognized can be sent to the recognition model to be trained for calculation.
  • Step S53 Obtain the feature map of the image to be recognized.
  • the input data of the recognition model to be trained can be the image preprocessed in step S52 above, and processed by the backbone network to obtain first feature maps of different depths and scales.
  • the structure of the backbone network can be the same as the backbone network of the YOLO Unified Real-Time Object Detection (You Only Look Once: Unified, Real-Time Object Detection) model, which can specifically include sub-networks with convolution calculation functions.
  • the sub-networks can be, for example, DarkNet, Networks such as ResNet.
  • the smaller N sheets of the first feature map output by the backbone network are input into the feature pyramid network.
  • the N first feature maps output by the backbone network are fused with each other through corresponding paths, and finally N feature maps of different scales are obtained.
  • These N feature maps of different sizes can be used to perceive targets of different scales on the image from large to small.
  • Step S54 Obtain the first target object prediction data and the second target object prediction data.
  • the head of the recognition model to be trained is connected after the feature pyramid network, and the head may include a combination of several convolutional layers-activation layers-batch processing layers.
  • each feature map pixel position produces at least one anchor point frame with different size ratios, and a result can be regressed based on the anchor point frame.
  • Each anchor box corresponds to an intermediate output data with a length of (5+N+M).
  • the number of channels of the intermediate output data is 5+N+M), indicating the prediction (conf, x, y, w, h, class) of the target detection frame based on the anchor frame and the predicted value of the attribute.
  • conf indicates the confidence of the target contained in the anchor box
  • x, y, w, h are the coordinates and scale of the normalized detection frame
  • class is a vector with a dimension of N, indicating that the probability of the target belonging to a certain category corresponds to Values within a vector of category indices
  • predicted values for attributes are vectors of length M.
  • the definition of the relationship between the human body and the human face can be as follows: the human body frame and the human face frame belonging to the same natural person are a group of related human body-face frames.
  • the label of the human body frame is generated on the anchor point (pixel) corresponding to the center point of each human body frame, and if the natural person corresponding to the human body frame has a face in the image, then on the same anchor point Generate the face frame associated with the human body.
  • the pre-processed image will be input to the network to obtain all the body frames in the image and the corresponding face frames of the body, as well as the attributes corresponding to the body frames and the attributes corresponding to the face frames.
  • the attributes corresponding to the body frame may include whether it is truncated, whether it is abnormal, the degree of occlusion, and the orientation.
  • the attributes corresponding to the face frame may include quality, pitch angle, yaw angle and roll angle.
  • the human body frame and face frame for joint tracking, select human body key frames in different orientations without truncation, no abnormality, and low occlusion from the trajectory, and store them in the library, and select face key frames with high quality scores and small angles to store them in
  • the stored key frame images can be used for subsequent operations related to target objects such as face retrieval.
  • the embodiments of the present disclosure can be applied to human face and/or recognition, only one deep learning model extraction is performed on the image to be recognized, and the detection frames of all human bodies and human faces on the image to be recognized, human body attributes, human face attributes, and human body and human body attributes are obtained. Correspondence between faces.
  • the embodiments of the present disclosure reduce the computing resource overhead to the greatest extent, and at the same time directly output the association relationship between the face and the human body from the model, without the need to separate the face and the human body. Association judgment.
  • the structure of the recognition model may be as shown in FIG. 6 , including a backbone network 61 , a feature pyramid network (FPN) 62 , and a head 63 .
  • a loss for optimizing the recognition model to be trained can be obtained.
  • the backbone network 61 multiple first feature maps are output according to the image to be recognized, specifically C1, C2, C3, C4, and C5, and the size relationship is: C1>C2>C3>C4>C5.
  • FPN62, C3, C4, and C5 are fused and calculated.
  • the head 63 can include a convolutional layer conv3 ⁇ 3, the number of output channels of the head is twice the number of input channels, and the output data can be respectively: face prediction data conv3 ⁇ 3C, 3(K+5+4), human body Prediction data conv3 ⁇ 3C, 3(K+5+4).
  • C is the number of feature channels input to the head
  • k is the number of categories
  • 5 is (x, y, w, h, conf)
  • 4 is the three angles and quality of the face
  • 11 is the 4 attributes of the human body
  • the face quality-related data can be obtained respectively: face box (Face Box), face score (Face Score), face angle (Face Angle), face quality (Face Quality); and the quality-related data of the human body: Human Box, Human Score, and Human Quality.
  • the face frame 71 and the human body frame 72 can be obtained, and the quality-related data of the face and human body can be obtained at the same time: normal human body, no occlusion, no truncation, and front.
  • the frame image with the largest joint NMS (Non-Maximum Suppression, non-maximum suppression value) in the video to be identified can be selected as the key frame image.
  • the embodiment of the present disclosure also provides a recognition model training device, as shown in FIG. 8 , including:
  • the first input module 81 is used to input the image to be processed into the recognition model to be trained;
  • the feature map module 82 is used to output at least one feature map of the image to be processed through the feature output layer of the recognition model to be trained;
  • the prediction data module 83 is used to obtain the prediction data of the first target object in the image to be processed according to at least one feature map through the head of the recognition model to be trained, and the prediction of the first target object in the image to be processed Prediction data of the data-associated second target object;
  • the training module 84 is used to optimize the recognition model to be trained according to the predicted data of the first target object, the predicted data of the second target object, the labeled data of the first target object and the labeled data of the second target object, and obtain the trained Identify the model.
  • the predicted data of the first target object includes the classification predicted data of the first target object and the attribute predicted data of the first target object;
  • the predicted data of the second target object includes the predicted data of the second target object and the predicted data of the first target object. Two attribute prediction data of the target object.
  • the prediction data module includes:
  • the first prediction unit 91 is configured to output the anchor frame prediction data of the first target object and the anchor frame prediction data of the second target object for each pixel of the feature map;
  • the second prediction unit 92 is configured to output the predicted data of the first target object and the predicted data of the second target object according to the predicted data of the anchor frame of the first target object and the predicted data of the anchor frame of the second target object.
  • the first target object is a human face; the second target object is a human body.
  • the feature output layer includes a backbone network and a feature pyramid network;
  • the feature map module includes:
  • the first feature map unit 101 is configured to output multiple first feature maps of the image to be processed through the backbone network;
  • the first feature map input unit 102 is used to input N second feature maps in multiple first feature maps into the feature pyramid network, where N is an integer not less than 1;
  • the second feature map unit 103 is used to output N second feature maps through the feature pyramid network
  • the second feature map processing unit 104 is configured to use N second feature maps as feature maps.
  • An embodiment of the present disclosure also provides an image recognition device, as shown in FIG. 11 , including:
  • the second input module 111 is used to input the image to be recognized into the recognition model, and obtain the prediction data of the first target object in the image to be recognized and the prediction data of the second target object associated with the first target object.
  • the recognition model is the disclosure The trained recognition model provided by any one of the embodiments.
  • the image to be recognized is a frame image in the video to be recognized; as shown in Figure 12, the recognition device also includes:
  • the key frame image module 121 is configured to obtain a key frame image in the video to be recognized according to the prediction data of the first target object and the prediction data of the second target object.
  • the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
  • FIG. 13 shows a schematic block diagram of an example electronic device 130 that may be used to implement embodiments of the present disclosure.
  • Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers.
  • Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
  • the electronic device 130 includes a computing unit 131 that can be executed according to a computer program stored in a read-only memory (ROM) 132 or loaded from a storage unit 138 into a random access memory (RAM) 133 Various appropriate actions and treatments.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data necessary for the operation of the electronic device 130 can also be stored.
  • the calculation unit 131, the ROM 132, and the RAM 133 are connected to each other through a bus 134.
  • An input-output (I/O) interface 135 is also connected to the bus 134 .
  • the communication unit 139 allows the electronic device 130 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.
  • the computing unit 131 may be various general and/or special purpose processing components having processing and computing capabilities. Some examples of computing units 131 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc.
  • the computing unit 131 executes various methods and processes described above, such as a recognition model training method.
  • the recognition model training method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 138 .
  • part or all of the computer program can be loaded and/or installed on the electronic device 130 via the ROM 132 and/or the communication unit 139.
  • the computer program When the computer program is loaded into the RAM 133 and executed by the computing unit 131, one or more steps of the identification model training method described above can be performed.
  • the computing unit 131 may be configured in any other appropriate way (for example, by means of firmware) to execute the recognition model training method.
  • Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOC system of systems
  • CPLD load programmable logic device
  • computer hardware firmware, software, and/or combinations thereof.
  • programmable processor can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
  • Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented.
  • the program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer.
  • a display device e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
  • a keyboard and pointing device eg, a mouse or a trackball
  • Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Input from the user may be received through acoustic input, voice input, or tactile input.
  • the systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
  • the components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN) and the Internet.
  • a computer system may include clients and servers.
  • Clients and servers are generally remote from each other and typically interact through a communication network.
  • the relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
  • steps may be reordered, added or deleted using the various forms of flow shown above.
  • each step described in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Image Analysis (AREA)

Abstract

A recognition model training method and apparatus, a recognition method and apparatus, a device, and a storage medium. A recognition model training method comprises: inputting an image to be processed into a recognition model to be trained; outputting at least one feature map of said image by means of a feature output layer of said recognition model; obtaining, according to the at least one feature map by means of a head portion of said recognition model, prediction data of a first target object in said image, and prediction data of a second target object associated with the prediction data of the first target object in said image; and according to the prediction data of the first target object, the prediction data of the second target object, annotation data of the first target object, and annotation data of the second target object, optimizing said recognition model to obtain a trained recognition model.

Description

识别模型训练方法、识别方法、装置、设备及存储介质Recognition model training method, recognition method, device, equipment and storage medium
本申请要求于2021年05月28日提交中国专利局、申请号为202110591890.8、发明名称为“识别模型训练方法、识别方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the China Patent Office on May 28, 2021, with the application number 202110591890.8, and the title of the invention is "recognition model training method, recognition method, device, equipment and storage medium", the entire content of which Incorporated in this application by reference.
技术领域technical field
本公开涉及人工智能技术领域,尤其涉及深度学习、计算机视觉技术领域,可应用于智慧城市、智能交通场景下。The present disclosure relates to the technical field of artificial intelligence, in particular to the technical fields of deep learning and computer vision, and can be applied in smart cities and smart traffic scenarios.
背景技术Background technique
目标识别是图像处理的一个重要的手段和目的,通过目标识别,可以对视频、静态画面中的物体、人体、动物体等目标物体进行识别,根据识别结果实现身份认证、安全检查等多种用途。Target recognition is an important means and purpose of image processing. Through target recognition, objects in videos, static images, human bodies, animals and other target objects can be recognized, and various uses such as identity authentication and security inspection can be realized based on the recognition results. .
随着计算机技术的发展,在多种需要应用到目标识别技术的场景下,随着应用目的的多样化,被识别的目标物体的多样化,经常需要多重模型实现目标物体识别的目的。如何提高处理待处理图像的模型的效率,是需要改进的一个问题。With the development of computer technology, in various scenarios that need to be applied to target recognition technology, with the diversification of application purposes and the diversification of recognized target objects, multiple models are often required to achieve the purpose of target object recognition. How to improve the efficiency of the model for processing images to be processed is a problem that needs to be improved.
发明内容Contents of the invention
本公开提供了一种识别模型训练方法、识别方法、装置、设备及存储介质。The present disclosure provides a recognition model training method, a recognition method, a device, a device and a storage medium.
根据本公开的一方面,提供了一种识别模型训练方法,包括:According to an aspect of the present disclosure, a recognition model training method is provided, including:
将待处理图像输入待训练的识别模型;Input the image to be processed into the recognition model to be trained;
通过待训练的识别模型的特征输出层,输出待处理图像的至少一张特征图;Output at least one feature map of the image to be processed through the feature output layer of the recognition model to be trained;
通过待训练的识别模型的头部,根据至少一张特征图获取待处理图像中的第一目标物体的预测数据,以及待处理图像中的与第一目标物体的预测数据关联的第二目标物体的预测数据;Obtain the prediction data of the first target object in the image to be processed according to at least one feature map through the head of the recognition model to be trained, and the second target object associated with the prediction data of the first target object in the image to be processed forecast data;
根据第一目标物体的预测数据、第二目标物体的预测数据、第一目标物体的标注数据和第二目标物体的标注数据,优化待训练的识别模型,得到训 练后的识别模型。According to the predicted data of the first target object, the predicted data of the second target object, the labeled data of the first target object and the labeled data of the second target object, the recognition model to be trained is optimized to obtain the trained recognition model.
根据本公开的另一方面,提供了一种识别方法,包括:According to another aspect of the present disclosure, an identification method is provided, including:
将待识别图像输入识别模型,获得待识别图像中的第一目标物体的预测数据和与第一目标物体关联的第二目标物体的预测数据,识别模型为本公开任意一项实施例所提供的训练后的识别模型。Input the image to be recognized into the recognition model, and obtain the prediction data of the first target object in the image to be recognized and the prediction data of the second target object associated with the first target object. The recognition model is provided by any embodiment of the present disclosure The trained recognition model.
根据本公开的另一方面,提供了一种识别模型训练装置,包括:According to another aspect of the present disclosure, a recognition model training device is provided, including:
第一输入模块,用于将待处理图像输入待训练的识别模型;The first input module is used to input the image to be processed into the recognition model to be trained;
特征图模块,用于通过待训练的识别模型的特征输出层,输出待处理图像的至少一张特征图;The feature map module is used to output at least one feature map of the image to be processed through the feature output layer of the recognition model to be trained;
预测数据模块,用于通过待训练的识别模型的头部,根据至少一张特征图获取待处理图像中的第一目标物体的预测数据,以及待处理图像中的与第一目标物体的预测数据关联的第二目标物体的预测数据;The prediction data module is used to obtain the prediction data of the first target object in the image to be processed and the prediction data of the first target object in the image to be processed according to at least one feature map through the head of the recognition model to be trained associated predicted data for the second target object;
训练模块,用于根据第一目标物体的预测数据、第二目标物体的预测数据、第一目标物体的标注数据和第二目标物体的标注数据,优化待训练的识别模型,得到训练后的识别模型。The training module is used to optimize the recognition model to be trained according to the prediction data of the first target object, the prediction data of the second target object, the label data of the first target object and the label data of the second target object, and obtain the recognition after training Model.
根据本公开的另一方面,提供了一种识别装置,包括:According to another aspect of the present disclosure, an identification device is provided, including:
第二输入模块,用于将待识别图像输入识别模型,获得待识别图像中的第一目标物体的预测数据和与第一目标物体关联的第二目标物体的预测数据,识别模型为本公开任意一项实施例所提供的训练后的识别模型。The second input module is used to input the image to be recognized into the recognition model, and obtain the prediction data of the first target object in the image to be recognized and the prediction data of the second target object associated with the first target object. The recognition model is any of the present disclosure. An embodiment provides a trained recognition model.
根据本公开的另一方面,提供了一种电子设备,包括:According to another aspect of the present disclosure, an electronic device is provided, including:
至少一个处理器;以及at least one processor; and
与该至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
该存储器存储有可被该至少一个处理器执行的指令,该指令被该至少一个处理器执行,以使该至少一个处理器能够执行本公开任一实施例中的方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method in any embodiment of the present disclosure.
根据本公开的另一方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,该计算机指令用于使计算机执行本公开任一实施例中的方法。According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method in any embodiment of the present disclosure.
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现本公开任一实施例中的方法。According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method in any embodiment of the present disclosure is implemented.
根据本公开的技术,能够通过待训练的识别模型获得第一目标物体和第二目标物体的预测数据,根据预测数据和标注数据对待训练的识别模型进行优化和训练,得到的识别模型对第一目标物体和与第一目标物体相关的第二 目标物体的识别,能够实现至少两种目标物体的关联识别,充分利用待识别图像中提供的信息,以较少的模型数量输出较多的识别结果,提高模型的部署和识别效率。According to the technology of the present disclosure, the prediction data of the first target object and the second target object can be obtained through the recognition model to be trained, and the recognition model to be trained can be optimized and trained according to the prediction data and label data, and the obtained recognition model is accurate to the first The recognition of the target object and the second target object related to the first target object can realize the associated recognition of at least two target objects, make full use of the information provided in the image to be recognized, and output more recognition results with a smaller number of models , to improve the deployment and recognition efficiency of the model.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood through the following description.
附图说明Description of drawings
附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used to better understand the present solution, and do not constitute a limitation to the present disclosure. in:
图1是根据本公开一实施例的识别模型训练方法示意图;FIG. 1 is a schematic diagram of a recognition model training method according to an embodiment of the present disclosure;
图2是根据本公开另一实施例的识别模型训练方法示意图;FIG. 2 is a schematic diagram of a recognition model training method according to another embodiment of the present disclosure;
图3是根据本公开又一实施例的识别模型训练方法示意图;FIG. 3 is a schematic diagram of a recognition model training method according to another embodiment of the present disclosure;
图4是根据本公开一种示例的识别模型训练方法示意图;Fig. 4 is a schematic diagram of a recognition model training method according to an example of the present disclosure;
图5是根据本公开另一种示例的识别模型训练方法示意图;Fig. 5 is a schematic diagram of a recognition model training method according to another example of the present disclosure;
图6是根据本公开一种示例的数据处理示意图;Fig. 6 is a schematic diagram of data processing according to an example of the present disclosure;
图7是根据本公开一种示例的识别示意图;Fig. 7 is a schematic diagram of identification according to an example of the present disclosure;
图8是根据本公开一实施例的识别模型训练装置示意图;Fig. 8 is a schematic diagram of a recognition model training device according to an embodiment of the present disclosure;
图9是根据本公开另一实施例的识别模型训练装置示意图;Fig. 9 is a schematic diagram of a recognition model training device according to another embodiment of the present disclosure;
图10是根据本公开又一实施例的识别模型训练装置示意图;Fig. 10 is a schematic diagram of a recognition model training device according to another embodiment of the present disclosure;
图11是根据本公开一实施例的识别模型训练装置示意图;Fig. 11 is a schematic diagram of a recognition model training device according to an embodiment of the present disclosure;
图12是根据本公开一实施例的识别模型训练装置示意图;Fig. 12 is a schematic diagram of a recognition model training device according to an embodiment of the present disclosure;
图13是用来实现本公开实施例的识别模型训练方法的电子设备的框图。Fig. 13 is a block diagram of an electronic device for implementing the recognition model training method of the embodiment of the present disclosure.
具体实施方式Detailed ways
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
本公开实施例首先提供一种识别模型训练方法,如图1所示,包括:Embodiments of the present disclosure first provide a recognition model training method, as shown in FIG. 1 , including:
步骤S11:将待处理图像输入待训练的识别模型;Step S11: Input the image to be processed into the recognition model to be trained;
步骤S12:通过待训练的识别模型的特征输出层,输出待处理图像的至少一张特征图;Step S12: Output at least one feature map of the image to be processed through the feature output layer of the recognition model to be trained;
步骤S13:通过待训练的识别模型的头部(Head),根据至少一张特征图获取待处理图像中的第一目标物体的预测数据,以及待处理图像中的与第一目标物体的预测数据关联的第二目标物体的预测数据;Step S13: Obtain the prediction data of the first target object in the image to be processed and the prediction data of the first target object in the image to be processed according to at least one feature map through the head of the recognition model to be trained associated predicted data for the second target object;
步骤S14:根据第一目标物体的预测数据、第二目标物体的预测数据、第一目标物体的标注数据和第二目标物体的标注数据,优化待训练的识别模型,得到训练后的识别模型。Step S14: According to the predicted data of the first target object, the predicted data of the second target object, the labeled data of the first target object and the labeled data of the second target object, optimize the recognition model to be trained to obtain the trained recognition model.
本实施例中,待处理图像可以是包含需要识别的目标物体的图像。需要识别的目标物体,可以是任何物体,比如人物、人脸、人眼、人体、动物、静物等。In this embodiment, the image to be processed may be an image containing a target object to be identified. The target object to be recognized can be any object, such as a person, a human face, a human eye, a human body, an animal, a still life, etc.
在待训练的识别模型的特征输出层输出两张以上特征图的情况下,两张以上的特征图的尺寸不同。In the case where the feature output layer of the recognition model to be trained outputs two or more feature maps, the sizes of the two or more feature maps are different.
本实施例中,待训练的识别模型的头部,可以是待训练的识别模型中的一层结构。待训练的识别模型的特征输出层输出至少一张特征图之后,至少一张特征图输入待训练的识别模型的头部,由待训练的识别模型的头部输出第一目标物体的预测数据和第二目标物体的预测数据。In this embodiment, the head of the recognition model to be trained may be a layer structure in the recognition model to be trained. After the feature output layer of the recognition model to be trained outputs at least one feature map, at least one feature map is input to the head of the recognition model to be trained, and the head of the recognition model to be trained outputs the prediction data and Predicted data for the second target object.
本实施例中,第一目标物体和第二目标物体可以是待识别图像中的目标物体。第一目标物体可以是与第二目标物体的存在几何关联等相关关系的目标物体。In this embodiment, the first target object and the second target object may be target objects in the image to be recognized. The first target object may be a target object that has a geometric relationship with the second target object.
比如,第一目标物体为人脸的情况下,第二目标物体可以为与人脸相关的人体,即在第一目标物体为A人物的脸部的情况下,第二目标物体可以是A人物的人体。再如,第一目标物体为人眼的情况下,第二目标物体可以为与人眼相关的人脸,即在第一目标物体为A人物的眼睛的情况下,第二目标物体可以为A人物的脸部。For example, when the first target object is a human face, the second target object can be a human body related to the human face, that is, when the first target object is the face of person A, the second target object can be the face of person A. human body. For another example, when the first target object is a human eye, the second target object can be a human face related to the human eye, that is, when the first target object is the eyes of person A, the second target object can be person A face.
本实施例中,第一目标物体和第二目标物体之间可以存在相互包含或被包含的关系。In this embodiment, the first target object and the second target object may contain or be included in each other.
第一目标物体的预测数据,可以包括第一目标物体的识别数据,如第一目标物体在待识别图像中是否存在、存在的位置等。The prediction data of the first target object may include identification data of the first target object, such as whether the first target object exists in the image to be identified, its position, and the like.
第一目标物体的预测数据,还可以包括第一目标物体的特征、属性、质量等数据。比如,第一目标物体的大小等级、完整度等级、外形等级等。The prediction data of the first target object may also include data such as characteristics, attributes, and quality of the first target object. For example, the size level, integrity level, shape level, etc. of the first target object.
第一目标物体的预测数据可以包括多种预测数据。The prediction data of the first target object may include various kinds of prediction data.
本实施中,第一目标物体的预测数据和第二目标物体的预测数据的种类可以相同或不同。In this implementation, the types of the predicted data of the first target object and the predicted data of the second target object may be the same or different.
通过待训练的识别模型的头部,根据至少一张特征图获取待处理图像中的第一目标物体的预测数据,以及第二目标物体的预测数据,可以是针对特征图的每个像素,输出用于预测第一目标物体的数据和用于预测第二目标物体的数据,根据所有像素的数据,获得第一目标物体的预测数据和第二目标物体的预测数据。Through the head of the recognition model to be trained, the prediction data of the first target object in the image to be processed and the prediction data of the second target object can be obtained according to at least one feature map, which can be for each pixel of the feature map, output For predicting the data of the first target object and the data for predicting the second target object, according to the data of all pixels, the predicted data of the first target object and the predicted data of the second target object are obtained.
第一目标物体的预测数据和第二目标物体的预测数据可以用于智慧城市、智能交通等场景。The predicted data of the first target object and the predicted data of the second target object can be used in scenarios such as smart city and intelligent transportation.
本实施例中,能够通过待训练的识别模型获得第一目标物体和第二目标物体的预测数据,根据预测数据和标注数据对待训练的识别模型进行优化和训练,得到的识别模型对第一目标物体和与第一目标物体相关的第二目标物体的识别,能够实现至少两种目标物体的关联识别,充分利用待识别图像中提供的信息,以较少的模型数量输出较多的识别结果,提高模型的部署和识别效率。In this embodiment, the prediction data of the first target object and the second target object can be obtained through the recognition model to be trained, and the recognition model to be trained is optimized and trained according to the prediction data and label data, and the obtained recognition model is accurate to the first target The recognition of the object and the second target object related to the first target object can realize the associated recognition of at least two target objects, make full use of the information provided in the image to be recognized, and output more recognition results with a smaller number of models, Improve model deployment and identification efficiency.
在一种实施方式中,第一目标物体的预测数据包括第一目标物体的分类预测数据和第一目标物体的属性预测数据;第二目标物体的预测数据包括第二目标物体的预测数据和第二目标物体的属性预测数据。In one embodiment, the predicted data of the first target object includes the classification predicted data of the first target object and the attribute predicted data of the first target object; the predicted data of the second target object includes the predicted data of the second target object and the predicted data of the first target object. Two attribute prediction data of the target object.
本实施例中,第一目标物体的分类预测数据可以用于判断待识别图像的某个区域是否为第一目标物体。第一目标物体的属性预测数据可以是用于判断第一目标物体在待识别图像中的呈现质量的参数。比如,的分类预测数据,可以是第一目标物体的判定数据,比如图像中是否存在第一目标物体、包围第一目标物体的锚点框等。In this embodiment, the classification prediction data of the first target object may be used to determine whether a certain area of the image to be recognized is the first target object. The attribute prediction data of the first target object may be a parameter for judging the presentation quality of the first target object in the image to be recognized. For example, the classification prediction data of , may be the determination data of the first target object, such as whether the first target object exists in the image, the anchor frame surrounding the first target object, and the like.
第二目标物体的分类预测数据可以与第一目标物体的分类预测数据相同,也可以与第一目标物体的分类预测数据不同。第二目标物体的属性预测数据可以与第一目标物体的属性预测数据相同,也可以与第一目标物体的属性预测数据不同。The classification prediction data of the second target object may be the same as the classification prediction data of the first target object, or may be different from the classification prediction data of the first target object. The property prediction data of the second target object may be the same as the property prediction data of the first target object, or may be different from the property prediction data of the first target object.
本实施例中,能够获得第一目标物体的分类预测数据、第一目标物体的 属性预测数据,也能够获得第二目标物体的分类预测数据和属性预测数据,从而能够对至少两个需要识别的关联目标物体进行联合输出,从而,不仅能够通过少量的模型获得较多数量的目标物体的识别结果,而且识别第一目标物体和第二目标物体的过程能够相互融合,达到更好的识别效果。In this embodiment, the classification prediction data of the first target object and the attribute prediction data of the first target object can be obtained, and the classification prediction data and attribute prediction data of the second target object can also be obtained, so that at least two objects to be identified can be identified. Correlating target objects for joint output, so that not only can the recognition results of a large number of target objects be obtained through a small number of models, but also the process of recognizing the first target object and the second target object can be integrated to achieve a better recognition effect.
在一种实施方式中,如图2所示,通过待训练的识别模型的头部,输出第一目标物体的预测数据,以及与第一目标物体的预测数据关联的第二目标物体的预测数据,包括:In one embodiment, as shown in FIG. 2 , through the head of the recognition model to be trained, the predicted data of the first target object and the predicted data of the second target object associated with the predicted data of the first target object are output. ,include:
步骤S21:针对特征图的每一个像素,输出第一目标物体的锚点框预测数据和第二目标物体的锚点框预测数据;Step S21: For each pixel of the feature map, output the anchor box prediction data of the first target object and the anchor box prediction data of the second target object;
步骤S22:根据第一目标物体的锚点框预测数据和第二目标物体的锚点框预测数据,输出第一目标物体的预测数据和第二目标物体的预测数据。Step S22: Output the predicted data of the first target object and the predicted data of the second target object according to the predicted data of the anchor frame of the first target object and the predicted data of the anchor frame of the second target object.
本实施例中,针对特征图的每一个像素,第一目标物体的锚点框预测数据,可以包括像素是第一目标物体的概率等数据。第二目标物体的锚点框预测数据可以与第一目标物体的锚点框预测数据相同。In this embodiment, for each pixel of the feature map, the anchor frame prediction data of the first target object may include data such as the probability that the pixel is the first target object. The anchor frame prediction data of the second target object may be the same as the anchor frame prediction data of the first target object.
根据第一目标物体的锚点框预测数据,可以在特征图中确定第一目标物体的边界点,从而形成包围第一目标物体的锚点框,根据锚点框确定第一目标物体的预测数据。针对第二目标物体的预测数据,可采用与第一目标物体的预测数据相同的方式生成。According to the anchor point frame prediction data of the first target object, the boundary points of the first target object can be determined in the feature map, thereby forming an anchor point frame surrounding the first target object, and determining the prediction data of the first target object according to the anchor point frame . The prediction data for the second target object can be generated in the same manner as the prediction data for the first target object.
上述步骤S21和S22可通过待训练的识别模型的头部执行。The above steps S21 and S22 can be performed by the head of the recognition model to be trained.
本实施例中,能够对特征图的每一个像素生成用于预测第一目标物体和第二目标物体的预测数据的锚点框预测数据,从而后续能够获得包围目标物体的锚点框,更为准确第根据锚点框等信息输出第一目标物体和第二目标物体的预测数据。In this embodiment, the anchor point frame prediction data for predicting the prediction data of the first target object and the second target object can be generated for each pixel of the feature map, so that the anchor point frame surrounding the target object can be obtained later, and more Accurately output the prediction data of the first target object and the second target object according to the information such as the anchor frame.
在一种实施方式中,第一目标物体为人脸;第二目标物体为人体。In one embodiment, the first target object is a human face; the second target object is a human body.
在安防大数据系统等场景下,往往需要将监控视频流中出现的自然人进行检测跟踪,并将其中的关键帧图像进行存储记录。其中,关键帧图像可包含人脸、人体中的至少一个,可用于后续的人脸和/或人体检索。本公开实施例可设定第一目标物体为人脸,第二目标物体为人体,从而能够用于视频流的抓拍系统中的人体人脸检测,并将属于同于自然人的人体和人脸进行关联,同时在包含一段不间断的自然人轨迹的视频中,选取最适合识别的一个帧图像存入数据库,为后续的追踪、检索、安防等操作提供重要且高质量的信息。In scenarios such as security big data systems, it is often necessary to detect and track natural persons appearing in surveillance video streams, and store and record key frame images. Wherein, the key frame image may contain at least one of a human face and a human body, and may be used for subsequent human face and/or human body retrieval. In the embodiment of the present disclosure, the first target object can be set to be a human face, and the second target object can be set to be a human body, so that it can be used for human body and face detection in a video stream capture system, and associate human bodies and human faces belonging to the same natural person , at the same time, in the video containing an uninterrupted trajectory of natural persons, select a frame image that is most suitable for recognition and store it in the database to provide important and high-quality information for subsequent tracking, retrieval, security and other operations.
本实施例中,能够识别待识别图像中的人脸以及与人脸相关的人体,从而实现关联识别。In this embodiment, the human face in the image to be recognized and the human body related to the human face can be recognized, so as to realize association recognition.
在一种实施方式中,特征输出层包括主干网络和特征金字塔网络;通过待训练的识别模型的特征输出层,输出待处理图像的至少一张特征图,如图3所示,包括:In one embodiment, the feature output layer includes a backbone network and a feature pyramid network; through the feature output layer of the recognition model to be trained, output at least one feature map of the image to be processed, as shown in Figure 3, including:
步骤S31:通过主干网络(Backbone),输出待处理图像的多张第一特征图;Step S31: Output multiple first feature maps of the image to be processed through the backbone network (Backbone);
步骤S32:将多张第一特征图中的N张第二特征图输入特征金字塔网络(Feature Pyramid Network,FPN),N为不小于1的整数;Step S32: input N second feature maps in multiple first feature maps into a feature pyramid network (Feature Pyramid Network, FPN), where N is an integer not less than 1;
步骤S33:通过特征金字塔网络,输出N张第三特征图;Step S33: output N third feature maps through the feature pyramid network;
步骤S34:将N张第三特征图作为特征图。Step S34: Use N third feature maps as feature maps.
在本实施例中,N张第二特征图可以是根据第一特征图中尺寸较小的N张第一特征图生成的。比如,主干网络输出5张第一特征图,F1、F2、F3、F4、F5,其中,F1-F5的尺寸逐渐变小,特征金字塔网络根据F3、F4、F5分别输出F6、F7、F8三张第二特征图。In this embodiment, the N second feature maps may be generated based on the N first feature maps with smaller sizes in the first feature map. For example, the backbone network outputs 5 first feature maps, F1, F2, F3, F4, and F5. Among them, the size of F1-F5 gradually becomes smaller, and the feature pyramid network outputs F6, F7, and F8 respectively according to F3, F4, and F5. A second feature map.
主干网络可以包括多层CNN(Convolutional Neural Networks,卷积神经网络)子网络,可对输入待训练的识别模型的待识别图像进行卷积操作,获得多张第一特征图。The backbone network may include a multi-layer CNN (Convolutional Neural Networks, Convolutional Neural Network) sub-network, which can perform a convolution operation on the image to be recognized input to the recognition model to be trained to obtain multiple first feature maps.
特征金字塔网络可对N张第一特征图进行进一步的卷积操作等处理,使得待识别图像中的高级语义信息融入特征图中,得到N张第二特征图。The feature pyramid network can perform further convolution operations on the N first feature maps, so that the high-level semantic information in the image to be recognized can be integrated into the feature maps to obtain N second feature maps.
N张第二特征图可以是尺寸大小各不相同的特征图,可用于识别在待识别图像中呈现不同大小的目标物体,例如,较小尺寸的特征图可用于识别较大尺寸的目标物体,较大尺寸的特征图可用于识别较小尺寸的目标物体。The N second feature maps may be feature maps of different sizes, which can be used to identify target objects of different sizes in the image to be recognized. For example, feature maps of smaller sizes can be used to identify target objects of larger sizes, Larger-sized feature maps can be used to recognize smaller-sized target objects.
本实施例中,通过待训练的识别模型的主干网络和特征金字塔网络,能够获得待识别图像的特征图,从而后续能够根据特征图进行第一目标物体和关联的第二目标物体的识别以及相关的数据预测。In this embodiment, through the backbone network and feature pyramid network of the recognition model to be trained, the feature map of the image to be recognized can be obtained, so that the recognition and correlation of the first target object and the associated second target object can be performed subsequently according to the feature map. data prediction.
本公开实施例还提供一种图像识别方法,如图4所示,包括:An embodiment of the present disclosure also provides an image recognition method, as shown in FIG. 4 , including:
步骤S41:将待识别图像输入识别模型,获得待识别图像中的第一目标物体的预测数据和与第一目标物体关联的第二目标物体的预测数据,识别模型为本公开任意一项实施例所提供的训练后的识别模型。Step S41: Input the image to be recognized into the recognition model, and obtain the prediction data of the first target object in the image to be recognized and the prediction data of the second target object associated with the first target object. The recognition model is any embodiment of the present disclosure The provided trained recognition model.
本实施例中,能够利用训练后的识别模型对待识别图像进行识别,获得 关联的第一目标物体和第二目标物体的预测数据,从而能够采用较少数量的模型获得较多的预测结果。In this embodiment, the trained recognition model can be used to recognize the image to be recognized, and the associated prediction data of the first target object and the second target object can be obtained, so that a relatively small number of models can be used to obtain more prediction results.
在一种实施方式中,待识别图像为待识别视频中的帧图像;识别方法还包括:In one embodiment, the image to be identified is a frame image in the video to be identified; the identification method also includes:
根据第一目标物体的预测数据和第二目标物体的预测数据,获得待识别视频中的关键帧图像。According to the prediction data of the first target object and the prediction data of the second target object, key frame images in the video to be recognized are obtained.
本实施例中,可根据第一目标物体的预测数据和第二目标物体的预测数据,确定待识别视频中第一目标物体和第二目标物体的整体质量最好的图像帧为关键帧图像。In this embodiment, according to the predicted data of the first target object and the predicted data of the second target object, the image frame with the best overall quality of the first target object and the second target object in the video to be recognized can be determined as the key frame image.
还可根据第一目标物体的预测数据和第二目标物体的预测数据,分别确定待识别视频中第一目标物体和第二目标物体的整体质量最好的图像帧为第一目标物体关键帧图像和第二目标物体的关键图像帧。Also according to the prediction data of the first target object and the prediction data of the second target object, respectively determine the image frame with the best overall quality of the first target object and the second target object in the video to be recognized as the key frame image of the first target object and the key image frame of the second target object.
本实施例中,通过第一目标物体和第二目标物体的预测数据,获得待识别视频中的关键图像帧,从而可以根据关键图像帧进行人脸识别、活体识别、人体识别、人脸追踪、人体追踪等操作,在应用于智能安防、智能识别等多种场景和领域,能够取得更好的使用效果。In this embodiment, the key image frames in the video to be recognized are obtained through the prediction data of the first target object and the second target object, so that face recognition, living body recognition, human body recognition, face tracking, Operations such as human body tracking can achieve better results in various scenarios and fields such as intelligent security and intelligent identification.
本公开一种示例中,识别模型训练方法可应用于人脸和人体识别,可以包括如图5所示的步骤:In an example of the present disclosure, the recognition model training method can be applied to face and human body recognition, and may include steps as shown in Figure 5:
步骤S51:获得待识别图像。Step S51: Obtain an image to be recognized.
具体的,可对监控或其他场景摄像头的实时视频流抽取图像帧,可以逐帧抽取,也可以设定间隔进行抽取。抽取的图像帧首先经过预处理,被缩放成固定尺寸,如416×416,并减去统一的RGB均值(如[104,117,123]),使得各待识别图像的尺寸和RGB均值在待训练的识别模型的训练过程中统一,从而增强训练后的识别的模型的鲁棒性。Specifically, image frames may be extracted from real-time video streams of cameras in surveillance or other scenes, and may be extracted frame by frame, or may be extracted at set intervals. The extracted image frames are first preprocessed and scaled to a fixed size, such as 416×416, and the uniform RGB mean value (such as [104, 117, 123]) is subtracted, so that the size and RGB mean value of each image to be recognized are in the recognition model to be trained The training process is unified, thereby enhancing the robustness of the trained recognition model.
步骤S52:将待识别图像输入别模型。Step S52: Input the image to be recognized into the model.
经过预处理的待识别图像可被送入待训练的识别模型进行计算。The preprocessed image to be recognized can be sent to the recognition model to be trained for calculation.
步骤S53:获得待识别图像的特征图。Step S53: Obtain the feature map of the image to be recognized.
待训练的识别模型的输入数据可以为经过上述步骤S52预处理后的图像,经过主干网络的处理,得到不同深度和尺度的第一特征图。主干网络的结构可以与YOLO统一实时目标检测(You Only Look Once:Unified,Real-Time Object Detection)模型的主干网络相同,具体可包括具有卷积计算 功能的子网络,子网络例如可以是DarkNet、ResNet等网络。The input data of the recognition model to be trained can be the image preprocessed in step S52 above, and processed by the backbone network to obtain first feature maps of different depths and scales. The structure of the backbone network can be the same as the backbone network of the YOLO Unified Real-Time Object Detection (You Only Look Once: Unified, Real-Time Object Detection) model, which can specifically include sub-networks with convolution calculation functions. The sub-networks can be, for example, DarkNet, Networks such as ResNet.
将主干网络输出的第一特征图中尺寸较小的N张,输入特征金字塔网络。通过FPN对主干网络输出的N张第一特征图通过对应的路径进行互相融合,最终得到N个不同尺度的特征图。这N个不同尺寸的特征图可分别用于感知图像上由大到小的不同尺度的目标。The smaller N sheets of the first feature map output by the backbone network are input into the feature pyramid network. Through FPN, the N first feature maps output by the backbone network are fused with each other through corresponding paths, and finally N feature maps of different scales are obtained. These N feature maps of different sizes can be used to perceive targets of different scales on the image from large to small.
步骤S54:获得第一目标物体预测数据和第二目标物体预测数据。Step S54: Obtain the first target object prediction data and the second target object prediction data.
本示例中,特征金字塔网络后连接待训练识别模型的头部,头部可包括若干个卷积层-激活层-批处理层的组合。In this example, the head of the recognition model to be trained is connected after the feature pyramid network, and the head may include a combination of several convolutional layers-activation layers-batch processing layers.
本示例中,可预先设定每个特征图像素位置上产生至少一种不同大小比例的锚点框在锚点框基础上回归一个结果。每个锚点框对应有一个长度为(5+N+M)的中间输出数据。中间输出数据的通道数是5+N+M),表示基于该锚点框对目标检测框的预测(conf,x,y,w,h,class)以及属性的预测值。conf表示该锚点框内包含目标的置信度,x、y、w、h为归一化的检测框坐标及尺度;class是一个维度为N的向量,表示目标属于某一类别的概率对应该类别索引的向量内的值;属性的预测值是长度为M的向量。In this example, it can be preset that each feature map pixel position produces at least one anchor point frame with different size ratios, and a result can be regressed based on the anchor point frame. Each anchor box corresponds to an intermediate output data with a length of (5+N+M). The number of channels of the intermediate output data is 5+N+M), indicating the prediction (conf, x, y, w, h, class) of the target detection frame based on the anchor frame and the predicted value of the attribute. conf indicates the confidence of the target contained in the anchor box, x, y, w, h are the coordinates and scale of the normalized detection frame; class is a vector with a dimension of N, indicating that the probability of the target belonging to a certain category corresponds to Values within a vector of category indices; predicted values for attributes are vectors of length M.
人体和人脸的关联关系的定义可以为:属于同一自然人的人体框和人脸框是一组有关联关系的人体-人脸框。生成训练目标时,在每个人体框的中心点所对应的锚点(像素)上生成人体框的标签,同时如果该人体框所对应的自然人在图像中有人脸出现,则在同一锚点上生成该人体所关联的人脸框。The definition of the relationship between the human body and the human face can be as follows: the human body frame and the human face frame belonging to the same natural person are a group of related human body-face frames. When generating the training target, the label of the human body frame is generated on the anchor point (pixel) corresponding to the center point of each human body frame, and if the natural person corresponding to the human body frame has a face in the image, then on the same anchor point Generate the face frame associated with the human body.
预测时,将完成预处理后的图像输入网络,得到图像中所有人体框和该人体所对应的人脸框,以及人体框对应的属性和人脸框所对应的属性。人体框对应的属性可以包括是否截断、是否异常、遮挡程度和朝向。人脸框所对应的属性可以包括质量、俯仰角、偏航角和翻滚角。When predicting, the pre-processed image will be input to the network to obtain all the body frames in the image and the corresponding face frames of the body, as well as the attributes corresponding to the body frames and the attributes corresponding to the face frames. The attributes corresponding to the body frame may include whether it is truncated, whether it is abnormal, the degree of occlusion, and the orientation. The attributes corresponding to the face frame may include quality, pitch angle, yaw angle and roll angle.
利用人体框和人脸框进行联合跟踪,从轨迹中选取无截断、无异常、遮挡程度低的不同朝向人体关键帧存储入库,选取质量分数高、角度较小的人脸关键帧图像存储入库,入库的关键帧图像可用于后续进行人脸检索等与目标物体相关的操作。Use the human body frame and face frame for joint tracking, select human body key frames in different orientations without truncation, no abnormality, and low occlusion from the trajectory, and store them in the library, and select face key frames with high quality scores and small angles to store them in The stored key frame images can be used for subsequent operations related to target objects such as face retrieval.
本公开实施例可应用于人脸和/或识别时,只对待识别图像进行一次深度学习模型提取,得到待识别图像上所有人体和人脸的检测框,人体属性、人脸属性,以及人体和人脸的对应关系。相比于利用单阶段模型同时进行关联检测和属性结果的输出,本公开实施例最大程度降低了计算资源开销,同时 从模型直接输出人脸和人体的关联关系,无需单独进行人脸和人体的关联判断。The embodiments of the present disclosure can be applied to human face and/or recognition, only one deep learning model extraction is performed on the image to be recognized, and the detection frames of all human bodies and human faces on the image to be recognized, human body attributes, human face attributes, and human body and human body attributes are obtained. Correspondence between faces. Compared with using a single-stage model to simultaneously perform association detection and output of attribute results, the embodiments of the present disclosure reduce the computing resource overhead to the greatest extent, and at the same time directly output the association relationship between the face and the human body from the model, without the need to separate the face and the human body. Association judgment.
本公开一种示例中,识别模型的结构可以如图6所示,包括主干网络61、特征金字塔网络(FPN)62、头部63。在模型训练阶段,根据头部63输出的数据,可获得用于优化待训练的识别模型的损失(Loss)。通过主干网络61,根据待识别图像输出多张第一特征图,具体可以是C1、C2、C3、C4、C5,尺寸关系为:C1>C2>C3>C4>C5。经过FPN62,对C3、C4、C5进行融合计算,比如,可根据C3对应的顺序,融合被处理的第一特征图中的至少一张,输出第二特征图P3;根据C4对应的顺序,融合被处理的第一特征图中的至少一张,输出第二特征图P4;根据C5对应的顺序,融合被处理的第一特征图中的至少一张,输出第二特征图P5。头部63可包含卷积层conv3×3,头部的输出通道数为输入通道数的2倍,输出数据可分别为:人脸预测数据conv3×3C,3(K+5+4),人体预测数据conv3×3C,3(K+5+4)。In an example of the present disclosure, the structure of the recognition model may be as shown in FIG. 6 , including a backbone network 61 , a feature pyramid network (FPN) 62 , and a head 63 . In the model training phase, according to the data output by the head 63, a loss (Loss) for optimizing the recognition model to be trained can be obtained. Through the backbone network 61, multiple first feature maps are output according to the image to be recognized, specifically C1, C2, C3, C4, and C5, and the size relationship is: C1>C2>C3>C4>C5. Through FPN62, C3, C4, and C5 are fused and calculated. For example, according to the order corresponding to C3, at least one of the processed first feature maps can be fused, and the second feature map P3 is output; according to the order corresponding to C4, fusion At least one of the processed first feature maps is output as a second feature map P4; according to the sequence corresponding to C5, at least one of the processed first feature maps is fused to output a second feature map P5. The head 63 can include a convolutional layer conv3×3, the number of output channels of the head is twice the number of input channels, and the output data can be respectively: face prediction data conv3×3C, 3(K+5+4), human body Prediction data conv3×3C, 3(K+5+4).
其中,C是输入到头部的特征通道数,k是类别数,5是(x,y,w,h,conf),4是人脸的三个角度和质量,11是人体的4个属性对应的向量:是否正常人体(否,是);是否截断(否,是);遮挡程度(无遮挡,轻微遮挡,重度遮挡);朝向(正面,背面,左侧面,右侧面)。Among them, C is the number of feature channels input to the head, k is the number of categories, 5 is (x, y, w, h, conf), 4 is the three angles and quality of the face, and 11 is the 4 attributes of the human body Corresponding vector: whether the human body is normal (No, Yes); whether it is truncated (No, Yes); degree of occlusion (no occlusion, slight occlusion, severe occlusion); orientation (front, back, left side, right side).
根据人脸预测数据和人体预测数据,可分别得出人脸的质量相关数据:人脸框(Face Box),人脸分数(Face Score),人脸角度(Face Angle),人脸质量(Face Quality);以及人体的质量相关数据:人体框(Human Box),人体分数(Human Score),人体质量(Human Quality)。According to the face prediction data and human body prediction data, the face quality-related data can be obtained respectively: face box (Face Box), face score (Face Score), face angle (Face Angle), face quality (Face Quality); and the quality-related data of the human body: Human Box, Human Score, and Human Quality.
例如,可根据图7所示的识别结果,获得人脸框71和人体框72,同时获得人脸和人体的质量相关数据:正常人体、无遮挡、无截断、正面。可选择待识别视频中联合NMS(Non-Maximum Suppression,非极大抑制值)最大的帧图像作为关键帧图像。For example, according to the recognition results shown in FIG. 7 , the face frame 71 and the human body frame 72 can be obtained, and the quality-related data of the face and human body can be obtained at the same time: normal human body, no occlusion, no truncation, and front. The frame image with the largest joint NMS (Non-Maximum Suppression, non-maximum suppression value) in the video to be identified can be selected as the key frame image.
本公开实施例还提供一种识别模型训练装置,如图8所示,包括:The embodiment of the present disclosure also provides a recognition model training device, as shown in FIG. 8 , including:
第一输入模块81,用于将待处理图像输入待训练的识别模型;The first input module 81 is used to input the image to be processed into the recognition model to be trained;
特征图模块82,用于通过待训练的识别模型的特征输出层,输出待处理图像的至少一张特征图;The feature map module 82 is used to output at least one feature map of the image to be processed through the feature output layer of the recognition model to be trained;
预测数据模块83,用于通过待训练的识别模型的头部,根据至少一张特征图获取待处理图像中的第一目标物体的预测数据,以及待处理图像中的与 第一目标物体的预测数据关联的第二目标物体的预测数据;The prediction data module 83 is used to obtain the prediction data of the first target object in the image to be processed according to at least one feature map through the head of the recognition model to be trained, and the prediction of the first target object in the image to be processed Prediction data of the data-associated second target object;
训练模块84,用于根据第一目标物体的预测数据、第二目标物体的预测数据、第一目标物体的标注数据和第二目标物体的标注数据,优化待训练的识别模型,得到训练后的识别模型。The training module 84 is used to optimize the recognition model to be trained according to the predicted data of the first target object, the predicted data of the second target object, the labeled data of the first target object and the labeled data of the second target object, and obtain the trained Identify the model.
在一种实施方式中,第一目标物体的预测数据包括第一目标物体的分类预测数据和第一目标物体的属性预测数据;第二目标物体的预测数据包括第二目标物体的预测数据和第二目标物体的属性预测数据。In one embodiment, the predicted data of the first target object includes the classification predicted data of the first target object and the attribute predicted data of the first target object; the predicted data of the second target object includes the predicted data of the second target object and the predicted data of the first target object. Two attribute prediction data of the target object.
在一种实施方式中,如图9所示,预测数据模块包括:In one embodiment, as shown in Figure 9, the prediction data module includes:
第一预测单元91,用于针对特征图的每一个像素,输出第一目标物体的锚点框预测数据和第二目标物体的锚点框预测数据;The first prediction unit 91 is configured to output the anchor frame prediction data of the first target object and the anchor frame prediction data of the second target object for each pixel of the feature map;
第二预测单元92,用于根据第一目标物体的锚点框预测数据和第二目标物体的锚点框预测数据,输出第一目标物体的预测数据和第二目标物体的预测数据。The second prediction unit 92 is configured to output the predicted data of the first target object and the predicted data of the second target object according to the predicted data of the anchor frame of the first target object and the predicted data of the anchor frame of the second target object.
在一种实施方式中,第一目标物体为人脸;第二目标物体为人体。In one embodiment, the first target object is a human face; the second target object is a human body.
在一种实施方式中,如图10所示,特征输出层包括主干网络和特征金字塔网络;特征图模块包括:In one embodiment, as shown in Figure 10, the feature output layer includes a backbone network and a feature pyramid network; the feature map module includes:
第一特征图单元101,用于通过主干网络,输出待处理图像的多张第一特征图;The first feature map unit 101 is configured to output multiple first feature maps of the image to be processed through the backbone network;
第一特征图输入单元102,用于,将多张第一特征图中的N张第二特征图输入特征金字塔网络,N为不小于1的整数;The first feature map input unit 102 is used to input N second feature maps in multiple first feature maps into the feature pyramid network, where N is an integer not less than 1;
第二特征图单元103,用于通过特征金字塔网络,输出N张第二特征图;The second feature map unit 103 is used to output N second feature maps through the feature pyramid network;
第二特征图处理单元104,用于将N张第二特征图作为特征图。The second feature map processing unit 104 is configured to use N second feature maps as feature maps.
本公开实施例还提供一种图像识别装置,如图11所示,包括:An embodiment of the present disclosure also provides an image recognition device, as shown in FIG. 11 , including:
第二输入模块111,用于将待识别图像输入识别模型,获得待识别图像中的第一目标物体的预测数据和与第一目标物体关联的第二目标物体的预测数据,识别模型为本公开任意一项实施例所提供的训练后的识别模型。The second input module 111 is used to input the image to be recognized into the recognition model, and obtain the prediction data of the first target object in the image to be recognized and the prediction data of the second target object associated with the first target object. The recognition model is the disclosure The trained recognition model provided by any one of the embodiments.
在一种实施方式中,待识别图像为待识别视频中的帧图像;如图12所示,识别装置还包括:In one embodiment, the image to be recognized is a frame image in the video to be recognized; as shown in Figure 12, the recognition device also includes:
关键帧图像模块121,用于根据第一目标物体的预测数据和第二目标物体的预测数据,获得待识别视频中的关键帧图像。The key frame image module 121 is configured to obtain a key frame image in the video to be recognized according to the prediction data of the first target object and the prediction data of the second target object.
本公开实施例各装置中的各单元、模块或子模块的功能可以参见上述方 法实施例中的对应描述,在此不再赘述。For the functions of each unit, module or submodule in each device in the embodiment of the present disclosure, refer to the corresponding description in the above method embodiment, and details are not repeated here.
根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
图13示出了可以用来实施本公开的实施例的示例电子设备130的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或要求的本公开的实现。FIG. 13 shows a schematic block diagram of an example electronic device 130 that may be used to implement embodiments of the present disclosure. Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
如图13所示,电子设备130包括计算单元131,其可以根据存储在只读存储器(ROM)132中的计算机程序或者从存储单元138加载到随机访问存储器(RAM)133中的计算机程序来执行各种适当的动作和处理。在RAM 133中,还可存储电子设备130操作所需的各种程序和数据。计算单元131、ROM 132以及RAM 133通过总线134彼此相连。输入输出(I/O)接口135也连接至总线134。As shown in FIG. 13 , the electronic device 130 includes a computing unit 131 that can be executed according to a computer program stored in a read-only memory (ROM) 132 or loaded from a storage unit 138 into a random access memory (RAM) 133 Various appropriate actions and treatments. In the RAM 133, various programs and data necessary for the operation of the electronic device 130 can also be stored. The calculation unit 131, the ROM 132, and the RAM 133 are connected to each other through a bus 134. An input-output (I/O) interface 135 is also connected to the bus 134 .
电子设备130中的多个部件连接至I/O接口135,包括:输入单元136,例如键盘、鼠标等;输出单元137,例如各种类型的显示器、扬声器等;存储单元138,例如磁盘、光盘等;以及通信单元139,例如网卡、调制解调器、无线通信收发机等。通信单元139允许电子设备130通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the electronic device 130 are connected to the I/O interface 135, including: an input unit 136, such as a keyboard, a mouse, etc.; an output unit 137, such as various types of displays, speakers, etc.; a storage unit 138, such as a magnetic disk, an optical disk etc.; and a communication unit 139, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 139 allows the electronic device 130 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.
计算单元131可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元131的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元131执行上文所描述的各个方法和处理,例如识别模型训练方法。例如,在一些实施例中,识别模型训练方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元138。在一些实施例中,计算机程序的部分或者全部可以经由ROM 132和/或通信单元139而被载入和/或安装到电子设备130上。当计算机程序加载到RAM 133并由计算单元131执行时,可以执行上文描述的识别模型训练方法的一 个或多个步骤。备选地,在其他实施例中,计算单元131可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行识别模型训练方法。The computing unit 131 may be various general and/or special purpose processing components having processing and computing capabilities. Some examples of computing units 131 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 131 executes various methods and processes described above, such as a recognition model training method. For example, in some embodiments, the recognition model training method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 138 . In some embodiments, part or all of the computer program can be loaded and/or installed on the electronic device 130 via the ROM 132 and/or the communication unit 139. When the computer program is loaded into the RAM 133 and executed by the computing unit 131, one or more steps of the identification model training method described above can be performed. Alternatively, in other embodiments, the computing unit 131 may be configured in any other appropriate way (for example, by means of firmware) to execute the recognition model training method.
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是 任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入、或者触觉输入来接收来自用户的输入。To provide for interaction with the user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Input from the user may be received through acoustic input, voice input, or tactile input.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN) and the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, each step described in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The specific implementation manners described above do not limit the protection scope of the present disclosure. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present disclosure shall be included within the protection scope of the present disclosure.
以上仅是本发明的优选实施方式,应当指出的是,上述优选实施方式不应视为对本发明的限制,本发明的保护范围应当以权利要求所限定的范围为准。对于本技术领域的普通技术人员来说,在不脱离本发明的精神和范围内,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only preferred implementations of the present invention, and it should be noted that the above preferred implementations should not be regarded as limiting the present invention, and the scope of protection of the present invention should be based on the scope defined in the claims. For those skilled in the art, without departing from the spirit and scope of the present invention, some improvements and modifications can also be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims (17)

  1. 一种识别模型训练方法,包括:A recognition model training method, comprising:
    将待处理图像输入待训练的识别模型;Input the image to be processed into the recognition model to be trained;
    通过所述待训练的识别模型的特征输出层,输出所述待处理图像的至少一张特征图;Outputting at least one feature map of the image to be processed through the feature output layer of the recognition model to be trained;
    通过所述待训练的识别模型的头部,根据所述至少一张特征图获取所述待处理图像中的第一目标物体的预测数据,以及所述待处理图像中的与所述第一目标物体的预测数据关联的第二目标物体的预测数据;Obtain the prediction data of the first target object in the image to be processed according to the at least one feature map through the head of the recognition model to be trained, and the prediction data of the first target object in the image to be processed and the first object in the image to be processed Predicted data of a second target object associated with the predicted data of the object;
    根据第一目标物体的预测数据、第二目标物体的预测数据、第一目标物体的标注数据和第二目标物体的标注数据,优化所述待训练的识别模型,得到训练后的识别模型。According to the predicted data of the first target object, the predicted data of the second target object, the labeled data of the first target object and the labeled data of the second target object, the recognition model to be trained is optimized to obtain the trained recognition model.
  2. 根据权利要求1所述的方法,其中,所述第一目标物体的预测数据包括所述第一目标物体的分类预测数据和所述第一目标物体的属性预测数据;所述第二目标物体的预测数据包括所述第二目标物体的预测数据和所述第二目标物体的属性预测数据。The method according to claim 1, wherein the predicted data of the first target object comprises the category predicted data of the first target object and the attribute predicted data of the first target object; the predicted data of the second target object The prediction data includes prediction data of the second target object and property prediction data of the second target object.
  3. 根据权利要求1或2中任意一项所述的方法,其中,所述通过所述待训练的识别模型的头部,输出第一目标物体的预测数据,以及与所述第一目标物体的预测数据关联的第二目标物体的预测数据,包括:The method according to any one of claims 1 or 2, wherein the prediction data of the first target object and the prediction data of the first target object are output through the head of the recognition model to be trained Predicted data of the second target object associated with the data, including:
    针对所述特征图的每一个像素,输出所述第一目标物体的锚点框预测数据和所述第二目标物体的锚点框预测数据;For each pixel of the feature map, output anchor box prediction data of the first target object and anchor box prediction data of the second target object;
    根据所述第一目标物体的锚点框预测数据和所述第二目标物体的锚点框预测数据,输出所述第一目标物体的预测数据和所述第二目标物体的预测数据。Outputting the predicted data of the first target object and the predicted data of the second target object according to the predicted data of the anchor frame of the first target object and the predicted data of the anchor frame of the second target object.
  4. 根据权利要求1-3中任意一项所述的方法,其中,所述第一目标物体为人脸;所述第二目标物体为人体。The method according to any one of claims 1-3, wherein the first target object is a human face; the second target object is a human body.
  5. 根据权利要求1-4中任意一项所述的方法,其中,所述特征输出层包括主干网络和特征金字塔网络;所述通过所述待训练的识别模型的特征输出层,输出所述待处理图像的至少一张特征图,包括:The method according to any one of claims 1-4, wherein the feature output layer includes a backbone network and a feature pyramid network; the feature output layer through the recognition model to be trained outputs the to-be-processed At least one feature map of the image, including:
    通过所述主干网络,输出所述待处理图像的多张第一特征图;Outputting multiple first feature maps of the image to be processed through the backbone network;
    将所述多张第一特征图中的N张第二特征图输入所述特征金字塔网络, N为不小于1的整数;Input N second feature maps in the plurality of first feature maps into the feature pyramid network, where N is an integer not less than 1;
    通过所述特征金字塔网络,输出N张第三特征图;Through the feature pyramid network, output N third feature maps;
    将所述N张第三特征图作为所述特征图。The N third feature maps are used as the feature maps.
  6. 一种识别方法,包括:A method of identification comprising:
    将待识别图像输入识别模型,获得所述待识别图像中的第一目标物体的预测数据和与所述第一目标物体关联的第二目标物体的预测数据,所述识别模型为权利要求1-5中任意一项所述的训练后的识别模型。Inputting the image to be recognized into the recognition model, obtaining the prediction data of the first target object in the image to be recognized and the prediction data of the second target object associated with the first target object, the recognition model is claim 1- The trained recognition model described in any one of 5.
  7. 根据权利要求6所述方法,其中,所述待识别图像为待识别视频中的帧图像;所述方法还包括:The method according to claim 6, wherein the image to be recognized is a frame image in a video to be recognized; the method further comprises:
    根据所述第一目标物体的预测数据和所述第二目标物体的预测数据,获得所述待识别视频中的关键帧图像。According to the prediction data of the first target object and the prediction data of the second target object, key frame images in the video to be recognized are obtained.
  8. 一种识别模型训练装置,包括:A recognition model training device, comprising:
    第一输入模块,用于将待处理图像输入待训练的识别模型;The first input module is used to input the image to be processed into the recognition model to be trained;
    特征图模块,用于通过所述待训练的识别模型的特征输出层,输出所述待处理图像的至少一张特征图;A feature map module, configured to output at least one feature map of the image to be processed through the feature output layer of the recognition model to be trained;
    预测数据模块,用于通过所述待训练的识别模型的头部,根据所述至少一张特征图获取所述待处理图像中的第一目标物体的预测数据,以及所述待处理图像中的与所述第一目标物体的预测数据关联的第二目标物体的预测数据;A prediction data module, configured to obtain the prediction data of the first target object in the image to be processed according to the at least one feature map through the head of the recognition model to be trained, and the predicted data for a second target object associated with predicted data for the first target object;
    训练模块,用于根据第一目标物体的预测数据、第二目标物体的预测数据、第一目标物体的标注数据和第二目标物体的标注数据,优化所述待训练的识别模型,得到训练后的识别模型。The training module is used to optimize the recognition model to be trained according to the predicted data of the first target object, the predicted data of the second target object, the labeled data of the first target object and the labeled data of the second target object, and obtain the trained recognition model.
  9. 根据权利要求8所述的装置,其中,所述第一目标物体的预测数据包括所述第一目标物体的分类预测数据和所述第一目标物体的属性预测数据;所述第二目标物体的预测数据包括所述第二目标物体的预测数据和所述第二目标物体的属性预测数据。The apparatus according to claim 8, wherein the predicted data of the first target object comprises the category predicted data of the first target object and the attribute predicted data of the first target object; the predicted data of the second target object The prediction data includes prediction data of the second target object and property prediction data of the second target object.
  10. 根据权利要求8或9中任意一项所述的装置,其中,所述预测数据模块包括:The device according to any one of claims 8 or 9, wherein the predicted data module comprises:
    第一预测单元,用于针对所述特征图的每一个像素,输出第所述一目标物体的锚点框预测数据和所述第二目标物体的锚点框预测数据;The first prediction unit is configured to output the anchor frame prediction data of the first target object and the anchor frame prediction data of the second target object for each pixel of the feature map;
    第二预测单元,用于根据所述第一目标物体的锚点框预测数据和所述第 二目标物体的锚点框预测数据,输出所述第一目标物体的预测数据和所述第二目标物体的预测数据。The second prediction unit is configured to output the prediction data of the first target object and the second target according to the prediction data of the anchor frame of the first target object and the prediction data of the anchor frame of the second target object. Object prediction data.
  11. 根据权利要求8-10中任意一项所述的装置,其中,所述第一目标物体为人脸;所述第二目标物体为人体。The device according to any one of claims 8-10, wherein the first target object is a human face; the second target object is a human body.
  12. 根据权利要求8-11中任意一项所述的装置,其中,所述特征输出层包括主干网络和特征金字塔网络;所述特征图模块包括:The device according to any one of claims 8-11, wherein the feature output layer includes a backbone network and a feature pyramid network; the feature map module includes:
    第一特征图单元,用于通过所述主干网络,输出待处理图像的多张第一特征图;The first feature map unit is configured to output a plurality of first feature maps of the image to be processed through the backbone network;
    第一特征图输入单元,用于,将所述多张第一特征图中的N张第二特征图输入所述特征金字塔网络,N为不小于1的整数;The first feature map input unit is configured to input N second feature maps in the plurality of first feature maps into the feature pyramid network, where N is an integer not less than 1;
    第二特征图单元,用于通过所述特征金字塔网络,输出N张第三特征图;The second feature map unit is used to output N third feature maps through the feature pyramid network;
    第二特征图处理单元,用于将所述N张第三特征图作为所述特征图。The second feature map processing unit is configured to use the N third feature maps as the feature maps.
  13. 一种识别装置,包括:An identification device comprising:
    第二输入模块,用于将待识别图像输入识别模型,获得所述待识别图像中的第一目标物体的预测数据和与所述第一目标物体关联的第二目标物体的预测数据,所述识别模型为权利要求8-12中任意一项所述的训练后的识别模型。The second input module is configured to input the image to be recognized into the recognition model, and obtain the prediction data of the first target object in the image to be recognized and the prediction data of the second target object associated with the first target object, the The recognition model is the trained recognition model described in any one of claims 8-12.
  14. 根据权利要求13所述装置,其中,所述待识别图像为待识别视频中的帧图像;所述装置还包括:The device according to claim 13, wherein the image to be recognized is a frame image in a video to be recognized; the device further comprises:
    关键帧图像模块,用于根据所述第一目标物体的预测数据和所述第二目标物体的预测数据,获得所述待识别视频中的关键帧图像。A key frame image module, configured to obtain a key frame image in the video to be recognized according to the prediction data of the first target object and the prediction data of the second target object.
  15. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    至少一个处理器;以及at least one processor; and
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-7中任一项所述的方法。The memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor, so that the at least one processor can perform any one of claims 1-7. Methods.
  16. 一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使计算机执行权利要求1-7中任一项所述的方法。A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to any one of claims 1-7.
  17. 一种计算机程序产品,包括计算机程序,该计算机程序在被处理器执行时实现根据权利要求1-7中任一项所述的方法。A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
PCT/CN2022/075119 2021-05-28 2022-01-29 Recognition model training method and apparatus, recognition method and apparatus, device, and storage medium WO2022247343A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2022544196A JP2023530796A (en) 2021-05-28 2022-01-29 Recognition model training method, recognition method, device, electronic device, storage medium and computer program
KR1020227025100A KR20220110321A (en) 2021-05-28 2022-01-29 Training method and apparatus for recognition model, recognition method and apparatus, electronic equipment, storage medium and computer program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110591890.8A CN113326773A (en) 2021-05-28 2021-05-28 Recognition model training method, recognition method, device, equipment and storage medium
CN202110591890.8 2021-05-28

Publications (1)

Publication Number Publication Date
WO2022247343A1 true WO2022247343A1 (en) 2022-12-01

Family

ID=77422175

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/075119 WO2022247343A1 (en) 2021-05-28 2022-01-29 Recognition model training method and apparatus, recognition method and apparatus, device, and storage medium

Country Status (4)

Country Link
JP (1) JP2023530796A (en)
KR (1) KR20220110321A (en)
CN (1) CN113326773A (en)
WO (1) WO2022247343A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326773A (en) * 2021-05-28 2021-08-31 北京百度网讯科技有限公司 Recognition model training method, recognition method, device, equipment and storage medium
CN113901911B (en) * 2021-09-30 2022-11-04 北京百度网讯科技有限公司 Image recognition method, image recognition device, model training method, model training device, electronic equipment and storage medium
CN114239761B (en) * 2022-02-25 2022-05-10 北京鉴智科技有限公司 Target detection model training method and device
CN114998575A (en) * 2022-06-29 2022-09-02 支付宝(杭州)信息技术有限公司 Method and apparatus for training and using target detection models

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428875A (en) * 2020-03-11 2020-07-17 北京三快在线科技有限公司 Image recognition method and device and corresponding model training method and device
US20200272888A1 (en) * 2019-02-24 2020-08-27 Microsoft Technology Licensing, Llc Neural network for skeletons from input images
CN111684490A (en) * 2017-12-03 2020-09-18 脸谱公司 Optimization of dynamic object instance detection, segmentation and structure mapping
US10902290B1 (en) * 2020-08-04 2021-01-26 Superb Ai Co., Ltd. Methods for training auto labeling device and performing auto labeling related to object detection while performing automatic verification by using uncertainty scores and devices using the same
CN113326773A (en) * 2021-05-28 2021-08-31 北京百度网讯科技有限公司 Recognition model training method, recognition method, device, equipment and storage medium
CN113901911A (en) * 2021-09-30 2022-01-07 北京百度网讯科技有限公司 Image recognition method, image recognition device, model training method, model training device, electronic equipment and storage medium

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346620B (en) * 2013-07-25 2017-12-29 佳能株式会社 To the method and apparatus and image processing system of the pixel classifications in input picture
CN106845432B (en) * 2017-02-07 2019-09-17 深圳市深网视界科技有限公司 A kind of method and apparatus that face detects jointly with human body
US20190130583A1 (en) * 2017-10-30 2019-05-02 Qualcomm Incorporated Still and slow object tracking in a hybrid video analytics system
CN110634120B (en) * 2018-06-05 2022-06-03 杭州海康威视数字技术股份有限公司 Vehicle damage judgment method and device
JP7255173B2 (en) * 2018-12-26 2023-04-11 オムロン株式会社 Human detection device and human detection method
US10817739B2 (en) * 2019-01-31 2020-10-27 Adobe Inc. Content-aware selection
CN110210304B (en) * 2019-04-29 2021-06-11 北京百度网讯科技有限公司 Method and system for target detection and tracking
GB2582833B (en) * 2019-04-30 2021-04-07 Huawei Tech Co Ltd Facial localisation in images
CN110502986A (en) * 2019-07-12 2019-11-26 平安科技(深圳)有限公司 Identify character positions method, apparatus, computer equipment and storage medium in image
CN111144215B (en) * 2019-11-27 2023-11-24 北京迈格威科技有限公司 Image processing method, device, electronic equipment and storage medium
CN111612820B (en) * 2020-05-15 2023-10-13 北京百度网讯科技有限公司 Multi-target tracking method, training method and device of feature extraction model
CN111640140B (en) * 2020-05-22 2022-11-25 北京百度网讯科技有限公司 Target tracking method and device, electronic equipment and computer readable storage medium
CN112597837B (en) * 2020-12-11 2024-05-28 北京百度网讯科技有限公司 Image detection method, apparatus, device, storage medium, and computer program product

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111684490A (en) * 2017-12-03 2020-09-18 脸谱公司 Optimization of dynamic object instance detection, segmentation and structure mapping
US20200272888A1 (en) * 2019-02-24 2020-08-27 Microsoft Technology Licensing, Llc Neural network for skeletons from input images
CN111428875A (en) * 2020-03-11 2020-07-17 北京三快在线科技有限公司 Image recognition method and device and corresponding model training method and device
US10902290B1 (en) * 2020-08-04 2021-01-26 Superb Ai Co., Ltd. Methods for training auto labeling device and performing auto labeling related to object detection while performing automatic verification by using uncertainty scores and devices using the same
CN113326773A (en) * 2021-05-28 2021-08-31 北京百度网讯科技有限公司 Recognition model training method, recognition method, device, equipment and storage medium
CN113901911A (en) * 2021-09-30 2022-01-07 北京百度网讯科技有限公司 Image recognition method, image recognition device, model training method, model training device, electronic equipment and storage medium

Also Published As

Publication number Publication date
JP2023530796A (en) 2023-07-20
KR20220110321A (en) 2022-08-05
CN113326773A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
WO2022247343A1 (en) Recognition model training method and apparatus, recognition method and apparatus, device, and storage medium
WO2023015941A1 (en) Text detection model training method and apparatus, text detection method, and device
US11810319B2 (en) Image detection method, device, storage medium and computer program product
WO2021258588A1 (en) Face image recognition method, apparatus and device and storage medium
WO2023016007A1 (en) Method and apparatus for training facial recognition model, and computer program product
CN113221771B (en) Living body face recognition method, device, apparatus, storage medium and program product
US20230030431A1 (en) Method and apparatus for extracting feature, device, and storage medium
KR20220153088A (en) Training method of video tag recommendation model and video tag determination method
KR20220126264A (en) Video jitter detection method and device, electronic equipment and storage medium
US20220343636A1 (en) Method and apparatus for establishing image recognition model, device, and storage medium
JP7401606B2 (en) Virtual object lip driving method, model training method, related equipment and electronic equipment
WO2022227765A1 (en) Method for generating image inpainting model, and device, medium and program product
WO2023273173A1 (en) Target segmentation method and apparatus, and electronic device
US20230017578A1 (en) Image processing and model training methods, electronic device, and storage medium
KR20230045098A (en) Video detection method, device, electronic device and storage medium
CN113221768A (en) Recognition model training method, recognition method, device, equipment and storage medium
US11756288B2 (en) Image processing method and apparatus, electronic device and storage medium
US20220172376A1 (en) Target Tracking Method and Device, and Electronic Apparatus
US11823494B2 (en) Human behavior recognition method, device, and storage medium
CN113378770A (en) Gesture recognition method, device, equipment, storage medium and program product
WO2023273344A1 (en) Vehicle line crossing recognition method and apparatus, electronic device, and storage medium
CN116611491A (en) Training method and device of target detection model, electronic equipment and storage medium
US20230245429A1 (en) Method and apparatus for training lane line detection model, electronic device and storage medium
US20230115765A1 (en) Method and apparatus of transferring image, and method and apparatus of training image transfer model
US20220327803A1 (en) Method of recognizing object, electronic device and storage medium

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 20227025100

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2022544196

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22810079

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22810079

Country of ref document: EP

Kind code of ref document: A1