CN117372275A - Image dataset expansion method and device and electronic equipment - Google Patents

Image dataset expansion method and device and electronic equipment Download PDF

Info

Publication number
CN117372275A
CN117372275A CN202311452992.7A CN202311452992A CN117372275A CN 117372275 A CN117372275 A CN 117372275A CN 202311452992 A CN202311452992 A CN 202311452992A CN 117372275 A CN117372275 A CN 117372275A
Authority
CN
China
Prior art keywords
image
expanded
flaw
data set
dataset
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.)
Pending
Application number
CN202311452992.7A
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.)
Kaiduo Intelligent Technology Shanghai Co ltd
Original Assignee
Kaiduo Intelligent Technology Shanghai 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 Kaiduo Intelligent Technology Shanghai Co ltd filed Critical Kaiduo Intelligent Technology Shanghai Co ltd
Priority to CN202311452992.7A priority Critical patent/CN117372275A/en
Publication of CN117372275A publication Critical patent/CN117372275A/en
Pending legal-status Critical Current

Links

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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention provides an image data set expansion method, an image data set expansion device and electronic equipment, which comprise the following steps: acquiring an image dataset to be expanded; extracting a flaw image with a flaw outline marked in advance in an image data set to be expanded; preprocessing the flaw image to obtain a preprocessed image; fusing the preprocessed image with the image data set to be expanded or with a preset qualified image data set to obtain an expanded image data set; the qualified image dataset is used to indicate a dataset of pre-set qualified background image compositions. According to the method, the flaw data in the image data set to be expanded is extracted, and the image data set after expansion is obtained in a mode of recombining the image data set with the original image or the qualified image after various treatments, and the flaw image is fully expanded, so that the obtained image set is full of flaw data, and the practical application value of the image set is improved.

Description

