A method and device for constructing a picture training set

By overlaying the first original picture on the second original picture and building a Weibo picture training set, the problem of poor classification of Weibo pictures in the existing technology is solved, and the recognition efficiency of Weibo pictures is improved.

CN113191430BActive Publication Date: 2025-04-25SHANGHAI MIDU INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110475978.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-29
Publication Date
2025-04-25
Estimated Expiration
2041-04-29

AI Technical Summary

Technical Problem

When building a Weibo image training set, the existing technology failed to effectively consider the particularity of Weibo images, resulting in poor classification of special forms of pictures in Weibo.

Method used

By obtaining the first original picture and the second original picture, where the height of the second original picture is greater than the first original picture, the first original picture is sequentially overwritten the second original picture in order from top to bottom, the pictures are generated for training, and the pictures are used as the training set.

Benefits of technology

The training set constructed by this method is more suitable for the recognition of specific images after training, which improves the recognition efficiency of Weibo pictures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113191430B_ABST
    Figure CN113191430B_ABST
Patent Text Reader

Abstract

The purpose of the present application is to provide a method and device for constructing a picture training set. Compared with the prior art, the present application obtains a first original picture and a second original picture, wherein the height of the second original picture is greater than the first original picture, and sequentially covers the first original picture with the second original picture from top to bottom, generates a picture for training, and then uses the generated multiple pictures for training as pictures in the picture training set. Constructing a training set in this way can make the training set more suitable for the recognition of specific pictures after training, for example, improving the recognition efficiency of Weibo pictures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a technology for constructing a picture training set. Background Art

[0002] For the recognition of Weibo images, for example, for the recognition of Weibo fire images, data enhancement is generally not used, or traditional data enhancement methods are used. In terms of traditional data enhancement, operations such as removing the mean, adding noise, and rotating are generally used. The particularity of Weibo images is not taken into account, so special forms of images that appear in Weibo cannot be classified or the classification effect is extremely poor. Summary of the invention

[0003] The purpose of this application is to provide a method and device for constructing a picture training set.

[0004] According to one aspect of the present application, a method for constructing a picture training set is provided, wherein the method comprises:

[0005] Obtain a first original image and a second original image, wherein the second original image is taller than the first original image;

[0006] The first original image is sequentially covered with the second original image in order from top to bottom to generate an image for training;

[0007] The generated multiple images for training are used as image training sets.

[0008] Optionally, the first original picture is, and the second original picture is a white picture.

[0009] Optionally, the second original image is a image containing text, and the first original image is a image not containing text.

[0010] Optionally, the gaps between the first original pictures are preset pixels.

[0011] Optionally, the width of the first original picture is the same as that of the second original picture, and the height of the second original picture is a preset multiple of the first original picture.

[0012] Optionally, the method further comprises:

[0013] The image training set is input into the neural network model for training until the accuracy of the neural network model in recognizing the text on the image reaches a preset threshold

[0014] According to another aspect of the present application, a device for constructing a picture training set is also provided, wherein the device comprises:

[0015] A first device is used to obtain a first original picture and a second original picture, wherein the height of the second original picture is greater than that of the first original picture;

[0016] The second device is used to sequentially cover the first original image with the second original image in order from top to bottom to generate an image for training;

[0017] The third device is used to use the generated multiple pictures for training as pictures in a picture training set.

[0018] According to another aspect of the present application, a computer-readable medium is provided, on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the operations of the aforementioned method.

[0019] Compared with the prior art, the present application obtains a first original picture and a second original picture, wherein the height of the second original picture is greater than that of the first original picture, and sequentially covers the first original picture with the second original picture from top to bottom to generate pictures for training, and then uses the generated multiple pictures for training as pictures in the picture training set. By constructing the training set in this way, the training set can be more suitable for the recognition of specific pictures after training, for example, improving the recognition efficiency of microblog pictures. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0021] Figure 1 A flow chart of a method for constructing a picture training set according to one aspect of the present application is shown;

[0022] Figure 2 A schematic diagram of a device for constructing a picture training set according to another aspect of the present application is shown.

[0023] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION

[0024] The present invention is further described in detail below in conjunction with the accompanying drawings.

[0025] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (CPU), input / output interfaces, network interfaces and memories.

[0026] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0027] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0028] In order to further explain the technical means adopted by the present application and the effects achieved, the technical solution of the present application is clearly and completely described below in combination with the accompanying drawings and preferred embodiments.

[0029] Figure 1 A method for constructing a picture training set according to one aspect of the present application is shown, and the method is executed on a device 1, and the method includes the following steps:

[0030] S11: obtaining a first original picture and a second original picture, wherein the height of the second original picture is greater than that of the first original picture;

