CN113744176A - Image data enhancement method and device and electronic equipment - Google Patents

Image data enhancement method and device and electronic equipment Download PDF

Info

Publication number
CN113744176A
CN113744176A CN202111091055.4A CN202111091055A CN113744176A CN 113744176 A CN113744176 A CN 113744176A CN 202111091055 A CN202111091055 A CN 202111091055A CN 113744176 A CN113744176 A CN 113744176A
Authority
CN
China
Prior art keywords
image
rectangular frame
enhancement
coordinate
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202111091055.4A
Other languages
Chinese (zh)
Inventor
王驹冬
沈振翼
刘凤余
陈怡�
朱家健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhuofan Information Technology Co ltd
Original Assignee
Shanghai Zhuofan Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zhuofan Information Technology Co ltd filed Critical Shanghai Zhuofan Information Technology Co ltd
Priority to CN202111091055.4A priority Critical patent/CN113744176A/en
Publication of CN113744176A publication Critical patent/CN113744176A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a method, a device and electronic equipment for enhancing image data, which relate to the technical field of image processing and comprise the steps of obtaining an image sample and a plurality of image enhancement strategies; classifying the plurality of image enhancement strategies; performing priority ordering based on the categories of the plurality of image enhancement strategies to obtain a preset sequence; randomly selecting target enhancement strategies meeting the preset number from the plurality of image enhancement strategies; and executing the target enhancement strategy on the image sample based on the preset sequence to obtain an enhanced image. The method and the device reduce the number of parameters needing manual adjustment for image data enhancement, and reduce the application threshold of image data enhancement.

Description