Image dataset expansion method and device and electronic equipment
Technical Field
The present invention relates to the field of image enhancement, and in particular, to an image dataset expansion method, an image dataset expansion device, and an electronic device.
Background
In the industrial field, the same conventional data expansion method causes too large a change in the background of the picture and insufficient flaw change due to the stability of the background of the industrial picture.
Overall, the practical application value of the image set obtained by the existing image enhancement method is low.
Disclosure of Invention
The invention aims to provide an image data set expansion method, an image data set expansion device and electronic equipment, so that the technical problem that the practical application value of an image set is low due to insufficient flaw data of the image set obtained by the existing image expansion method is solved, and the practical application value of the image set is improved.
In a first aspect, an embodiment of the present invention provides an image dataset expansion method, including: acquiring an image dataset to be expanded; extracting a flaw image with a flaw outline marked in advance in the image data set to be expanded; preprocessing the flaw image to obtain a preprocessed image; fusing the preprocessed image with the image data set to be expanded or with a preset qualified image data set to obtain an expanded image data set; the above-mentioned qualified image data set is used for indicating a data set composed of a preset qualified background image.
In a preferred embodiment of the present invention, the step of preprocessing the above-mentioned flaw image to obtain a preprocessed image includes: cutting the flaw image to obtain a cut flaw image; rotating the cut flaw image based on a preset rotation angle to obtain a rotated flaw image; and obtaining a preprocessed image according to the rotated flaw image.
In a preferred embodiment of the present invention, the predetermined rotation angle is in the range of 0 to 360 °.
In a preferred embodiment of the present invention, the step of obtaining a preprocessed image according to the rotated defective image includes: scaling the rotated flaw image to obtain a scaled flaw image; and obtaining a preprocessed image according to the scaled flaw image.
In a preferred embodiment of the present invention, the step of extracting the flaw image with the flaw outline marked in advance in the image data set to be expanded includes: and extracting the flaw image with the flaw outline marked in advance in the image data set to be expanded through a preset opencv tool.
In a preferred embodiment of the present invention, the step of fusing the preprocessed image with the image dataset to be expanded or with a preset qualified image to obtain an expanded image dataset includes: fusing the preprocessed image with a first preset position of the image dataset to be expanded to obtain an expanded image dataset, or fusing the preprocessed image with a second preset position of the image of the qualified image dataset to obtain an expanded image dataset.
In a preferred embodiment of the present invention, the step of fusing the preprocessed image with the first preset position of the image dataset to be expanded to obtain the expanded image dataset includes: fusing the preprocessed image with the first preset position of the image dataset to be expanded through the following formula to obtain an expanded image dataset: pix_new=ratio =ratio ×
pix_org+ (1-ratio) pix_found, where pix_new represents a pixel value of the first preset position of the image of the extended image dataset, ratio represents a preset image fusion coefficient, pix_org is a pixel value of the first preset position of the image to be extended, and pix_found represents a pixel value of the pre-processed image.
In a preferred embodiment of the present invention, after the step of fusing the preprocessed image with the image dataset to be expanded or with a preset qualified image dataset, the method includes: training a preset deep learning model through the expanded image data set until a preset training ending condition is reached, so as to obtain a trained deep learning model; the deep learning model is used for detecting flaws of industrial images.
In a second aspect, an embodiment of the present invention provides an image dataset expansion apparatus, including: the image acquisition module is used for acquiring an image data set to be expanded; the flaw image extraction module is used for extracting flaw images with flaw outlines marked in advance in the image data set to be expanded; the image preprocessing module is used for preprocessing the flaw image to obtain a preprocessed image; the image fusion module is used for fusing the preprocessed image with the image data set to be expanded or with a preset qualified image data set to obtain an expanded image data set; the above-mentioned qualified image data set is used for indicating a data set composed of a preset qualified background image.
In a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores computer-executable instructions that can be executed by the processor, and where the processor executes the computer-executable instructions to implement the image dataset expansion method.
The embodiment of the invention has the following beneficial technical effects:
the embodiment of the invention provides an image data set expansion method, an image data set expansion device and electronic equipment, which comprise the following steps: acquiring an image dataset to be expanded; extracting a flaw image with a flaw outline marked in advance in the image data set to be expanded; preprocessing the flaw image to obtain a preprocessed image; fusing the preprocessed image with the image data set to be expanded or with a preset qualified image data set to obtain an expanded image data set; the above-mentioned qualified image data set is used for indicating a data set composed of a preset qualified background image. According to the method, the flaw data in the image data set to be expanded is extracted, and the image data set after expansion is obtained in a mode of recombining the image data set with the original image or the qualified image after various treatments, and the flaw image is fully expanded, so that the obtained image set is full of flaw data, and the practical application value of the image set is improved.
Additional features and advantages of the present embodiments will be set forth in the description which follows, or in part will be obvious from the description, or may be learned by practice of the techniques of the present disclosure.
The foregoing objects, features and advantages of the disclosure will be more readily apparent from the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of an image dataset expansion method according to an embodiment of the present invention;
fig. 2 is a flow chart of an image dataset expansion method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an image dataset expansion apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Icon: 11-an image acquisition module; 12-a flaw image extraction module; 13-an image preprocessing module; 14-an image fusion module; 21-a memory; a 22-processor; a 23-bus; 24-communication interface.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
In the industrial field, the same conventional data expansion method causes too large a change in the background of the picture and insufficient flaw change due to the stability of the background of the industrial picture. Overall, the practical application value of the image set obtained by the existing image enhancement method is low.
Based on the above, the embodiment of the invention provides an image dataset expansion method, an image dataset expansion device and electronic equipment, and the method obtains an expanded image dataset by extracting flaw data in the image dataset to be expanded and recombining the flaw data with an original image or a qualified image after various treatments. For the convenience of understanding the embodiments of the present invention, a method for expanding an image dataset disclosed in the embodiments of the present invention will be described in detail.
Example 1
The embodiment of the invention provides an image data set expansion method. Fig. 1 is a flowchart of an image dataset expansion method according to an embodiment of the present invention.
As seen in fig. 1, the above method includes:
step S101: an image dataset to be expanded is acquired.
In this embodiment, the image data set to be expanded is a data set composed of a plurality of industrial images.
Step S102: and extracting the flaw image with the flaw outline marked in advance in the image data set to be expanded.
Here, each of the industrial images in the image data set to be expanded includes a defective image having a defective outline marked in advance. If: the industrial image is a photographed pipeline image, and the pipeline image is provided with a cracking flaw image with a flaw outline of 'pipeline cracking'.
Step S103: and preprocessing the flaw image to obtain a preprocessed image.
In this embodiment, the preprocessing is generally corresponding operations of performing data enhancement such as rotation, scaling, translation, and image cutting on the defective image.
Step S104: fusing the preprocessed image with the image data set to be expanded or with a preset qualified image data set to obtain an expanded image data set; the above-mentioned qualified image data set is used for indicating a data set composed of a preset qualified background image.
The embodiment of the invention provides an image data set expansion method, which comprises the following steps: acquiring an image dataset to be expanded; extracting a flaw image with a flaw outline marked in advance in the image data set to be expanded; preprocessing the flaw image to obtain a preprocessed image; fusing the preprocessed image with the image data set to be expanded or with a preset qualified image data set to obtain an expanded image data set; the above-mentioned qualified image data set is used for indicating a data set composed of a preset qualified background image. According to the method, the flaw data in the image data set to be expanded is extracted, and the image data set after expansion is obtained in a mode of recombining the image data set with the original image or the qualified image after various treatments, and the flaw image is fully expanded, so that the obtained image set is full of flaw data, and the practical application value of the image set is improved.
Example 2
Fig. 2 is a flow chart of an image dataset expansion method according to an embodiment of the present invention based on embodiment 1.
As seen in fig. 2, the method comprises:
step S201: an image dataset to be expanded is acquired.
Step S202: and extracting the flaw image with the flaw outline marked in advance in the image data set to be expanded.
In this embodiment, the step S202 includes: and extracting the flaw image with the flaw outline marked in advance in the image data set to be expanded through a preset opencv tool.
Step S203: and cutting the flaw image to obtain a cut flaw image.
Step S204: and rotating the cut flaw image based on a preset rotation angle to obtain a rotated flaw image.
In this embodiment, the preset rotation angle is in the range of 0 ° to 360 °.
Step S205: and obtaining a preprocessed image according to the rotated flaw image.
In the present embodiment, the steps S203 to S205 may be in any order, for example: firstly, rotating the flaw image to obtain a rotated flaw image; and then cutting the rotated flaw image to obtain a cut flaw image and the like.
Further, the step S205 further includes: scaling the rotated flaw image to obtain a scaled flaw image; and obtaining a preprocessed image according to the scaled flaw image.
Step S206: fusing the preprocessed image with the image data set to be expanded or with a preset qualified image data set to obtain an expanded image data set; the above-mentioned qualified image data set is used for indicating a data set composed of a preset qualified background image.
In this embodiment, the step S206 includes: fusing the preprocessed image with a first preset position of the image dataset to be expanded to obtain an expanded image dataset, or fusing the preprocessed image with a second preset position of the image of the qualified image dataset to obtain an expanded image dataset.
Further, the step of fusing the preprocessed image with the first preset position of the image dataset to be expanded to obtain an expanded image dataset includes: fusing the preprocessed image with the first preset position of the image dataset to be expanded through the following formula to obtain an expanded image dataset: pix_new=ratio + (1-ratio) ×pix_found, where pix_new represents a pixel value of the first preset position of the image of the expanded image dataset, ratio represents a preset image fusion coefficient, pix_org represents a pixel value of the first preset position of the image to be expanded, and pix_found represents a pixel value of the pre-processed image.
Further, the process of fusing the preprocessed image with the second preset position of the image of the qualified image dataset is consistent with the principle of fusing the preprocessed image with the first preset position of the image dataset to be expanded, and will not be described again.
In this embodiment, after the step S206, the method further includes: training a preset deep learning model through the expanded image data set until a preset training ending condition is reached, so as to obtain a trained deep learning model; the deep learning model is used for detecting flaws of industrial images.
In actual operation, angles, sizes, brightness and the like of the picture backgrounds are basically stable and consistent, so that the backgrounds do not need to be expanded or enhanced, and the learning difficulty of the deep learning model is increased due to the change of the backgrounds after the background is expanded or enhanced. The method can enable the model to converge more quickly and shorten training time. In addition, in most of industrial scenes, flaws occupy smaller, most of the scenes are background images, and the training time is obviously shortened, so that the expanded image dataset in the application has better application value.
The embodiment of the invention provides an image data set expansion method, which comprises the following steps: acquiring an image dataset to be expanded; extracting a flaw image with a flaw outline marked in advance in the image data set to be expanded; cutting the flaw image to obtain a cut flaw image; rotating the cut flaw image based on a preset rotation angle to obtain a rotated flaw image; obtaining a preprocessed image according to the rotated flaw image; fusing the preprocessed image with the image data set to be expanded or with a preset qualified image data set to obtain an expanded image data set; the above-mentioned qualified image data set is used for indicating a data set composed of a preset qualified background image. According to the method, the flaw data in the image data set to be expanded is extracted, and the image data set after being expanded is obtained through the mode of recombination with the original image or the qualified image after various treatments such as cutting, rotation and the like.
Example 3
Fig. 3 is a schematic structural diagram of an image dataset expansion device according to an embodiment of the present invention.
As seen in fig. 3, the image dataset expansion apparatus includes:
the image acquisition module 11 is used for acquiring an image data set to be expanded.
The flaw image extracting module 12 is configured to extract flaw images with flaw outlines marked in advance in the image data set to be expanded.
And the image preprocessing module 13 is used for preprocessing the flaw image to obtain a preprocessed image.
The image fusion module 14 is configured to fuse the preprocessed image with the image dataset to be expanded or with a preset qualified image dataset to obtain an expanded image dataset; the above-mentioned qualified image data set is used for indicating a data set composed of a preset qualified background image.
The image acquisition module 11, the defective image extraction module 12, the image preprocessing module 13, and the image fusion module 14 are sequentially connected.
In one embodiment, the image preprocessing module 13 is further configured to cut the defect image to obtain a cut defect image; rotating the cut flaw image based on a preset rotation angle to obtain a rotated flaw image; and obtaining a preprocessed image according to the rotated flaw image.
In one embodiment, the image preprocessing module 13 is further configured to scale the rotated flaw image to obtain a scaled flaw image; and obtaining a preprocessed image according to the scaled flaw image.
In one embodiment, the defective image extracting module 12 is further configured to extract, by using a preset opencv tool, a defective image with a defective outline marked in advance in the image data set to be expanded.
In one embodiment, the image fusion module 14 is further configured to fuse the preprocessed image with a first preset position of the image dataset to be expanded to obtain an expanded image dataset, or fuse the preprocessed image with a second preset position of the image of the qualified image dataset to obtain an expanded image dataset.
In one embodiment, the image fusion module 14 is further configured to fuse the preprocessed image with the first preset position of the image dataset to be expanded by the following formula to obtain an expanded image dataset: pix_new=ratio + (1-ratio) ×pix_found, where pix_new represents a pixel value of the first preset position of the image of the expanded image dataset, ratio represents a preset image fusion coefficient, pix_org represents a pixel value of the first preset position of the image to be expanded, and pix_found represents a pixel value of the pre-processed image.
In one embodiment, the apparatus further comprises a model training module; the model training module is used for training a preset deep learning model through the expanded image data set until a preset training ending condition is reached, so that a trained deep learning model is obtained; the deep learning model is used for detecting flaws of industrial images.
The image data set-based expansion device provided by the embodiment of the invention has the same technical characteristics as the image data set-based expansion method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved. It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the apparatus described above, which is not described herein again.
Example 4
The present embodiment provides an electronic device comprising a processor and a memory storing computer-executable instructions executable by the processor to perform steps of an image dataset-based augmentation method.
The present embodiment provides a computer-readable storage medium in which a computer program is stored which, when executed by a processor, implements the steps of an image dataset-based augmentation method.
Referring to fig. 4, a schematic structural diagram of an electronic device includes: the image data set expansion method comprises a memory 21 and a processor 22, wherein a computer program capable of running on the processor 22 is stored in the memory 21, and the steps provided by the image data set expansion method are realized when the processor executes the computer program.
As shown in fig. 4, the apparatus further includes: a bus 23 and a communication interface 24, the processor 22, the communication interface 24 and the memory 21 being connected by the bus 23; the processor 22 is arranged to execute an executable model, such as a computer program, stored in the memory 21.
The memory 21 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and at least one other network element is implemented via at least one communication interface 24 (which may be wired or wireless), which may use the internet, a wide area network, a local network, a metropolitan area network, etc.
The bus 23 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 4, but not only one bus or type of bus.
The memory 21 is used for storing a program, and the processor 22 executes the program after receiving the execution instruction, and any of the embodiments of the present invention described above discloses that the method executed by the dual image dataset expansion apparatus can be applied to the processor 22 or implemented by the processor 22. The processor 22 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in the processor 22. The processor 22 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software models in a decoding processor. The software model may be located in a state-of-the-art storage medium such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 21 and the processor 22 reads the information in the memory 21 and in combination with its hardware performs the steps of the method described above.
Further, embodiments of the present invention also provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by the processor 22, cause the processor 22 to implement the image dataset-based augmentation method described above.
The electronic equipment and the computer readable storage medium provided by the embodiment of the invention have the same technical characteristics, so that the same technical problems can be solved, and the same technical effects can be achieved.
In addition, in the description of embodiments of the present invention, unless explicitly stated and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.

