CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a national phase application under 35 U.S.C. § 371 of International Patent Application No. PCT/CN2018/107388, filed on Sep. 25, 2018 which claims priority to Chinese Patent Application No. 201711003830.X, filed on Oct. 24, 2017, the entire contents of both of which are incorporated herein by reference.

TECHNICAL FIELD

The present disclosure relates to the technical field of video image segmentation, and in particular, to a video image segmentation method, a video image segmentation device, a computer-readable storage medium, and an electronic device.

BACKGROUND

With rapidly growth of e-commerce, competition among the major e-commerce platforms is also more and more intense. Therefore, in order to improve competitiveness and provide users with a more comprehensive product information, most of the e-commerce platforms provide users with more comprehensive product information by recording video of commodity and obtaining various orientated views by the method of video segmentation.

It should be noted that the information disclosed in the above background section is only for enhancing the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to those of ordinary skill in the art.

SUMMARY

The present disclosure is directed to provide a video image segmentation method, a video image segmentation device, a computer-readable storage medium, and an electronic device, so as to overcome, to a certain extent, one or more problems caused by limitation and defection of related art.

According to an aspect of the disclosure, there is provided a video image segmentation method, including:

obtaining an image segmentation model by performing machine learning based on a historical video image and a mask image of the historical video image;

adjusting the image segmentation model based on an initial frame of an image to be segmented, a previous frame of a frame to be segmented and a mask image of the previous image; and

performing segmentation on the image to be segmented using the image segmentation model after the adjusting.

According to an exemplary embodiment of the disclosure, the adjusting the image segmentation model based on an initial frame of an image to be segmented, a previous frame of a frame to be segmented and a mask image of the previous image includes:

determining whether a number of frames to be segmented of the image to be segmented exceeds a preset threshold; and

when the number of frames to be segmented of the image to be segmented does not exceed the preset threshold, adjusting the image segmentation model based on the initial frame of the image to be segmented, the previous frame of the frame to be segmented and the mask image of the previous image.

According to an exemplary embodiment of the disclosure, after the determining whether a number of frames to be segmented of the image to be segmented exceeds a preset threshold, the video image segmentation method further includes:

when the number of frames to be segmented of the image to be segmented exceeds the preset threshold, adjusting the image segmentation model based on the initial frame of the image to be segmented, a preset frame, the previous frame of the frame to be segmented and the mask image of the previous image.

According to an exemplary embodiment of the disclosure, the video image segmentation method further includes:

extracting the preset frame from the image to be segmented.

According to an exemplary embodiment of the disclosure, the extracting the preset frame from the image to be segmented includes:

obtaining an extraction frame number through multiplying the number of frames to be segmented by a preset value; and

extracting a frame corresponding to the extraction frame number as the preset frame.

According to an exemplary embodiment of the disclosure, the preset value is a value ranged 0.6-0.9.

According to an aspect of the disclosure, there is provided a video image segmentation apparatus, including:

a machine learning module, configured to obtain an image segmentation model by performing machine learning based on a historical video image and a mask image of the historical video image;

a model adjusting module, configured to adjust the image segmentation model based on an initial frame of an image to be segmented, a previous frame of a frame to be segmented and a mask image of the previous image; and

an image segmenting module, configured to perform segmentation on the image to be segmented using the image segmentation model after the adjusting.

According to an exemplary embodiment of the disclosure, the adjusting the image segmentation model based on an initial frame of an image to be segmented, a previous frame of a frame to be segmented and a mask image of the previous image includes:

determining whether a number of frames to be segmented of the image to be segmented exceeds a preset threshold; and

when the number of frames to be segmented of the image to be segmented does not exceed the preset threshold, adjusting the image segmentation model based on the initial frame of the image to be segmented, the previous frame of the frame to be segmented and the mask image of the previous image.

According to an exemplary embodiment of the disclosure, after the determining whether a number of frames to be segmented of the image to be segmented exceeds a preset threshold, the video image segmentation apparatus further includes:

when the number of frames to be segmented of the image to be segmented exceeds the preset threshold, adjusting the image segmentation model based on the initial frame of the image to be segmented, a preset frame, the previous frame of the frame to be segmented and the mask image of the previous image.

According to an exemplary embodiment of the disclosure, the video image segmentation apparatus further includes:

an extracting module, configured to extract the preset frame from the image to be segmented.

According to an exemplary embodiment of the disclosure, the extracting the preset frame from the image to be segmented includes:

obtaining an extraction frame number through multiplying the number of frames to be segmented by a preset value; and

extracting a frame corresponding to the extraction frame number as the preset frame.

According to an exemplary embodiment of the disclosure, the preset value is a value ranged 0.6-0.9.

According to an aspect of the disclosure, there is provided a computer-readable storage medium, having stored thereon a computer program, wherein the computer program, when being executed by a processor, implements the video image segmentation method according to any one of forgoing embodiments.

According to an aspect of the disclosure, there is provided an electronic device, including:

a processor; and

a memory for storing instructions executable by the processor;

wherein, the processor is configured to implement, by executing the instructions, the video image segmentation method according to any one of forgoing embodiments.

It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present disclosure.