Image data enhancement method and device and electronic equipment
Technical Field
The present invention relates to the field of image data processing technologies, and in particular, to a method and an apparatus for enhancing image data, and an electronic device.
Background
In recent years, neural networks have achieved significant success in tasks such as image recognition, object detection, and scene segmentation. In order to improve the robustness and generalization capability of the neural network, the neural network is often required to be trained by using large-scale data. In a real situation, there are often situations where training data is insufficient, and in this case, the data enhancement technology is very important. The training data are subjected to data enhancement by using a data enhancement technology, so that the number of the training data can be increased, and the diversity of the training data can be improved.
At present, the data enhancement step generally needs to manually adjust more parameters, and the data enhancement strategy is selected from a plurality of data enhancement strategies, the execution sequence of the data enhancement strategy is selected, the probability of the data enhancement strategy is considered, the distortion degree of the data enhancement strategy is selected, and the like.
Therefore, a method, an apparatus and an electronic device for enhancing image data are provided.
Disclosure of Invention
The present specification provides a method, an apparatus, and an electronic device for enhancing image data, which reduce the number of parameters that need to be manually adjusted for enhancing image data, and reduce the application threshold for enhancing image data.
The image data enhancement method provided by the application adopts the following technical scheme that the method comprises the following steps:
acquiring an image sample and a plurality of image enhancement strategies;
classifying the plurality of image enhancement strategies;
performing priority ordering based on the categories of the plurality of image enhancement strategies to obtain a preset sequence;
randomly selecting target enhancement strategies meeting the preset number from the plurality of image enhancement strategies;
and executing the target enhancement strategy on the image sample based on the preset sequence to obtain an enhanced image.
Optionally, the executing the target enhancement policy on the image sample based on the preset order to obtain an enhanced image includes:
when the target enhancement strategy comprises a plurality of categories of image enhancement strategies, executing the target enhancement strategies on the image samples according to a preset sequence to obtain a first enhanced image;
and when the target enhancement strategy comprises a class of image enhancement strategy, executing the target enhancement strategy on the image samples according to a random sequence to obtain a second enhanced image.
Optionally, the method for enhancing image data further includes:
adding a rectangular frame in the image sample based on the key image;
judging whether the enhanced image needs to be subjected to rectangular frame transformation;
and when the enhanced image needs to be subjected to rectangular frame transformation, performing rectangular frame transformation on the enhanced image to obtain a target image.
Optionally, the determining whether the enhanced image needs to be subjected to rectangular frame transformation includes:
the categories of the plurality of image enhancement strategies comprise a first characteristic classified data enhancement strategy, a second characteristic classified data enhancement strategy and a third characteristic classified data enhancement strategy;
judging whether the target enhancement strategy comprises an image enhancement strategy of the second feature classification or an image enhancement strategy of the third feature classification;
and when the target enhancement strategy comprises the image enhancement strategy of the second characteristic classification or the image enhancement strategy of the third characteristic classification, judging whether the rectangular frame of the enhanced image is displaced or not.
Optionally, the determining whether the rectangular frame of the enhanced image is displaced includes:
acquiring coordinates of a rectangular frame and coordinates of a key image;
comparing the key image coordinate with the rectangular frame coordinate, and judging whether the key image coordinate is overlapped with the rectangular frame coordinate or not, or judging whether the key image coordinate is positioned in the rectangular frame coordinate or not;
when the key image coordinates are overlapped with the rectangular frame coordinates, or the key image coordinates are positioned in the rectangular frame coordinates, the enhanced image does not need to be subjected to rectangular frame transformation;
and when the key image coordinate is not overlapped with the rectangular frame coordinate, or the key image coordinate is not positioned in the rectangular frame coordinate, the enhanced image needs to be subjected to rectangular frame transformation.
Optionally, when the enhanced image needs to be subjected to rectangular frame transformation, performing rectangular frame transformation on the enhanced image to obtain a target image, including:
when the key image coordinate is not overlapped with the rectangular frame coordinate, moving the rectangular frame until the key image coordinate is overlapped with the rectangular frame coordinate, or amplifying the rectangular frame until the key image coordinate is in the rectangular frame coordinate to obtain a first target image;
and when the key image coordinate is not located in the rectangular frame coordinate, moving the rectangular frame until the key image coordinate is overlapped with the rectangular frame coordinate, or amplifying the rectangular frame until the key image coordinate is located in the rectangular frame coordinate to obtain a second target image.
Optionally, the determining whether the enhanced image needs to be subjected to rectangular frame transformation includes:
and when the enhanced image does not need to be subjected to rectangular frame transformation, the enhanced image is the target image.
The device for enhancing image data provided by the application adopts the following technical scheme that the device comprises:
the acquisition module is used for acquiring an image sample and a plurality of image enhancement strategies;
a classification module to classify the plurality of image enhancement strategies;
the sorting module is used for carrying out priority sorting on the basis of the categories of the plurality of image enhancement strategies to obtain a preset sequence;
the extraction module is used for randomly selecting target enhancement strategies meeting the preset number from the plurality of image enhancement strategies;
and the execution module is used for executing the target enhancement strategy on the image sample based on the preset sequence to obtain an enhanced image.
Optionally, the executing module includes:
a first result unit, configured to, when the target enhancement policy includes multiple categories of image enhancement policies, execute the target enhancement policy on the image samples according to a preset order to obtain a first enhanced image;
and the second result unit is used for executing the target enhancement strategies on the image samples according to a random sequence to obtain a second enhanced image when the target enhancement strategies contain a class of image enhancement strategies.
Optionally, the apparatus for enhancing image data further comprises:
the adding module is used for adding a rectangular frame into the image sample based on the key image;
the judging module is used for judging whether the enhanced image needs to be subjected to rectangular frame transformation;
and the transformation module is used for performing rectangular frame transformation on the enhanced image to obtain a target image when the enhanced image needs to be subjected to rectangular frame transformation.
Optionally, the determining module includes:
the classification result unit is used for classifying the plurality of image enhancement strategies into a data enhancement strategy of a first characteristic classification, a data enhancement strategy of a second characteristic classification and a data enhancement strategy of a third characteristic classification;
a first judging unit, configured to judge whether the target enhancement policy includes an image enhancement policy of the second feature classification or an image enhancement policy of the third feature classification;
a second determining unit, configured to determine whether a rectangular frame of the enhanced image is displaced when the target enhancement policy includes the image enhancement policy of the second feature classification or the image enhancement policy of the third feature classification.
Optionally, the second judging unit includes:
acquiring coordinates of a rectangular frame and coordinates of a key image;
comparing the key image coordinate with the rectangular frame coordinate, and judging whether the key image coordinate is overlapped with the rectangular frame coordinate or not, or judging whether the key image coordinate is positioned in the rectangular frame coordinate or not;
when the key image coordinates are overlapped with the rectangular frame coordinates, or the key image coordinates are positioned in the rectangular frame coordinates, the enhanced image does not need to be subjected to rectangular frame transformation;
and when the key image coordinate is not overlapped with the rectangular frame coordinate, or the key image coordinate is not positioned in the rectangular frame coordinate, the enhanced image needs to be subjected to rectangular frame transformation.
Optionally, the transformation module includes:
a third result unit, configured to, when the key image coordinate does not overlap with the rectangular frame coordinate, move the rectangular frame until the key image coordinate overlaps with the rectangular frame coordinate, or enlarge the rectangular frame until the key image coordinate is within the rectangular frame coordinate, to obtain a first target image;
and the fourth result unit is used for moving the rectangular frame until the key image coordinate is overlapped with the rectangular frame coordinate or amplifying the rectangular frame until the key image coordinate is in the rectangular frame coordinate to obtain a second target image when the key image coordinate is not in the rectangular frame coordinate.
Optionally, the determining whether the enhanced image needs to be subjected to rectangular frame transformation includes:
and when the enhanced image does not need to be subjected to rectangular frame transformation, the enhanced image is the target image.
The present specification also provides an electronic device, wherein the electronic device includes:
a processor; and the number of the first and second groups,
a memory storing computer-executable instructions that, when executed, cause the processor to perform any of the methods described above.
The present specification also provides a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement any of the methods described above.
According to the method and the device, manual operation is not required to be performed in the execution environment manually, the error probability in the block chain upgrading process is greatly reduced, the workload of an implementer is reduced, and the implementer can successfully upgrade the block chain without knowing the bottom technology of the block chain.
Drawings
FIG. 1 is a schematic diagram illustrating a method for enhancing image data according to an embodiment of the present disclosure;
FIG. 2 is a schematic structural diagram of an apparatus for enhancing image data according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
Detailed Description
The following description is presented to disclose the invention so as to enable any person skilled in the art to practice the invention. The preferred embodiments in the following description are given by way of example only, and other obvious variations will occur to those skilled in the art. The basic principles of the invention, as defined in the following description, may be applied to other embodiments, variations, modifications, equivalents, and other technical solutions without departing from the spirit and scope of the invention.
Exemplary embodiments of the present invention are described more fully below with reference to the accompanying figures 1-4. The exemplary embodiments, however, may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art. The same reference numerals denote the same or similar elements, components, or parts in the drawings, and thus their repetitive description will be omitted.
Features, structures, characteristics or other details described in a particular embodiment do not preclude the fact that the features, structures, characteristics or other details may be combined in a suitable manner in one or more other embodiments in accordance with the technical idea of the invention.
In describing particular embodiments, the present invention has been described with reference to features, structures, characteristics or other details that are within the purview of one skilled in the art to provide a thorough understanding of the embodiments. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific features, structures, characteristics, or other details.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The term "and/or" and/or "includes all combinations of any one or more of the associated listed items.
Fig. 1 is a schematic diagram illustrating a method for enhancing image data according to an embodiment of the present disclosure, where the method may include:
s101: acquiring an image sample and a plurality of image enhancement strategies.
S102: classifying the plurality of image enhancement strategies.
In the embodiment of the specification, an image sample and a plurality of image enhancement strategies are obtained, wherein the image sample comprises an image sample randomly extracted from an image library and an image sample selected based on requirements; the number of the image enhancement strategies can be set according to experience, and can also be freely adjusted according to application scenes. Several image enhancement strategies include, but are not limited to, rotation transformations, flipping transformations, scaling transformations, translation transformations, contrast transformations, color transformations, and the like. And classifying a plurality of image enhancement strategies based on functions, wherein the categories comprise a color space enhancement strategy, a geometric space enhancement strategy, a matting enhancement strategy and the like.
S103: and carrying out priority sequencing based on the categories of the plurality of image enhancement strategies to obtain a preset sequence.
In the embodiment of the present specification, the predetermined sequence includes executing the color space enhancement policy first, then executing the geometric space policy, and finally executing the matting enhancement policy. And executing according to a preset sequence, and converting when the image sample executes the geometric space strategy and is not easy to cause blank, when the image sample preferentially executes the color space enhancement strategy.
S104: and randomly selecting target enhancement strategies meeting the preset number from the plurality of image enhancement strategies.
S105: and executing the target enhancement strategy on the image sample based on the preset sequence to obtain an enhanced image.
Optionally, the executing the target enhancement policy on the image sample based on the preset order to obtain an enhanced image includes:
when the target enhancement strategy comprises a plurality of categories of image enhancement strategies, executing the target enhancement strategies on the image samples according to a preset sequence to obtain a first enhanced image;
and when the target enhancement strategy comprises a class of image enhancement strategy, executing the target enhancement strategy on the image samples according to a random sequence to obtain a second enhanced image.
In the embodiment of the present specification, a target enhancement policy that meets a preset number is randomly selected from a plurality of image enhancement policies, and the preset number may be set empirically or may be freely adjusted according to actual needs. And giving a uniform preset intensity to the target enhancement strategy, wherein the preset intensity can be set according to experience and can be adjusted according to the picture sample, and meanwhile, the target enhancement strategy, the preset number and the preset intensity are recorded so as to facilitate later inquiry. When the target enhancement strategy comprises two or more image enhancement strategies, processing the image sample according to the sequence of preferentially executing a color space enhancement strategy, then executing a space geometric enhancement strategy and finally executing a matting enhancement strategy to obtain a first enhanced image; and when the target enhancement strategy comprises the image enhancement strategy of only one category, executing the target enhancement strategy on the image samples according to a random sequence to obtain a second enhanced image.
Optionally, the method for enhancing image data further includes:
adding a rectangular frame in the image sample based on the key image;
judging whether the enhanced image needs to be subjected to rectangular frame transformation;
and when the enhanced image needs to be subjected to rectangular frame transformation, performing rectangular frame transformation on the enhanced image to obtain a target image.
In an embodiment of the present specification, key images are selected with a rectangular frame in an image sample, the key images including specific images selected as needed. And judging whether the image sample, namely the enhanced image, which is processed by the target strategy needs to be subjected to rectangular frame transformation, and when the enhanced image needs to be subjected to rectangular frame transformation, performing rectangular frame transformation on the enhanced image to obtain a target image, wherein the target image is used as a picture material of a target detection task.
Optionally, the determining whether the enhanced image needs to be subjected to rectangular frame transformation includes:
the categories of the plurality of image enhancement strategies comprise a first characteristic classified data enhancement strategy, a second characteristic classified data enhancement strategy and a third characteristic classified data enhancement strategy;
judging whether the target enhancement strategy comprises an image enhancement strategy of the second feature classification or an image enhancement strategy of the third feature classification;
and when the target enhancement strategy comprises the image enhancement strategy of the second characteristic classification or the image enhancement strategy of the third characteristic classification, judging whether the rectangular frame of the enhanced image is displaced or not.
Optionally, the determining whether the rectangular frame of the enhanced image is displaced includes:
acquiring coordinates of a rectangular frame and coordinates of a key image;
comparing the key image coordinate with the rectangular frame coordinate, and judging whether the key image coordinate is overlapped with the rectangular frame coordinate or not, or judging whether the key image coordinate is positioned in the rectangular frame coordinate or not;
when the key image coordinates are overlapped with the rectangular frame coordinates, or the key image coordinates are positioned in the rectangular frame coordinates, the enhanced image does not need to be subjected to rectangular frame transformation;
and when the key image coordinate is not overlapped with the rectangular frame coordinate, or the key image coordinate is not positioned in the rectangular frame coordinate, the enhanced image needs to be subjected to rectangular frame transformation.
Optionally, when the enhanced image needs to be subjected to rectangular frame transformation, performing rectangular frame transformation on the enhanced image to obtain a target image, including:
when the key image coordinate is not overlapped with the rectangular frame coordinate, moving the rectangular frame until the key image coordinate is overlapped with the rectangular frame coordinate, or amplifying the rectangular frame until the key image coordinate is in the rectangular frame coordinate to obtain a first target image;
and when the key image coordinate is not located in the rectangular frame coordinate, moving the rectangular frame until the key image coordinate is overlapped with the rectangular frame coordinate, or amplifying the rectangular frame until the key image coordinate is located in the rectangular frame coordinate to obtain a second target image.
Optionally, the determining whether the enhanced image needs to be subjected to rectangular frame transformation includes:
and when the enhanced image does not need to be subjected to rectangular frame transformation, the enhanced image is the target image.
In an embodiment of the present specification, the categories of the plurality of image enhancement policies include a data enhancement policy of a first feature classification, a data enhancement policy of a second feature classification, and a data enhancement policy of a third feature classification, where the data enhancement policy of the first feature classification includes a color space enhancement policy, the data enhancement policy of the second feature classification includes a geometric space enhancement policy, and the enhancement policy of the third feature classification includes a matting enhancement policy. And judging whether the target enhancement strategy comprises a geometric space enhancement strategy or a cutout enhancement strategy, and when the target enhancement strategy does not comprise the geometric space enhancement strategy or the cutout enhancement strategy, the enhanced image is the target image. When the target enhancement strategy comprises a geometric space enhancement strategy or a cutout enhancement strategy, whether the rectangular frame of the enhanced image is displaced or not is judged. Acquiring a rectangular frame coordinate and a key image coordinate, comparing the key image coordinate with the rectangular frame coordinate, and judging whether the key image coordinate is overlapped with the rectangular frame coordinate or not, or judging whether the key image coordinate is positioned in the rectangular frame coordinate or not; when the key image coordinates are overlapped with the rectangular frame coordinates, or the key image coordinates are positioned in the rectangular frame coordinates, the enhanced image does not need to be subjected to rectangular frame transformation; when the key image coordinates do not overlap with the rectangular frame coordinates, or the key image coordinates do not lie within the rectangular frame coordinates, the enhanced image needs to be subjected to rectangular frame transformation. When the key image coordinate is not overlapped with the rectangular frame coordinate, moving the rectangular frame until the key image coordinate is overlapped with the rectangular frame coordinate, or amplifying the rectangular frame until the key image coordinate is in the rectangular frame coordinate to obtain a first target image; and when the key image coordinate is not located in the rectangular frame coordinate, moving the rectangular frame until the key image coordinate is overlapped with the rectangular frame coordinate, or amplifying the rectangular frame until the key image coordinate is located in the rectangular frame coordinate to obtain a second target image.
In the embodiment of the description, manual operation is not required to be performed in an execution environment, so that the error probability in the block chain upgrading process is greatly reduced, and the workload of an implementer is reduced, so that the implementer can successfully upgrade the block chain without solving the underlying technology of the block chain.
Fig. 2 is a schematic structural diagram of an apparatus for enhancing image data provided in an embodiment of the present specification, where the apparatus may include:
the acquisition module is used for acquiring an image sample and a plurality of image enhancement strategies;
a classification module to classify the plurality of image enhancement strategies;
the sorting module is used for carrying out priority sorting on the basis of the categories of the plurality of image enhancement strategies to obtain a preset sequence;
the extraction module is used for randomly selecting target enhancement strategies meeting the preset number from the plurality of image enhancement strategies;
and the execution module is used for executing the target enhancement strategy on the image sample based on the preset sequence to obtain an enhanced image.
Optionally, the executing module includes:
a first result unit, configured to, when the target enhancement policy includes multiple categories of image enhancement policies, execute the target enhancement policy on the image samples according to a preset order to obtain a first enhanced image;
and the second result unit is used for executing the target enhancement strategies on the image samples according to a random sequence to obtain a second enhanced image when the target enhancement strategies contain a class of image enhancement strategies.
Optionally, the apparatus for enhancing image data further comprises:
the adding module is used for adding a rectangular frame into the image sample based on the key image;
the judging module is used for judging whether the enhanced image needs to be subjected to rectangular frame transformation;
and the transformation module is used for performing rectangular frame transformation on the enhanced image to obtain a target image when the enhanced image needs to be subjected to rectangular frame transformation.
Optionally, the determining module includes:
the classification result unit is used for classifying the plurality of image enhancement strategies into a data enhancement strategy of a first characteristic classification, a data enhancement strategy of a second characteristic classification and a data enhancement strategy of a third characteristic classification;
a first judging unit, configured to judge whether the target enhancement policy includes an image enhancement policy of the second feature classification or an image enhancement policy of the third feature classification;
a second determining unit, configured to determine whether a rectangular frame of the enhanced image is displaced when the target enhancement policy includes the image enhancement policy of the second feature classification or the image enhancement policy of the third feature classification.
Optionally, the second judging unit includes:
acquiring coordinates of a rectangular frame and coordinates of a key image;
comparing the key image coordinate with the rectangular frame coordinate, and judging whether the key image coordinate is overlapped with the rectangular frame coordinate or not, or judging whether the key image coordinate is positioned in the rectangular frame coordinate or not;
when the key image coordinates are overlapped with the rectangular frame coordinates, or the key image coordinates are positioned in the rectangular frame coordinates, the enhanced image does not need to be subjected to rectangular frame transformation;
and when the key image coordinate is not overlapped with the rectangular frame coordinate, or the key image coordinate is not positioned in the rectangular frame coordinate, the enhanced image needs to be subjected to rectangular frame transformation.
Optionally, the transformation module includes:
a third result unit, configured to, when the key image coordinate does not overlap with the rectangular frame coordinate, move the rectangular frame until the key image coordinate overlaps with the rectangular frame coordinate, or enlarge the rectangular frame until the key image coordinate is within the rectangular frame coordinate, to obtain a first target image;
and the fourth result unit is used for moving the rectangular frame until the key image coordinate is overlapped with the rectangular frame coordinate or amplifying the rectangular frame until the key image coordinate is in the rectangular frame coordinate to obtain a second target image when the key image coordinate is not in the rectangular frame coordinate.
Optionally, the determining whether the enhanced image needs to be subjected to rectangular frame transformation includes:
and when the enhanced image does not need to be subjected to rectangular frame transformation, the enhanced image is the target image.
The functions of the apparatus in the embodiment of the present invention have been described in the above method embodiments, so that reference may be made to the related descriptions in the foregoing embodiments for details that are not described in the present embodiment, and further details are not described herein.
Based on the same inventive concept, the embodiment of the specification further provides the electronic equipment.
In the following, embodiments of the electronic device of the present invention are described, which may be regarded as specific physical implementations for the above-described embodiments of the method and apparatus of the present invention. Details described in the embodiments of the electronic device of the invention should be considered supplementary to the embodiments of the method or apparatus described above; for details which are not disclosed in embodiments of the electronic device of the invention, reference may be made to the above-described embodiments of the method or the apparatus.
Fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. An electronic device 300 according to this embodiment of the invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 3, electronic device 300 is embodied in the form of a general purpose computing device. The components of electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one memory unit 320, a bus 330 connecting the various system components (including the memory unit 320 and the processing unit 310), a display unit 340, and the like.
Wherein the storage unit stores program code executable by the processing unit 310 to cause the processing unit 310 to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned processing method section of the present specification. For example, the processing unit 310 may perform the steps as shown in fig. 1.
The storage unit 320 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)3201 and/or a cache storage unit 3202, and may further include a read only memory unit (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 300, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 300 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 350. Also, the electronic device 300 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 360. Network adapter 360 may communicate with other modules of electronic device 300 via bus 330. It should be appreciated that although not shown in FIG. 3, other hardware and/or software modules may be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments of the present invention described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention. The computer program, when executed by a data processing apparatus, enables the computer readable medium to implement the above-described method of the invention, namely: such as the method shown in fig. 1.
Fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
A computer program implementing the method shown in fig. 1 may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components in embodiments in accordance with the invention may be implemented in practice using a general purpose data processing device such as a microprocessor or a Digital Signal Processor (DSP). The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method of image data enhancement, comprising:
acquiring an image sample and a plurality of image enhancement strategies;
classifying the plurality of image enhancement strategies;
performing priority ordering based on the categories of the plurality of image enhancement strategies to obtain a preset sequence;
randomly selecting target enhancement strategies meeting the preset number from the plurality of image enhancement strategies;
and executing the target enhancement strategy on the image sample based on the preset sequence to obtain an enhanced image.
2. The method of image data enhancement according to claim 1, wherein said performing the target enhancement strategy on the image samples based on the preset order, resulting in an enhanced image, comprises:
when the target enhancement strategy comprises a plurality of categories of image enhancement strategies, executing the target enhancement strategies on the image samples according to a preset sequence to obtain a first enhanced image;
and when the target enhancement strategy comprises a class of image enhancement strategy, executing the target enhancement strategy on the image samples according to a random sequence to obtain a second enhanced image.
3. The method of image data enhancement of claim 1, further comprising:
adding a rectangular frame in the image sample based on the key image;
judging whether the enhanced image needs to be subjected to rectangular frame transformation;
and when the enhanced image needs to be subjected to rectangular frame transformation, performing rectangular frame transformation on the enhanced image to obtain a target image.
4. The method of image data enhancement according to claim 3, wherein said determining whether the enhanced image requires rectangular frame transformation comprises:
the categories of the plurality of image enhancement strategies comprise a first characteristic classified data enhancement strategy, a second characteristic classified data enhancement strategy and a third characteristic classified data enhancement strategy;
judging whether the target enhancement strategy comprises an image enhancement strategy of the second feature classification or an image enhancement strategy of the third feature classification;
and when the target enhancement strategy comprises the image enhancement strategy of the second characteristic classification or the image enhancement strategy of the third characteristic classification, judging whether the rectangular frame of the enhanced image is displaced or not.
5. The method of image data enhancement according to claim 4, wherein said determining whether the rectangular frame of the enhanced image is displaced comprises:
acquiring coordinates of a rectangular frame and coordinates of a key image;
comparing the key image coordinate with the rectangular frame coordinate, and judging whether the key image coordinate is overlapped with the rectangular frame coordinate or not, or judging whether the key image coordinate is positioned in the rectangular frame coordinate or not;
when the key image coordinates are overlapped with the rectangular frame coordinates, or the key image coordinates are positioned in the rectangular frame coordinates, the enhanced image does not need to be subjected to rectangular frame transformation;
and when the key image coordinate is not overlapped with the rectangular frame coordinate, or the key image coordinate is not positioned in the rectangular frame coordinate, the enhanced image needs to be subjected to rectangular frame transformation.
6. The method for enhancing image data according to claim 5, wherein when the enhanced image needs to be subjected to rectangular frame transformation, the rectangular frame transformation is performed on the enhanced image to obtain a target image, and the method comprises:
when the key image coordinate is not overlapped with the rectangular frame coordinate, moving the rectangular frame until the key image coordinate is overlapped with the rectangular frame coordinate, or amplifying the rectangular frame until the key image coordinate is in the rectangular frame coordinate to obtain a first target image;
and when the key image coordinate is not located in the rectangular frame coordinate, moving the rectangular frame until the key image coordinate is overlapped with the rectangular frame coordinate, or amplifying the rectangular frame until the key image coordinate is located in the rectangular frame coordinate to obtain a second target image.
7. The method of image data enhancement according to claim 2, wherein said determining whether the enhanced image requires rectangular frame transformation comprises:
and when the enhanced image does not need to be subjected to rectangular frame transformation, the enhanced image is the target image.
8. An apparatus for image data enhancement, comprising:
the acquisition module is used for acquiring an image sample and a plurality of image enhancement strategies;
a classification module to classify the plurality of image enhancement strategies;
the sorting module is used for carrying out priority sorting on the basis of the categories of the plurality of image enhancement strategies to obtain a preset sequence;
the extraction module is used for randomly selecting target enhancement strategies meeting the preset number from the plurality of image enhancement strategies;
and the execution module is used for executing the target enhancement strategy on the image sample based on the preset sequence to obtain an enhanced image.
9. An electronic device, wherein the electronic device comprises:
a processor;
and a memory storing computer-executable instructions that, when executed, cause the processor to perform the method of any of claims 1-7.
10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-7.
CN202111091055.4A 2021-09-17 2021-09-17 Image data enhancement method and device and electronic equipment Withdrawn CN113744176A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111091055.4A CN113744176A (en) 2021-09-17 2021-09-17 Image data enhancement method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111091055.4A CN113744176A (en) 2021-09-17 2021-09-17 Image data enhancement method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113744176A true CN113744176A (en) 2021-12-03

Family

ID=78739592

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111091055.4A Withdrawn CN113744176A (en) 2021-09-17 2021-09-17 Image data enhancement method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113744176A (en)

Similar Documents

Publication Publication Date Title
Wagner et al. SPHIRE-crYOLO is a fast and accurate fully automated particle picker for cryo-EM
CN108595583B (en) Dynamic graph page data crawling method, device, terminal and storage medium
CN108509915B (en) Method and device for generating face recognition model
US10936911B2 (en) Logo detection
CN110349147B (en) Model training method, fundus macular region lesion recognition method, device and equipment
CN111160569A (en) Application development method and device based on machine learning model and electronic equipment
CN111552833A (en) Intelligent double recording method, device and storage medium
CN109635844B (en) Method and device for training classifier and method and device for detecting watermark
JP2013222461A (en) Secure cropping of license plate images
CN109934229B (en) Image processing method, device, medium and computing equipment
CN106202086B (en) Picture processing and obtaining method, device and system
US20230417700A1 (en) Automated analysis of analytical gels and blots
CN109801275B (en) Potato disease detection method and system based on image recognition
US11748865B2 (en) Hierarchical image decomposition for defect detection
CN112308069A (en) Click test method, device, equipment and storage medium for software interface
CN111368878A (en) Optimization method based on SSD target detection, computer equipment and medium
CN108665769B (en) Network teaching method and device based on convolutional neural network
CN111783766B (en) Method and device for recognizing image characters step by step and electronic equipment
CN113744176A (en) Image data enhancement method and device and electronic equipment
CN115439850B (en) Method, device, equipment and storage medium for identifying image-text characters based on examination sheets
CN111178200A (en) Identification method of instrument panel indicator lamp and computing equipment
CN116342973A (en) Data labeling method and system based on semi-supervised learning
CN111783787A (en) Method and device for identifying image characters and electronic equipment
CN117235728B (en) Malicious code gene detection method and device based on fine granularity labeling model
US11741732B2 (en) Techniques for detecting text

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20211203

WW01 Invention patent application withdrawn after publication