Claims (10)

1. A method of augmenting an image dataset, comprising:
acquiring an image dataset to be expanded;
extracting a flaw image with a flaw outline marked in advance in the image data set to be expanded;
preprocessing the flaw image to obtain a preprocessed image;
fusing the preprocessed image with the image data set to be expanded or with a preset qualified image data set to obtain an expanded image data set; the qualified image data set is used for indicating a data set composed of preset qualified background images.
2. The image dataset expansion method of claim 1, wherein the step of preprocessing the flaw image to obtain a preprocessed image comprises:
cutting the flaw image to obtain a cut flaw image;
rotating the cut flaw image based on a preset rotation angle to obtain a rotated flaw image;
and obtaining a preprocessed image according to the rotated flaw image.
3. The image dataset extension method of claim 2, wherein the predetermined rotation angle is in a range of 0 to 360 °.
4. The image dataset expansion method of claim 2, wherein the step of obtaining a preprocessed image from the rotated flaw image comprises:
scaling the rotated flaw image to obtain a scaled flaw image;
and obtaining a preprocessed image according to the scaled flaw image.
5. The image dataset expansion method according to claim 1, wherein the step of extracting a flaw image pre-labeled with a flaw outline in the image dataset to be expanded comprises:
and extracting the flaw image with the flaw outline marked in advance in the image data set to be expanded through a preset opencv tool.
6. The image dataset expansion method according to claim 1, wherein the step of fusing the preprocessed image with the image dataset to be expanded or with a preset qualified image to obtain an expanded image dataset comprises:
and fusing the preprocessed image with a first preset position of the image dataset to be expanded to obtain an expanded image dataset, or fusing the preprocessed image with a second preset position of the image of the qualified image dataset to obtain an expanded image dataset.
7. The method of claim 6, wherein the step of fusing the preprocessed image with the first predetermined position of the image dataset to be expanded to obtain the expanded image dataset comprises:
fusing the preprocessed image with a first preset position of the image dataset to be expanded through the following formula to obtain an expanded image dataset:
Pix_new=ratio*pix_org+(1-ratio)*pix_defeat
wherein pix_new represents a pixel value of the first preset position of the image of the expanded image dataset, ratio represents a preset image fusion coefficient, pix_org is a pixel value of the first preset position of the image to be expanded, and pix_defea represents a pixel value of the preprocessed image.
8. The image dataset expansion method as claimed in claim 1, wherein after the step of fusing the pre-processed image with the image dataset to be expanded or with a preset qualified image dataset, the method comprises:
training a preset deep learning model through the expanded image data set until a preset training ending condition is reached, so as to obtain a trained deep learning model; the deep learning model is used for detecting flaws of the industrial image.
9. An image dataset expansion apparatus, comprising:
the image acquisition module is used for acquiring an image data set to be expanded;
the flaw image extraction module is used for extracting flaw images with flaw outlines marked in advance in the image data set to be expanded;
the image preprocessing module is used for preprocessing the flaw image to obtain a preprocessed image;
the image fusion module is used for fusing the preprocessed image with the image data set to be expanded or with a preset qualified image data set to obtain an expanded image data set; the qualified image data set is used for indicating a data set composed of preset qualified background images.
10. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the image dataset expansion method of any of claims 1 to 8.
CN202311452992.7A 2023-11-02 2023-11-02 Image dataset expansion method and device and electronic equipment Pending CN117372275A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311452992.7A CN117372275A (en) 2023-11-02 2023-11-02 Image dataset expansion method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311452992.7A CN117372275A (en) 2023-11-02 2023-11-02 Image dataset expansion method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN117372275A true CN117372275A (en) 2024-01-09

