Fault image generation method and device, electronic equipment and storage medium
By clustering and color spatial distribution similarity de-redundant processing of photovoltaic power station images, the fault simulation images are generated using the GAN model, which solves the problem of poor generalization in the prior art and achieves efficient fault image generation.
Patent Information
- Application Number
- CN202510936255.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-07-08
AI Technical Summary
The fault images generated by the prior art have poor generalization, which is difficult to meet the needs of photovoltaic power plants in different scenarios, and the generation efficiency is low.
By acquiring multiple images of the target structure, clustering processing and color spatial distribution similarity de-redundant processing are performed, and fault simulation images are output using the generative adversarial network GAN model.
It effectively realizes the simulation generation of major fault images such as string loss, hot spots, and fragmentation of the target structure, reducing the image acquisition time and cost of manual fault data.
Smart Images

Figure CN120451608A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of image processing technology, and in particular relates to a fault image generation method, device, electronic device, and storage medium. Background Art
[0002] With the development of renewable energy, the number of photovoltaic power stations continues to increase, and the corresponding operation and maintenance issues are becoming increasingly prominent. With the advancement of drone technology, the identification of component faults is increasingly reliant on automated methods such as AI image recognition. This significantly improves fault diagnosis efficiency while effectively reducing labor costs and safety risks. However, AI image recognition relies on the collection of large amounts of fault image data, which is difficult due to the complex terrain and weather conditions of photovoltaic sites.
[0003] Related technologies primarily employ image transformation methods, manually generating a local image. This image is then scaled, deformed, and rotated, and then embedded into a related background image to create a new image, known as the fault image. This method generates relatively simple fault images with poor generalization, making them difficult to meet the differentiated requirements of photovoltaic power plants in different scenarios, such as those on water surfaces, rooftops, and deserts. This results in low generation efficiency. Summary of the Invention
[0004] The embodiments of the present disclosure provide a solution to solve the problems in related technologies of relatively simple fault images, poor generalization, difficulty in meeting the requirements of photovoltaic power stations in different scenarios, and low generation efficiency.
[0005] In a first aspect, the present disclosure provides a method for generating a fault image, the method comprising: Acquire multiple images of the target structure, wherein the multiple images include multiple images of the target structure in a normal state and multiple images of the target structure in a fault state; performing clustering processing on the plurality of images to obtain a plurality of clustering results, each clustering result including a plurality of images; Perform color space distribution similarity de-redundancy processing on each clustering result to obtain multiple optimized clustering results; Based on the optimized multiple clustering results, a fault simulation image of the target structure is outputted through a generative adversarial network (GAN) model.
[0006] In a second aspect, the present disclosure provides a fault image generating device, the device comprising: an acquisition unit, configured to acquire a plurality of images of a target structure, wherein the plurality of images include a plurality of images of the target structure in a normal state and a plurality of images of the target structure in a fault state; a clustering unit, configured to perform clustering processing on the plurality of images to obtain a plurality of clustering results, each clustering result including a plurality of images; A de-redundancy unit is used to perform color space distribution similarity de-redundancy processing on each clustering result to obtain multiple optimized clustering results; A generation unit is used to output a fault simulation image of the target structure through a generative adversarial network (GAN) model based on the optimized multiple clustering results.
[0007] In a third aspect, the present disclosure provides an electronic device, comprising: processor; and a memory for storing executable instructions of the processor; The processor is configured to execute any method in the first aspect or any possible implementation of the first aspect by executing the executable instructions.
[0008] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any method in the first aspect or any possible implementation of the first aspect.
[0009] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, comprising computer instructions, which, when executed by a processor, implement any method in the first aspect or any possible implementation of the first aspect.
[0010] The technical solution provided by the present disclosure obtains multiple images of a target structure, wherein the multiple images include multiple images of the target structure under normal conditions and multiple images under fault conditions; clusters the multiple images to obtain multiple clustering results, each clustering result including multiple images; performs color space distribution similarity de-redundancy processing on each clustering result to obtain multiple optimized clustering results; and based on the multiple optimized clustering results, generates a fault simulation image of the target structure through a generative adversarial network (GAN) model. The technical solution provided by each embodiment of the present disclosure solves the problem of the GAN network being sensitive to differences in the training data categories by clustering and de-redundancy on the multiple acquired images, and can effectively simulate and generate major fault images of the target structure, such as string drop, hot spots, and fragmentation, thereby reducing the image acquisition time and cost of artificial fault data. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings: Figure 1A schematic diagram of a flow chart of a method for generating a fault image provided by an embodiment of the present disclosure; Figure 2 A schematic structural diagram of a fault image generating device provided by an embodiment of the present disclosure; Figure 3 A schematic structural diagram of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION
[0012] The embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to be used to explain the present disclosure, but should not be understood as limiting the present disclosure.
[0013] The terms "first" and "second" and the like in the specification, claims, and drawings of the embodiments of the present disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the embodiments of the present disclosure described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or apparatus.
[0014] The fault image generation method provided in the embodiments of the present disclosure can be run on a terminal device or a server. The terminal device can be a local terminal device, including wearable devices such as VR (Virtual Reality), AR (Augmented Reality), and MR (Mixed Reality). The server can be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0015] With the development of renewable energy, the number of photovoltaic power stations continues to increase, and the corresponding operation and maintenance issues are becoming increasingly prominent. With the advancement of drone technology, the identification of component faults is increasingly reliant on automated methods such as AI image recognition. This significantly improves fault diagnosis efficiency while effectively reducing labor costs and safety risks. However, AI image recognition relies on the collection of large amounts of fault image data, which is difficult due to the complex terrain and weather conditions of photovoltaic sites.
[0016] Related technologies primarily employ image transformation methods, manually generating a partial image. This image is then scaled, deformed, and rotated, and then embedded into a related background image to create a new image, known as the fault image. This method fails to generate fault images that are relatively simple and have poor generalization capabilities. This method struggles to meet the differentiated requirements of photovoltaic power plants in different scenarios, such as those on water surfaces, rooftops, and deserts, and results in low generation efficiency.
[0017] Figure 1 This is a flowchart of a method for generating a fault image provided by an exemplary embodiment of the present disclosure. The method can be applied to a device with a data processing function and includes at least the following steps S101-S104: S101, acquiring multiple images of a target structure.
[0018] In some embodiments, the plurality of images include a plurality of images of the target structure under normal conditions and a plurality of images under fault conditions, wherein the number of images is not limited herein.
[0019] Furthermore, to ensure smooth subsequent image processing, the multiple images of the target structure are preprocessed. For example, all acquired images are resized to a preset size, such as 1024x1024 pixels, and the image pixel values are normalized to the range of [-1, 1].
[0020] In other embodiments, the multiple images of the target structure obtained may be infrared images or optical images, which are set according to actual conditions.
[0021] S102: performing clustering processing on the multiple images to obtain multiple clustering results.
[0022] In some embodiments, each clustering result includes multiple images.
[0023] In some embodiments, with respect to the aforementioned step S102, clustering the multiple images to obtain multiple clustering results includes steps S11-S12: S11, determining a preset number of first images from a plurality of images.
[0024] S12: performing clustering processing on the plurality of images with the preset number of first images as cluster centers to obtain a plurality of clustering results.
[0025] In some embodiments, with respect to the aforementioned step S11 , the preset number is the same as the number of the clustering results.
[0026] Furthermore, in actual practice, those skilled in the art will usually set the preset number based on common photovoltaic power station terrain, topography, and bracket types, and preferably the preset number can be set to 10. The specific value can be set according to actual conditions.
[0027] In some embodiments, with respect to the aforementioned step S12, clustering the plurality of images using the preset number of first images as cluster centers to obtain a plurality of clustering results includes steps S121-S122: S121 : For any first image among the preset number of first images, calculate the Euclidean distance between the first image and all images among the multiple images except the preset number of first images.
[0028] S122 , assigning the images whose Euclidean distance is less than a first preset threshold to the cluster to which the first image belongs, to obtain a clustering result, and further to obtain the preset number of clustering results.
[0029] In some embodiments, with respect to the aforementioned step S121, the calculating of the Euclidean distance between the first image and all images in the plurality of images except the preset number of first images includes steps S21-S24: S21: Perform grayscale processing on the first image to obtain a first grayscale image.
[0030] S22 , performing grayscale processing on any second image of all the images except the preset number of first images in the plurality of images to obtain a second grayscale image.
[0031] S23: Determine a first eigenvector of the first grayscale image and a second eigenvector of the second grayscale image.
[0032] S24: Obtain the Euclidean distance between the first image and the second image based on the Euclidean distance formula, the first eigenvector, and the second eigenvector.
[0033] The Euclidean distance formula is: , is the first eigenvector, is the second eigenvector, k is the preset number, i∈k, is the length of the first eigenvector, and the length of the first eigenvector is the same as the length of the second eigenvector.
[0034] In some embodiments, with respect to the aforementioned step S23, the feature vector refers to a surface texture feature vector of the image.
[0035] Furthermore, in the actual process, it is necessary to call the HOGDescriptor::compute method in the image processing library OpenCV to process the first grayscale image and the second grayscale image, and the length of the output first eigenvector and the second eigenvector is consistent, that is, len=26244.
[0036] In some embodiments, multiple clustering results are obtained after step S12, but in order to ensure that the obtained clustering results are accurate, it is necessary to traverse each clustering result in turn and re-update the cluster center according to the sample mean. If the updated cluster center is different from the cluster center before the update, re-clustering is performed according to steps S11-S12.
[0037] S103: performing color space distribution similarity de-redundancy processing on each clustering result to obtain multiple optimized clustering results.
[0038] In some embodiments, with respect to the aforementioned step S103, performing color space distribution similarity de-redundancy processing on each clustering result to obtain multiple optimized clustering results includes steps S31-S33: S31 : For any clustering result among the plurality of clustering results, use the cluster center in the clustering result as an image reference value.
[0039] S32, sequentially calculating the color differences from all images except the cluster center in the plurality of images included in the clustering result to the cluster center.
[0040] S33, based on the color difference, eliminating images that do not meet preset conditions from the multiple images included in the clustering result to obtain an optimized clustering result, and then obtaining multiple optimized clustering results.
[0041] In some embodiments, with respect to the aforementioned step S32, the color difference refers to the distribution similarity index between all images except the cluster center in the plurality of images included in the clustering result and the cluster center in the four color spaces of H, S, Cb and Cr.
[0042] In some embodiments, for the aforementioned step S33, not meeting the preset condition means that the distribution similarity indices in at least three of the four color spaces H, S, Cb, and Cr are greater than a second preset threshold.
[0043] In some embodiments, to better understand the present solution, the process of calculating the distribution similarity index in the Cr color space is as follows, taking the first image and the second image as examples: First, for the first image or the second image, divide it into several patches. For example, for a 224*224 image, it is divided into multiple patches according to the grid. The size of each patch is 16*16, and there are 196 patches in total.
[0044] For each patch, define a color correlation coefficient .
[0045] in The details are as follows:
[0046] in, is the value of the pixel at coordinates j and k in the patch in the c color space. yes The average value in the patch, m and n are the height and width of the patch respectively.
[0047] If so, taking a 224*224 image as an example, for each color space c, there are 196 These 196 values constitute the probability distribution of the image in the c color space.
[0048] Next, calculate the distribution similarity index of the first image and the second image in the Cr color space :
[0049] in, is the index of the probability distribution summarized by bucket, The probability distribution of the first image p and the second image q are respectively The number of indexes.
[0050] In this embodiment, The larger the value, the greater the difference between the first image and the second image.
[0051] S104: Based on the optimized multiple clustering results, a fault simulation image of the target structure is output through a generative adversarial network (GAN) model.
[0052] The technical solution provided by the present disclosure obtains multiple images of a target structure, wherein the multiple images include multiple images of the target structure under normal conditions and multiple images under fault conditions; clusters the multiple images to obtain multiple clustering results, each clustering result including multiple images; performs color space distribution similarity de-redundancy processing on each clustering result to obtain multiple optimized clustering results; and based on the multiple optimized clustering results, generates a fault simulation image of the target structure through a generative adversarial network (GAN) model. The technical solution provided by each embodiment of the present disclosure solves the problem of the GAN network being sensitive to differences in the training data categories by clustering and de-redundancy on the multiple acquired images, and can effectively simulate and generate major fault images of the target structure, such as string drop, hot spots, and fragmentation, thereby reducing the image acquisition time and cost of artificial fault data.
[0053] Figure 2 A schematic structural diagram of a fault image generating device provided by an exemplary embodiment of the present disclosure; The device includes: an acquisition unit 201, a clustering unit 202, a redundancy removal unit 203, and a generation unit 204; An acquisition unit 201 is configured to acquire multiple images of a target structure, wherein the multiple images include multiple images of the target structure in a normal state and multiple images of the target structure in a fault state; A clustering unit 202 is configured to perform clustering processing on the plurality of images to obtain a plurality of clustering results, each clustering result including a plurality of images; A de-redundancy unit 203 is configured to perform color space distribution similarity de-redundancy processing on each clustering result to obtain multiple optimized clustering results; The generating unit 204 is configured to output a fault simulation image of the target structure through a generative adversarial network (GAN) model based on the optimized multiple clustering results.
[0054] In some embodiments, the apparatus is configured to perform clustering processing on the plurality of images to obtain a plurality of clustering results, and the apparatus is specifically configured to: determining a preset number of first images from the plurality of images, where the preset number is the same as the number of the clustering results; The plurality of images are clustered with the preset number of first images as cluster centers to obtain a plurality of clustering results.
[0055] In some embodiments, the apparatus is configured to perform clustering processing on the plurality of images using the preset number of first images as cluster centers to obtain a plurality of clustering results, and the apparatus is specifically configured to: For any first image among the preset number of first images, calculating the Euclidean distance between the first image and all images among the plurality of images except the preset number of first images; The images whose Euclidean distance is less than a first preset threshold are assigned to the cluster to which the first image belongs, to obtain a clustering result, and then to obtain the preset number of clustering results.
[0056] In some embodiments, the apparatus is configured to calculate the Euclidean distance between the first image and all images in the plurality of images except the preset number of first images, and the apparatus is specifically configured to: performing grayscale processing on the first image to obtain a first grayscale image; For any second image of all images except the preset number of first images in the plurality of images, performing grayscale processing on the second image to obtain a second grayscale image; determining a first eigenvector of the first grayscale image and a second eigenvector of the second grayscale image; Obtaining a Euclidean distance between the first image and the second image based on a Euclidean distance formula, the first eigenvector, and the second eigenvector; The Euclidean distance formula is: , is the first eigenvector, is the second eigenvector, is the length of the first eigenvector, and the length of the first eigenvector is the same as the length of the second eigenvector.
[0057] In some embodiments, performing color space distribution similarity de-redundancy processing on each clustering result to obtain multiple optimized clustering results includes: For any clustering result among the plurality of clustering results, taking the cluster center in the clustering result as an image reference value; Sequentially calculating the color differences between all images except the cluster center from the multiple images included in the clustering result and the cluster center; Based on the color difference, images that do not meet the preset conditions are eliminated from the multiple images included in the clustering result to obtain an optimized clustering result, and then multiple optimized clustering results are obtained.
[0058] In some embodiments, the color difference refers to the distribution similarity index between all images except the cluster center in the plurality of images included in the clustering result and the cluster center in four color spaces of H, S, Cb and Cr.
[0059] In some embodiments, not meeting the preset condition means that the distribution similarity indices in at least three color spaces among the distribution similarity indices in the four color spaces of H, S, Cb, and Cr are greater than a second preset threshold.
[0060] The technical solution provided by the present disclosure obtains multiple images of a target structure, wherein the multiple images include multiple images of the target structure under normal conditions and multiple images under fault conditions; clusters the multiple images to obtain multiple clustering results, each clustering result including multiple images; performs color space distribution similarity de-redundancy processing on each clustering result to obtain multiple optimized clustering results; and based on the multiple optimized clustering results, generates a fault simulation image of the target structure through a generative adversarial network (GAN) model. The technical solution provided by each embodiment of the present disclosure solves the problem of the GAN network being sensitive to differences in the training data categories by clustering and de-redundancy on the multiple acquired images, and can effectively simulate and generate major fault images of the target structure, such as string drop, hot spots, and fragmentation, thereby reducing the image acquisition time and cost of artificial fault data.
[0061] It should be understood that the device embodiments and the method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be described in detail here. Specifically, the device can perform the above-mentioned method embodiments, and the aforementioned and other operations and / or functions of each module in the device are the corresponding processes in each method in the above-mentioned method embodiments, which will not be described in detail here for the sake of brevity.
[0062] The above describes the apparatus of the embodiment of the present disclosure from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in the form of hardware, can be implemented by instructions in the form of software, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present disclosure can be completed by the hardware integrated logic circuit and / or software instructions in the processor, and the steps of the method disclosed in conjunction with the embodiment of the present disclosure can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.
[0063] Figure 3 is a schematic block diagram of an electronic device provided by an embodiment of the present disclosure, which may include: The memory 301 and the processor 302 are configured to store computer programs and transmit the program code to the processor 302. In other words, the processor 302 can call and run the computer program from the memory 301 to implement the method in the embodiment of the present disclosure.
[0064] For example, the processor 302 may be configured to execute the above method embodiments according to instructions in the computer program.
[0065] In some embodiments of the present disclosure, the processor 302 may include but is not limited to: General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0066] In some embodiments of the present disclosure, the memory 301 includes but is not limited to: Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0067] In some embodiments of the present disclosure, the computer program may be divided into one or more modules, which are stored in the memory 301 and executed by the processor 302 to implement the method provided by the present disclosure. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0068] like Figure 3 As shown, the electronic device may further include: The transceiver 303 may be connected to the processor 302 or the memory 301 .
[0069] The processor 302 may control the transceiver 303 to communicate with other devices. Specifically, the processor 302 may send information or data to other devices or receive information or data sent by other devices. The transceiver 303 may include a transmitter and a receiver. The transceiver 303 may further include one or more antennas.
[0070] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0071] The present disclosure also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. Alternatively, the present disclosure also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment.
[0072] When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present disclosure are fully or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, magnetic tape), optical media (e.g., digital video disc (DVD)), or semiconductor media (e.g., solid-state drive (SSD)).
[0073] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0074] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0075] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present disclosure may be integrated into a single processing module, each module may exist physically separately, or two or more modules may be integrated into a single module.
[0076] The above are only specific embodiments of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. A method for generating a fault image, characterized in that: The method comprises: Acquire multiple images of the target structure, wherein the multiple images include multiple images of the target structure in a normal state and multiple images of the target structure in a fault state; performing clustering processing on the plurality of images to obtain a plurality of clustering results, each clustering result including a plurality of images; Perform color space distribution similarity de-redundancy processing on each clustering result to obtain multiple optimized clustering results; Based on the optimized multiple clustering results, a fault simulation image of the target structure is outputted through a generative adversarial network (GAN) model.
2. The method according to claim 1, characterized in that The clustering process is performed on the plurality of images to obtain a plurality of clustering results, including: determining a preset number of first images from the plurality of images, where the preset number is the same as the number of the clustering results; The plurality of images are clustered with the preset number of first images as cluster centers to obtain a plurality of clustering results.
3. The method according to claim 2, characterized in that The plurality of images are clustered using the preset number of first images as cluster centers to obtain a plurality of clustering results, including: For any first image among the preset number of first images, calculating the Euclidean distance between the first image and all images among the plurality of images except the preset number of first images; The images whose Euclidean distance is less than a first preset threshold are assigned to the cluster to which the first image belongs, to obtain a clustering result, and then to obtain the preset number of clustering results.
4. The method according to claim 3, characterized in that The calculating the Euclidean distance between the first image and all images in the plurality of images except the preset number of first images includes: performing grayscale processing on the first image to obtain a first grayscale image; For any second image of all images except the preset number of first images in the plurality of images, performing grayscale processing on the second image to obtain a second grayscale image; determining a first eigenvector of the first grayscale image and a second eigenvector of the second grayscale image; Obtaining a Euclidean distance between the first image and the second image based on a Euclidean distance formula, the first eigenvector, and the second eigenvector; The Euclidean distance formula is: , is the first eigenvector, is the second eigenvector, is the length of the first eigenvector, and the length of the first eigenvector is the same as the length of the second eigenvector.
5. The method according to claim 1, wherein The color space distribution similarity de-redundancy processing is performed on each clustering result to obtain multiple optimized clustering results, including: For any clustering result among the plurality of clustering results, taking the cluster center in the clustering result as an image reference value; sequentially calculating the color differences between all images except the cluster center from the plurality of images included in the clustering result and the cluster center; Based on the color difference, images that do not meet the preset conditions are eliminated from the multiple images included in the clustering result to obtain an optimized clustering result, and then multiple optimized clustering results are obtained.
6. The method according to claim 5, characterized in that The color difference refers to the distribution similarity index between all images except the cluster center in the multiple images included in the clustering result and the cluster center in the four color spaces of H, S, Cb and Cr.
7. The method according to claim 6, characterized in that The failure to meet the preset condition means that the distribution similarity indices in at least three color spaces among the distribution similarity indices in the four color spaces of H, S, Cb and Cr are greater than a second preset threshold.
8. A fault image generating device, characterized in that: The device comprises: an acquisition unit, configured to acquire a plurality of images of a target structure, wherein the plurality of images include a plurality of images of the target structure in a normal state and a plurality of images of the target structure in a fault state; a clustering unit, configured to perform clustering processing on the plurality of images to obtain a plurality of clustering results, each clustering result including a plurality of images; A de-redundancy unit is used to perform color space distribution similarity de-redundancy processing on each clustering result to obtain multiple optimized clustering results; A generation unit is used to output a fault simulation image of the target structure through a generative adversarial network (GAN) model based on the optimized multiple clustering results.
9. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Video-based smoke detection method and apparatus, and terminal device
CN108765454A
Method and system for processing layout file based on distributed system and medium
CN115048921A
Employee identification method and device, electronic equipment and storage medium
CN115830641A
Power transmission and transformation equipment fault detection method and device, terminal and storage medium
CN115880514A
Defective sample generation system and method based on generative adversarial network and storage medium
CN116664975A