Patent ID: 11899710
Assignee: BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 3:
4. An electronic device, comprising:
at least one processor; and
a memory communicatively connected 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 to enable the at least one processor to perform operations of:
performing joint training on a first sub-network configured for recognition processing and a second sub-network configured for retrieval processing in a classification network by adopting an identical set of training data to obtain a trained target classification network, wherein, the first sub-network and the second sub-network are twin networks that are consistent in network structures and share a set of weights; and
inputting image data to be recognized into the target classification network to obtain a recognition result;
wherein the performing joint training on the first sub-network configured for recognition processing and the second sub-network configured for retrieval processing in the classification network by adopting the identical set of training data comprises:
for the first sub-network, training the first sub-network based on first sample data in the training data and classification labels for the corresponding data; and
for the second sub-network, randomly generating a first sample data pair based on the first sample data in the training data, and training the second sub-network based on the first sample data pair and an identification label of the corresponding data pair
wherein the instructions are executable by the at least one processor to enable the at least one processor to further perform an operation of:
inputting a first feature output by a last one convolution layer of the first sub-network into a classifier to perform feature classification and then output a first loss function during training the first sub-network
performing feature comparison between a second feature output by a last one convolution layer of the second sub-network and the first feature to output a second loss function during training the second sub-network;
obtaining a third loss function based on the first loss function and the second loss function; and
completing the joint training on the first sub-network and the second sub-network based on a back propagation of the third loss function to obtain the target classification network.