Family

ID=89402224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311452992.7A Pending CN117372275A (en) 2023-11-02 2023-11-02 Image dataset expansion method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117372275A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111145177A (en) * 2020-04-08 2020-05-12 浙江啄云智能科技有限公司 Image sample generation method, specific scene target detection method and system thereof
CN111709948A (en) * 2020-08-19 2020-09-25 深兰人工智能芯片研究院(江苏)有限公司 Method and device for detecting defects of container
CN113450307A (en) * 2021-05-12 2021-09-28 西安电子科技大学 Product edge defect detection method
CN116433978A (en) * 2023-04-18 2023-07-14 心鉴智控(深圳)科技有限公司 Automatic generation and automatic labeling method and device for high-quality flaw image
CN116645571A (en) * 2023-04-20 2023-08-25 国华能源投资有限公司 Flaw sample generation method and device, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111145177A (en) * 2020-04-08 2020-05-12 浙江啄云智能科技有限公司 Image sample generation method, specific scene target detection method and system thereof
CN111709948A (en) * 2020-08-19 2020-09-25 深兰人工智能芯片研究院(江苏)有限公司 Method and device for detecting defects of container
CN113450307A (en) * 2021-05-12 2021-09-28 西安电子科技大学 Product edge defect detection method
CN116433978A (en) * 2023-04-18 2023-07-14 心鉴智控(深圳)科技有限公司 Automatic generation and automatic labeling method and device for high-quality flaw image
CN116645571A (en) * 2023-04-20 2023-08-25 国华能源投资有限公司 Flaw sample generation method and device, storage medium and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张择瑞: "《基于稀疏特征的SAR图像处理与应用》", 31 July 2022, 合肥:合肥工业大学出版社 , pages: 207 - 218 *