[0031] S12: sequentially covering the first original image with the second original image in order from top to bottom to generate an image for training;

[0032] S13 uses the generated multiple pictures for training as a picture training set.

[0033] In this application, the device 1 includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud composed of a plurality of servers; here, the cloud is composed of a large number of computers or network servers based on cloud computing, wherein cloud computing is a type of distributed computing, a virtual supercomputer composed of a group of loosely coupled computer sets. The above device 1 is only an example, and other existing or future devices 1 that may be applied to this application should be included in the scope of protection of this application, and are hereby included by reference.

[0034] In this embodiment, in step S11, the device 1 obtains a first original picture and a second original picture, wherein the height of the second original picture is greater than that of the first original picture. Here, the first original picture and the second original picture include pictures collected directly from the Internet, or pictures obtained from certain platforms, for example, pictures directly obtained from Weibo, etc. Here, there is no limitation on the method of obtaining the first original picture and the second original picture.

[0035] Preferably, the second original picture is a white picture. In this embodiment, the first original picture may include a picture obtained in real time from a network platform or a picture obtained locally, and the second original picture may be a cropped white picture, that is, the second original picture is a blank picture. Preferably, the width of the first original picture is the same as that of the second original picture, and the height of the second original picture is a preset multiple of the first original picture. For example, the width of the first original picture is 500 pixels and the height is 300 pixels, the width of the second original picture is 500 pixels and the height is 5*300 pixels, etc. Here, the sizes of the first original picture and the second original picture are only for example and are not specifically limited.

[0036] Preferably, the second original picture is a picture containing text, and the first original picture is a picture without text. The width of the first original picture is the same as that of the second original picture, and the height of the second original picture is a preset multiple of the first original picture.

[0037] Continuing in this embodiment, in step S12, the device 1 sequentially covers the second original picture with the first original picture in order from top to bottom to generate a picture for training. Here, multiple first original pictures can sequentially cover the second original picture, wherein two adjacent first original pictures can be closely connected or have a certain gap, preferably, wherein the gap between the first original pictures is a preset pixel, for example, the gap between adjacent first original pictures is 100 pixels. Here, the multiple first original pictures can be the same first original picture or different first original pictures, which is not limited here.

[0038] Continuing in this embodiment, in step S13, the device 1 uses the generated multiple pictures for training as pictures in the picture training set. Here, the picture training set may include multiple pictures and pictures generated by the first original picture and the second original picture. Preferably, the pictures generated by the first original picture and the second original picture may occupy 20% of the entire picture training set. Here, the percentage is only an example and can be set based on actual needs.

[0039] Preferably, the method further comprises: S14 (not shown) inputting the picture training set into a neural network model for training until the accuracy of the neural network model in recognizing text on the picture reaches a preset threshold. In this embodiment, after the picture training set is constructed, it can be used for training the neural network model. Here, the neural network model includes but is not limited to any network model that can recognize pictures. In this solution, no specific limitation is made on the specific neural network model. Preferably, the present application is particularly suitable for the recognition of Weibo fire pictures.

[0040] Compared with the prior art, the present application obtains a first original picture and a second original picture, wherein the height of the second original picture is greater than that of the first original picture, and sequentially covers the first original picture with the second original picture from top to bottom to generate pictures for training, and then uses the generated multiple pictures for training as pictures in the picture training set. By constructing the training set in this way, the training set can be more suitable for the recognition of specific pictures after training, for example, improving the recognition efficiency of microblog pictures.

[0041] According to another aspect of the present application, a device 1 for constructing a picture training set is also provided, the device comprising the following means:

[0042] A first device is used to obtain a first original picture and a second original picture, wherein the height of the second original picture is greater than that of the first original picture;

[0043] The second device is used to sequentially cover the first original image with the second original image in order from top to bottom to generate an image for training;

[0044] The third device is used to use the generated multiple pictures for training as pictures in a picture training set.

[0045] In this application, the device 1 includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud composed of a plurality of servers; here, the cloud is composed of a large number of computers or network servers based on cloud computing, wherein cloud computing is a type of distributed computing, a virtual supercomputer composed of a group of loosely coupled computer sets. The above device 1 is only an example, and other existing or future devices 1 that may be applied to this application should be included in the scope of protection of this application, and are hereby included by reference.

[0046] In this embodiment, the first device of the device 1 obtains a first original picture and a second original picture, wherein the height of the second original picture is greater than that of the first original picture. Here, the first original picture and the second original picture include pictures collected directly from the Internet, or pictures obtained from certain platforms, for example, pictures directly obtained from Weibo, etc. Here, there is no limitation on the method of obtaining the first original picture and the second original picture.

