Method and apparatus for detecting occluded image and medium
AssigneeBeijing Xiaomi Pinecone Electronics Co., Ltd.
InventorsRuoyu Liu, Zhi Qu, Yasen Zhang, Yan Song, Zhipeng Ge
Life of this patent
Estimating the term…
Abstract
A method for detecting an occluded image. The method includes: after an image is captured by a camera, obtaining the image as an image to be detected; inputting the image to be detected into a trained occluded-image detection model, the occluded-image detection model is trained based on original occluded images and non-occluded images by using a trained data feature augmentation network; determining whether the image to be detected is an occluded image based on the occluded-image detection model; and outputting an image detection result.
Claims9
A method for detecting an occluded image, comprising:
- after an image is captured by a camera, obtaining the image as an image to be detected;
- inputting the image to be detected into a trained occluded-image detection model, wherein, the occluded-image detection model is trained based on original occluded images and non-occluded images by using a trained data feature augmentation network;
- determining whether the image to be detected is an occluded image based on the occluded-image detection model;
- and
- outputting an image detection result;
- the method further comprising:
- obtaining the original occluded images and the non-occluded images;
- training the data feature augmentation network based on the original occluded images;
- and
- training the occluded-image detection model based on the original occluded images and the non-occluded images by using the trained data feature augmentation network;
- wherein training the data feature augmentation network based on the original occluded images comprises:
- generating a finger template image and a non-finger image based on each original occluded image, wherein the finger template image is obtained by removing an area not occluded by a finger from the original occluded image, and the non-finger image is obtained by removing an area occluded by the finger from the original occluded image;
- and
- generating a plurality of training data sets, wherein each training data set comprises one finger template image, one non-finger image and one original occluded image, and a plurality of training data sets are used to train the data feature augmentation network in each round of training;
- wherein generating the finger template image and the non-finger image based on each original occluded image comprises:
- obtaining mask data based on the original occluded image, the mask data indicating an occluded location in the original occluded image;
- and
- generating the finger template image and the non-finger image based on the original occluded image and the mask data;
- wherein training the occluded-image detection model based on the original occluded images and the non-occluded images by using the trained data feature augmentation network comprises:
- obtaining a processed non-occluded image based on the mask data and the non-occluded image, wherein the processed non-occluded image is obtained by removing an area corresponding to the mask data from the non-occluded image;
- inputting the finger template image and the processed non-occluded image into the trained data feature augmentation network to generate a generation feature of the non-occluded image;
- inputting the original occluded image into a feature network to extract an original feature of the original occluded image, the occluded-image detection model comprising the feature network;
- inputting the generation feature of the non-occluded image and the original feature of the original occluded image into a classification network for training, the occluded-image detection model comprising the classification network;
- and
- determining that the training of the data feature augmentation network is finished when a loss function of the occluded-image detection model converges.
A device for detecting an occluded image, comprising:
- a processor;
- and
- a memory configured to store instructions executable by the processor;
- wherein the processor is configured to:
- after an image is captured by a camera, obtain the image as an image to be detected;
- input the image to be detected into a trained occluded-image detection model, wherein, the occluded-image detection model is trained based on original occluded images and non-occluded images by using a trained data feature augmentation network;
- determine whether the image to be detected is an occluded image based on the occluded-image detection model;
- and
- output an image detection result;
- wherein the processor is configured to:
- obtain the original occluded images and the non-occluded images;
- train the data feature augmentation network based on the original occluded images;
- and
- train the occluded-image detection model based on the original occluded images and the non-occluded images by using the trained data feature augmentation network;
- wherein the processor is configured to:
- generate a finger template image and a non-finger image based on each original occluded image, wherein the finger template image is obtained by removing an area not occluded by a finger from the original occluded image, and the non-finger image is obtained by removing an area occluded by the finger from the original occluded image;
- and
- generate a plurality of training data sets, wherein each training data set comprises one finger template image, one non-finger image and one original occluded image, and a plurality of training data sets are used to train the data feature augmentation network in each round of training;
- wherein the processor is configured to:
- obtain mask data based on the original occluded image, the mask data indicating an occluded location in the original occluded image;
- and
- generate the finger template image and the non-finger image based on the original occluded image and the mask data;
- wherein the processor is configured to:
- obtain a processed non-occluded image based on the mask data and the non-occluded image, wherein the processed non-occluded image is obtained by removing an area corresponding to the mask data from the non-occluded image;
- input the finger template image and the processed non-occluded image into the trained data feature augmentation network to generate a generation feature of the non-occluded image;
- input the original occluded image into a feature network to extract an original feature of the original occluded image, the occluded-image detection model comprising the feature network;
- input the generation feature of the non-occluded image and the original feature of the original occluded image into a classification network for training, the occluded-image detection model comprising the classification network;
- and
- determine that the training of the data feature augmentation network is finished when a loss function of the occluded-image detection model converges.
A non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor of a router, causes the router to perform a method for detecting an occluded image, the method comprising:
- after an image is captured by a camera, obtaining the image as an image to be detected;
- inputting the image to be detected into a trained occluded-image detection model, wherein, the occluded-image detection model is trained based on original occluded images and non-occluded images by using a trained data feature augmentation network;
- determining whether the image to be detected is an occluded image based on the occluded-image detection model;
- and
- outputting an image detection result;
- the method further comprising:
- obtaining the original occluded images and the non-occluded images;
- training the data feature augmentation network based on the original occluded images;
- and
- training the occluded-image detection model based on the original occluded images and the non-occluded images by using the trained data feature augmentation network;
- wherein training the data feature augmentation network based on the original occluded images comprises:
- generating a finger template image and a non-finger image based on each original occluded image, wherein the finger template image is obtained by removing an area not occluded by a finger from the original occluded image, and the non-finger image is obtained by removing an area occluded by the finger from the original occluded image;
- and
- generating a plurality of training data sets, wherein each training data set comprises one finger template image, one non-finger image and one original occluded image, and a plurality of training data sets are used to train the data feature augmentation network in each round of training;
- wherein generating the finger template image and the non-finger image based on each original occluded image comprises:
- obtaining mask data based on the original occluded image, the mask data indicating an occluded location in the original occluded image;
- and
- generating the finger template image and the non-finger image based on the original occluded image and the mask data;
- wherein training the occluded-image detection model based on the original occluded images and the non-occluded images by using the trained data feature augmentation network comprises:
- obtaining a processed non-occluded image based on the mask data and the non-occluded image, wherein the processed non-occluded image is obtained by removing an area corresponding to the mask data from the non-occluded image;
- inputting the finger template image and the processed non-occluded image into the trained data feature augmentation network to generate a generation feature of the non-occluded image;
- inputting the original occluded image into a feature network to extract an original feature of the original occluded image, the occluded-image detection model comprising the feature network;
- inputting the generation feature of the non-occluded image and the original feature of the original occluded image into a classification network for training, the occluded-image detection model comprising the classification network;
- and
- determining that the training of the data feature augmentation network is finished when a loss function of the occluded-image detection model converges.
Dependencies are inferred from the claim text.