Similar Documents

Publication Publication Date Title
CN112651979B (en) Lung X-ray image segmentation method, system, computer equipment and storage medium
CN110991560B (en) Target detection method and system combining context information
CN113780297B (en) Image processing method, device, equipment and storage medium
CN117315406B (en) Sample image processing method, device and equipment
CN111161386A (en) Ultrasonic image rendering method and device and ultrasonic equipment
CN112101323B (en) Method, system, electronic device and storage medium for identifying title list
CN117372275A (en) Image dataset expansion method and device and electronic equipment
CN116309583B (en) Method and system for detecting display screen dent defect
CN111311573B (en) Branch determination method and device and electronic equipment
CN113436068A (en) Image splicing method and device, electronic equipment and storage medium
CN112801923A (en) Word processing method, system, readable storage medium and computer equipment
CN111079624B (en) Sample information acquisition method and device, electronic equipment and medium
CN116596903A (en) Defect identification method, device, electronic equipment and readable storage medium
CN111476308B (en) Remote sensing image classification method and device based on priori geometric constraint and electronic equipment
CN115908673A (en) Three-dimensional model display method and device, electronic equipment and storage medium
CN111627041B (en) Multi-frame data processing method and device and electronic equipment
CN113379637A (en) Image restoration method, system, medium, and device based on progressive learning strategy
CN113865636A (en) Instrument testing method and system and electronic equipment
CN113870754A (en) Method and system for judging defects of panel detection electronic signals
CN113592724A (en) Target face image restoration method and device
CN114119376A (en) Image processing method and device, electronic equipment and storage medium
CN117437490B (en) Clothing information processing method and device, electronic equipment and storage medium
US20190228523A1 (en) Detecting method, detecting apparatus, and computer readable storage medium
CN111125413B (en) Text picture filtering method and device and electronic equipment
CN118096732B (en) Display screen light leakage detection method, electronic equipment and storage medium

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