[0047] Preferably, the second original picture is a white picture. In this embodiment, the first original picture may include a picture obtained in real time from a network platform or a picture obtained locally, and the second original picture may be a cropped white picture, that is, the second original picture is a blank picture. Preferably, the width of the first original picture is the same as that of the second original picture, and the height of the second original picture is a preset multiple of the first original picture. For example, the width of the first original picture is 500 pixels and the height is 300 pixels, the width of the second original picture is 500 pixels and the height is 5*300 pixels, etc. Here, the sizes of the first original picture and the second original picture are only for example and are not specifically limited.

[0048] Preferably, the second original picture is a picture containing text, and the first original picture is a picture without text. The width of the first original picture is the same as that of the second original picture, and the height of the second original picture is a preset multiple of the first original picture.

[0049] Continuing in this embodiment, the second device of the device 1 sequentially covers the first original picture with the second original picture in order from top to bottom to generate a picture for training. Here, multiple first original pictures can be sequentially covered with the second original picture, wherein two adjacent first original pictures can be closely connected or have a certain gap, preferably, wherein the gap between the first original pictures is a preset pixel, for example, the gap between adjacent first original pictures is 100 pixels. Here, the multiple first original pictures can be the same first original picture or different first original pictures, which is not limited here.

[0050] Continuing in this embodiment, the third device of the device 1 uses the generated multiple pictures for training as pictures in the picture training set. Here, the picture training set may include multiple pictures and pictures generated by the first original picture and the second original picture. Preferably, the pictures generated by the first original picture and the second original picture may occupy 20% of the entire picture training set. Here, the percentage is only an example and can be set based on actual needs.

[0051] Preferably, the device further comprises: a fourth device (not shown) inputting the picture training set into a neural network model for training until the accuracy of the neural network model in recognizing text on the picture reaches a preset threshold. In this embodiment, after the picture training set is constructed, it can be used for training the neural network model. Here, the neural network model includes but is not limited to any network model that can recognize pictures. In this solution, no specific limitation is made on the specific neural network model.

[0052] In addition, an embodiment of the present application also provides a computer-readable medium on which computer-readable instructions are stored, and the computer-readable instructions can be executed by a processor to implement the aforementioned method.

[0053] The embodiment of the present application also provides a device for constructing a picture training set, wherein the device includes:

[0054] one or more processors; and

[0055] A memory storing computer readable instructions which, when executed, cause the processor to perform the operations of the aforementioned method.

[0056] For example, when the computer-readable instructions are executed, the one or more processors: obtain a first original image and a second original image, wherein the height of the second original image is greater than that of the first original image; sequentially cover the second original image with the first original image in order from top to bottom to generate images for training; and use the generated multiple images for training as an image training set.

[0057] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. A method for constructing a picture training set, wherein: The method comprises: Obtain a first original image and a second original image, wherein the second original image is taller than the first original image, wherein the second original image is a white image, and wherein the first original image and the second original image include images directly collected from the Internet; The first original picture is sequentially covered with the second original picture in order from top to bottom to generate a picture for training, wherein the gap between adjacent first original pictures is a preset pixel, the width of the first original picture is the same as that of the second original picture, and the height of the second original picture is a preset multiple of the first original picture, wherein the preset pixel is 100 pixels; The generated multiple pictures for training are used as pictures in a picture training set, wherein the generated multiple pictures for training occupy 20 percent of the entire picture training set.

2. The method according to claim 1, wherein: The second original picture is a picture containing text, and the first original picture is a picture not containing text.

3. The method according to any one of claims 1 to 2, wherein: The method further comprises: The image training set is input into the neural network model for training until the accuracy of the neural network model in recognizing text on the image reaches a preset threshold.

4. A device for constructing a picture training set, wherein: The device comprises: A first device is used to obtain a first original picture and a second original picture, wherein the second original picture is higher than the first original picture, wherein the second original picture is a white picture, and wherein the first original picture and the second original picture include pictures collected directly from the Internet; A second device is used to sequentially cover the first original picture with the second original picture in order from top to bottom to generate a picture for training, wherein the gap between adjacent first original pictures is a preset pixel, the width of the first original picture is the same as that of the second original picture, and the height of the second original picture is a preset multiple of the first original picture, wherein the preset pixel is 100 pixels; The third device is used to use the generated multiple pictures for training as pictures in a picture training set, wherein the generated multiple pictures for training occupy 20 percent of the entire picture training set.

5. A computer-readable medium having computer-readable instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1 to 3.

6. A device for constructing a picture training set, wherein: The equipment includes: one or more processors; and A memory storing computer readable instructions which, when executed, cause the processor to perform the operations of the method as claimed in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Model training method and device, memory medium and electronic device

    CN108236784A