Method, apparatus, electronic device and readable storage medium for classifying video
AssigneeBeijing Baidu Netcom Science Technology Co., Ltd.
InventorWenhao Wu
Life of this patent
Estimating the term…
Abstract
A method, an apparatus, an electronic device and a computer readable storage medium for classifying a video are provided. The method may include: acquiring a to-be-classified video and an image complexity of the to-be-classified video; extracting a feature map with a resolution corresponding to the image complexity from the to-be-classified video; and determining a target video class to which the to-be-classified video belongs based on the feature map.
Claims16
A method for classifying a video, the method comprising:
- acquiring a to-be-classified video and an image complexity of the to-be-classified video, wherein the image complexity of the to-be-classified video comprises a number of colors per unit area of image content of the to-be-classified video;
- extracting a feature map with a resolution corresponding to the image complexity from the to-be-classified video, wherein extracting the feature map with the resolution corresponding to the image complexity from the to-be-classified video comprises:
- determining that the image complexity of the to-be-classified video is lower than a preset complexity, wherein the preset complexity comprises a preset number of colors per unit area greater than the number of colors per unit area of image content of the to-be-classified video;
- and
- reducing the resolution of the to-be-classified video in response to determining that the number of colors per unit area of image content of the to-be-classified video is smaller than the preset number of colors per unit area;
- and
- determining a target video class to which the to-be-classified video belongs based on the feature map.
An electronic device, comprising:
- at least one processor;
- and
- a memory communicatively connected with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions, when executed by the at least one processor, cause the at least one processor to perform operations comprising:
- acquiring a to-be-classified video and an image complexity of the to-be-classified video, wherein the image complexity of the to-be-classified video comprises a number of colors per unit area of image content of the to-be-classified video;
- extracting a feature map with a resolution corresponding to the image complexity from the to-be-classified video, wherein extracting the feature map with the resolution corresponding to the image complexity from the to-be-classified video comprises:
- determining that the image complexity of the to-be-classified video is lower than a preset complexity, wherein the preset complexity comprises a preset number of colors per unit area greater than the number of colors per unit area of image content of the to-be- classified video;
- and
- reducing the resolution of the to-be-classified video in response to determining that the number of colors per unit area of image content of the to-be-classified video is smaller than the preset number of colors per unit area;
- and
- determining a target video class to which the to-be-classified video belongs based on the feature map.
A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions, when executed by a computer, cause the computer to perform operations comprising:
- acquiring a to-be-classified video and an image complexity of the to-be-classified video wherein the image complexity of the to-be-classified video comprises a number of colors per unit area of image content of the to-be-classified video;
- extracting a feature map with a resolution corresponding to the image complexity from the to-be-classified video, wherein extracting the feature map with the resolution corresponding to the image complexity from the to-be-classified video comprises:
- determining that the image complexity of the to-be-classified video is lower than a preset complexity, wherein the preset complexity comprises a preset number of colors per unit area greater than the number of colors per unit area of image content of the to-be- classified video;
- and
- reducing the resolution of the to-be-classified video in response to determining that the number of colors per unit area of image content of the to-be-classified video is smaller than the preset number of colors per unit area;
- and
- determining a target video class to which the to-be-classified video belongs based on the feature map.
Dependencies are inferred from the claim text.