A method and system for creating a dataset for detecting changes in power transmission and transformation scenarios
By acquiring and analyzing redrawing instruction information in the change detection data set production method of the transmission and substation station, the redrawing area image is extracted and identified, and the problem of insufficient data set effectiveness in the monitoring of safety hazards of transmission and substation stations is solved, and a higher accuracy of monitoring results is achieved.
Patent Information
- Application Number
- CN202411363944.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-28
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2044-09-28
AI Technical Summary
In the safety hazard monitoring of transmission and substations, traditional manual inspection methods are difficult to cover comprehensively and in real time, and the training effect of the hidden danger identification model is affected by the effectiveness of the change detection training data set, resulting in insufficient accuracy of the monitoring results.
A method for producing a transmission and transformation scene change detection data set is provided. By obtaining redraw instruction information, extracting redrawing area images, identifying redraw features, determining local redrawing images, and constructing a change detection training data set based on the original scene image and the result scene image to improve the quality and effectiveness of the data set.
By improving the richness and quality of the change detection training data set, improving the training effect of the hidden danger identification model, enhancing the generalization ability and recognition accuracy of the model in practical applications, thereby improving the accuracy of the safety hazard monitoring results.
Smart Images

Figure CN119339320B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of local redrawing control, and in particular to a method and system for producing a change detection training dataset for a transmission and substation scenario. Background Art
[0002] Transmission and substations are usually located in complex outdoor environments. Traditional manual inspection methods are difficult to comprehensively and real-time cover these areas and are easily affected by human factors. Therefore, a hidden danger recognition model is often used to monitor images containing transmission and substations in order to timely detect potential safety hazards during the operation of transmission and substations.
[0003] Since the training effect of the hidden danger recognition model may directly affect the accuracy of the safety hazard monitoring results, and generally a change detection training dataset is often used to train the hidden danger recognition model, the effectiveness of the change detection training dataset is particularly crucial for improving the accuracy of the safety hazard monitoring results. Summary of the Invention
[0004] In order to improve the effectiveness in determining the change detection training dataset, thereby improving the accuracy of the safety hazard monitoring results, this application provides a method and system for producing a change detection training dataset for a transmission and substation scenario.
[0005] In a first aspect, this application provides a method for producing a change detection training dataset for a transmission and substation scenario, adopting the following technical solution:
[0006] A method for producing a change detection training dataset for a transmission and substation scenario includes:
[0007] Obtain redrawing instruction information, where the redrawing instruction information includes target position information and a redrawing prompt word, and the target position information includes a target redrawing center point and a redrawing area size;
[0008] Extract a corresponding redrawing area image from the original scene image based on the target position information;
[0009] Identify the redrawing features included in the redrawing prompt word, and determine corresponding redrawing content based on the redrawing features;
[0010] Identify the scene resolution corresponding to the original scene image, and determine a local redrawing image based on the scene resolution, the redrawing area image, and the redrawing content;
[0011] Determine a result scene image based on the local redrawing image and the original scene image, and determine a change detection training dataset based on the result scene image and the original scene image.
[0012] By adopting the above technical solutions, it is convenient to improve the accuracy when determining the redrawn area image by analyzing the redrawing instruction information. In addition, after analyzing the redrawing features included in the redrawing prompt words, and then specifically determining the corresponding redrawing content based on the redrawing features, rather than determining the redrawing content according to fixed rules, it is convenient to improve the adaptability between the redrawing content and the redrawing prompt words, and also convenient to improve the richness of the redrawing content, thereby facilitating the improvement of the richness of the change detection training dataset. By generating a local redrawing image based on the scene resolution of the reference original scene image, it is convenient to improve the consistency between the local redrawing image and the original scene image, that is, it is convenient to improve the consistency between the result scene image and the original scene image, thereby facilitating the improvement of the quality and effectiveness of the change detection training dataset. Finally, constructing a change detection training dataset jointly based on the original scene image and the result scene image is convenient to improve the training effect of the hidden danger recognition model, thereby improving the generalization ability and recognition accuracy of the hidden danger recognition model in practical applications, and further facilitating the improvement of the accuracy of the safety hidden danger monitoring results.
[0013] In a possible implementation manner, before determining the result scene image based on the local redrawing image and the original scene image, it further includes:
[0014] Identify the redrawing feature information included in the local redrawing image, where the redrawing feature information includes texture redrawing features, color redrawing features, lighting redrawing features, and the corresponding feature values for each redrawing feature;
[0015] Identify the original feature information included in the original scene image, where the original feature information includes texture original features, color original features, lighting original features, and the corresponding feature values for each original feature;
[0016] Match the redrawing feature information and the original feature information to obtain the feature matching value between the local redrawing image and the original scene image;
[0017] When the feature matching value is lower than the preset matching value, based on the feature difference between the feature matching value and the preset matching value and the preset border expansion information mapping relationship, determine the border expansion information corresponding to the feature difference. The preset border expansion information mapping relationship is the corresponding relationship between the feature difference and the border expansion information, and the border expansion information includes the border expansion size and the border expansion transparency;
[0018] Adjust the redrawn area image based on the border expansion information to obtain an updated redrawn area image, and then determine an updated local redrawing image based on the updated redrawn area image.
[0019] By adopting the above technical solution, by matching the redrawing feature information included in the partial redrawing image with the original feature information included in the original scene image, it is convenient to analyze and understand the differences between the partial redrawing image and the original scene image. When the differences between the partial redrawing image and the original scene image are large, edge expansion processing can be performed on the redrawing area image, that is, edge expansion processing of the partial redrawing image is realized, so as to reduce the differences between the partial redrawing image and the original scene image. Among them, during the process of edge expansion processing of the redrawing area image, the edge expansion is not random, but the edge expansion information is determined based on the feature difference between the partial redrawing image and the original scene image, which is convenient to improve the effectiveness of edge expansion.
[0020] In a possible implementation manner, the adjusting the redrawing area image based on the edge expansion information to obtain an updated redrawing area image includes:
[0021] Identifying the redrawing edge information corresponding to the redrawing content, and determining the discrete level of the edge points corresponding to the redrawing content based on the redrawing edge information;
[0022] Determining the edge expansion type based on the discrete level of the edge points, and the edge expansion type includes balanced edge expansion and unbalanced edge expansion;
[0023] When the edge expansion type is balanced edge expansion, determining the updated redrawing area image based on the target redrawing center point and the edge expansion information;
[0024] When the edge expansion type is unbalanced edge expansion, identifying the content center point corresponding to the redrawing content, adjusting the target redrawing center point based on the content center point to obtain an updated target redrawing center point, and determining the updated redrawing area image based on the updated target redrawing center point and the edge expansion information.
[0025] By adopting the above technical solution, after determining the edge expansion information, the redrawing edge information of the redrawing content can also be analyzed to determine an edge expansion method adapted to the redrawing content, and the redrawing area image is edge-expanded based on the adapted edge expansion method, which is convenient to improve the coordination between the partial redrawing image and the original scene image, thereby facilitating the improvement of the effectiveness of the result scene image.
[0026] In a possible implementation manner, after extracting the corresponding redrawing area image from the original scene image based on the target position information, it further includes:
[0027] Identifying the scene features included in the redrawing area image. When there are at least two different scene features included in the redrawing area image, identifying whether the redrawing prompt word includes a scene description prompt word, and the scene description prompt word is a description prompt word corresponding to any one of the at least two different scene features;
[0028] When the redrawing prompt contains the scene description prompt, determine the corresponding redrawing content based on the scene description prompt;
[0029] When the redrawing prompt does not contain the scene description prompt, obtain the corresponding historical training data based on the scene features, and determine the corresponding target historical scene description prompt based on the historical training data. Determine the corresponding redrawing content based on the target historical scene description prompt. The historical training data contains the scene description prompts corresponding to each scene feature in the historical time period.
[0030] By adopting the above technical solution, since the redrawing content corresponding to the same redrawing prompt may be different under different scene features, therefore, by analyzing the scene features included in the redrawing area image, and when the scene features are different, checking and analyzing whether the redrawing prompt contains a limited description of the scene features, it is convenient to improve the accuracy when determining the redrawing content. In addition, when the redrawing area image does not contain a limited description of the scene features, by analyzing the historical scene description words and determining the corresponding redrawing content based on the analysis results, it is convenient to improve the adaptability between the redrawing content and the original scene image, thereby facilitating the improvement of the effectiveness when determining the change detection training data set.
[0031] In a possible implementation manner, when the number of scene features included in the redrawing area image is higher than a preset threshold, it further includes:
[0032] Determine multiple scene features as associated scene features, and determine the corresponding historical scene description prompts for each associated scene feature based on the historical training data set;
[0033] Determine the associated redrawing content corresponding to each associated scene feature based on each historical scene description prompt, and match each associated redrawing content to obtain a morphological matching value;
[0034] When the morphological matching value is lower than a preset morphological matching value, determine the associated redrawing content corresponding to each associated scene feature based on the historical scene description prompts corresponding to each associated scene feature;
[0035] Determine the corresponding associated result scene image based on each associated redrawing content, and establish the association relationship of each associated result scene image in the change detection training data set.
[0036] By adopting the above technical solution, when the redrawn area image contains multiple scene features, by matching the associated redrawn content corresponding to each associated scene feature, it is convenient to view and analyze the differences between different associated redrawn contents. In addition, by establishing the association relationship between the associated result scene images, it is convenient to improve the logic and generalization of the hidden danger identification model when the hidden danger identification model uses the change detection training data set for model training, thereby facilitating the improvement of the accuracy when determining the safety hidden danger monitoring result.
[0037] In a possible implementation manner, it further includes:
[0038] Identify the scene features included in the original scene image. When the scene feature is a preset scene feature, based on the mapping relationship between the preset scene feature and the preset scene prompt word, determine the scene prompt word corresponding to the preset scene feature, where the preset scene prompt word mapping relationship is the corresponding relationship between the preset scene feature and the scene prompt word;
[0039] Update the redrawing prompt word based on the scene prompt word to obtain the updated redrawing prompt word, and then determine the corresponding redrawing content based on the updated redrawing prompt word.
[0040] By adopting the above technical solution, by analyzing the preset scene features included in the original scene image, determining the scene prompt word corresponding to the original scene image, and then optimizing or enriching the redrawing prompt word based on the scene prompt word, it is convenient to improve the adaptability between the updated redrawing prompt word and the original scene image, thereby facilitating the improvement of the accuracy when determining the redrawing content.
[0041] In a second aspect, the present application provides a production system, adopting the following technical solution:
[0042] A production system, the production system includes:
[0043] At least one processor;
[0044] A memory;
[0045] At least one application program, where the at least one application program is stored in the memory and is configured to be executed by at least one processor, and the at least one application program is configured to: execute the above-mentioned local redrawing regulation method based on the power transmission and transformation scene.
[0046] In a third aspect, the present application provides a computer-readable storage medium, adopting the following technical solution:
[0047] A computer-readable storage medium, including: a computer program stored that can be loaded and executed by a processor to execute the above-mentioned local redrawing regulation method based on the power transmission and transformation scene.
[0048] Fourthly, the present application provides a computer program product, adopting the following technical solution:
[0049] A computer program product includes a computer program, which when executed by a processor implements the above-mentioned local redrawing control method based on the power transmission and transformation scenario.
[0050] In summary, the present application includes at least one of the following beneficial technical effects:
[0051] By analyzing the redrawing instruction information, it is convenient to improve the accuracy when determining the redrawn area image. In addition, after analyzing the redrawing features included in the redrawing prompt word, and then specifically determining the corresponding redrawing content based on the redrawing features, rather than determining the redrawing content according to fixed rules, it is convenient to improve the adaptability between the redrawing content and the redrawing prompt word, and also convenient to improve the richness of the redrawing content, thereby facilitating the improvement of the richness of the change detection training data set. By generating a local redrawing image based on the scene resolution of the reference original scene image, it is convenient to improve the consistency between the local redrawing image and the original scene image, that is, it is convenient to improve the consistency between the result scene image and the original scene image, thereby facilitating the improvement of the quality and effectiveness of the change detection training data set. Finally, constructing a change detection training data set jointly based on the original scene image and the result scene image is convenient to improve the training effect of the hidden danger recognition model, thereby improving the generalization ability and recognition accuracy of the hidden danger recognition model in practical applications, and further facilitating the improvement of the accuracy of the safety hidden danger monitoring result.
[0052] Since the redrawing content corresponding to the same redrawing prompt word may be different under different scene features, therefore, by analyzing the scene features included in the redrawn area image and checking and analyzing whether the redrawing prompt word contains a limited description of the scene features when the scene features are different, it is convenient to improve the accuracy when determining the redrawing content. In addition, when the redrawn area image does not contain a limited description of the scene features, by analyzing the historical scene description words and determining the corresponding redrawing content based on the analysis results, it is convenient to improve the adaptability between the redrawing content and the original scene image, thereby facilitating the improvement of the effectiveness when determining the change detection training data set. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 is a schematic flowchart of a method for making a power transmission and transformation scenario change detection data set in an embodiment of the present application;
[0054] Figure 2 is a schematic flowchart of a method for determining redrawing content in an embodiment of the present application;
[0055] Figure 3 is a schematic structural diagram of a manufacturing system in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] The following will further elaborate on this application in conjunction with the Figures 1-3 accompanying drawings.
[0057] After reading this specification, those skilled in the art can make modifications to this embodiment as needed without making creative contributions, but as long as it is within the scope of the claims of this application, it is protected by the patent law.
[0058] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of this application.
[0059] It should be noted that in the alternative embodiments of this application, for relevant data such as object information, when the embodiments in this application are applied to specific products or technologies, object permission or consent needs to be obtained, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions. That is to say, if the embodiments in this application involve data related to an object, it needs to be obtained under the authorization and consent of the object, the authorization and consent of relevant departments, and in compliance with the relevant laws, regulations, and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject needs to be obtained, and the embodiments also need to be implemented under the authorization and consent of the object.
[0060] Specifically, the embodiments of this application provide a method for creating a power transmission and transformation scenario change detection data set, which is executed by a creation system. The creation system can be a server or a terminal device. Among them, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected through wired or wireless communication methods, and this application does not limit this here.
[0061] Refer to Figure 1 , Figure 1 which is a schematic flowchart of a method for creating a power transmission and transformation scenario change detection data set in the embodiments of this application. The method includes steps S110 - S150, where:
[0062] Step S110: Obtain redrawing instruction information, which includes target position information and a redrawing prompt. The target position information includes a target redrawing center point and a redrawing area size.
[0063] Specifically, the redrawing instruction information can be uploaded by the user to the production system through a preset annotation software, or the user can operate in the annotation box on the corresponding display interface of the production system. The specific acquisition method is not specifically limited in the embodiments of this application. Among them, the preset annotation software can establish a communication connection with the production system through an http request, and the production system can be deployed using ComfyUI.
[0064] The target redrawing center point and the redrawing area size included in the redrawing instruction information can be identified by means of semantic recognition. Among them, the target redrawing center point is the position where the user needs to perform local redrawing on the original scene image, and the redrawing area size is the area range where local redrawing operations need to be performed. The target redrawing center point can be described by coordinates or pixel points. The redrawing prompt can also be called a redrawing guiding word, which is used to describe the content that the user needs to redraw. For example, the redrawing prompt can be "crane, yellow", indicating that the corresponding redrawing content can be a large yellow crane. The redrawing prompt can be composed of multiple phrases or sentences, and the specific number of phrases or sentences is not specifically limited in the embodiments of this application.
[0065] Step S120: Extract the corresponding redrawing area image from the original scene image based on the target position information.
[0066] Specifically, the redrawing area image is a partial image of the original scene image, that is, the redrawing area image is obtained by intercepting from the original scene image based on the target position information. The area size of the redrawing area image is the same as the redrawing area size in the target information, and the center point of the redrawing area image is the target redrawing center point. The original scene image can be any power transmission and transformation scene image and can be uploaded by the user to the production system.
[0067] Step S130: Identify the redrawing features included in the redrawing prompt and determine the corresponding redrawing content based on the redrawing features.
[0068] Specifically, when the redrawing prompt only contains phrases, each phrase can be determined as a redrawing feature. When the redrawing prompt contains sentences, keyword extraction can be performed on the redrawing prompt through a semantic recognition algorithm, and the redrawing features can be determined according to the keyword extraction results. For example, if the redrawing prompt is "On a sunny summer afternoon, a little girl is chasing a colorful butterfly in a golden wheat field", the keywords obtained after keyword extraction can be "little girl", "wheat field", and "colorful butterfly". At this time, "little girl", "wheat field", and "colorful butterfly" can be determined as redrawing features. After determining the redrawing features included in the redrawing prompt, feature combination can be performed on the redrawing features to determine the corresponding redrawing content. The generation ability of the Stable Diffusion model itself can be used to determine the corresponding redrawing content based on the redrawing features. Among them, the Stable Diffusion model is an image generation model using deep learning technology, and can determine the corresponding redrawing content based on different redrawing features.
[0069] In addition, the corresponding redrawing content can also be determined by using a preset feature mapping relationship and the redrawing features included in the redrawing prompt. Among them, the preset feature mapping relationship includes the redrawing content corresponding to different combinations of redrawing features. The specific content of the preset feature mapping relationship is not specifically limited in the embodiments of the present application and can be determined by relevant staff according to historical experimental data and then uploaded to the production system. The method for determining the corresponding redrawing content based on the redrawing features is not specifically limited in the embodiments of the present application, as long as the determined redrawing content includes the redrawing features.
[0070] Step S140: Identify the scene resolution corresponding to the original scene image, and determine the local redrawing image based on the scene resolution, the redrawing area image, and the redrawing content.
[0071] Specifically, a preset image viewer can be used to identify the scene resolution corresponding to the original scene image. The preset image viewer can be Adobe Photoshop, GIMP, Windows Photo Viewer, etc. The specific image viewer is not specifically limited in the embodiments of the present application. The scene resolution corresponding to the original scene image can also be determined by analyzing the metadata of the original scene image. By referring to the scene resolution corresponding to the original scene image during the process of generating the partial redrawing image, it is convenient to improve the adaptability between the partial redrawing image and the original scene image, and to reduce the probability of the partial redrawing image being unbalanced. After determining the scene resolution corresponding to the original scene image, the redrawing area image and the redrawing content can be imported into the Stable Diffusion model, and the scene resolution can be used as a limiting condition to generate the corresponding partial redrawing image. The partial redrawing image is the redrawing area image with the redrawing content added. The resolution difference between the redrawing resolution corresponding to the partial redrawing image and the scene resolution is not higher than the preset resolution difference. Specifically, the preset resolution difference is not specifically limited in the embodiments of the present application and can be set by relevant technical personnel.
[0072] Step S150: Determine the result scene image based on the partial redrawing image and the original scene image, and determine the change detection training dataset based on the result scene image and the original scene image.
[0073] Specifically, after determining the partial redrawing image, the partial redrawing image can be superimposed or pasted back onto the original scene image based on the target redrawing center point to obtain the result scene image. A change detection data pair is generated based on the original scene image and the result scene image, and the change detection training dataset contains multiple change detection data pairs.
[0074] For the embodiments of the present application, analyzing the redrawing instruction information is convenient for improving the accuracy when determining the redrawing area image. In addition, after analyzing the redrawing features included in the redrawing prompt words, and then specifically determining the corresponding redrawing content based on the redrawing features, rather than determining the redrawing content according to fixed rules, it is convenient to improve the adaptability between the redrawing content and the redrawing prompt words, and also convenient to improve the richness of the redrawing content, thereby facilitating the improvement of the richness of the change detection training dataset. By generating the partial redrawing image based on the scene resolution of the reference original scene image, it is convenient to improve the consistency between the partial redrawing image and the original scene image, that is, it is convenient to improve the consistency between the result scene image and the original scene image, thereby facilitating the improvement of the quality and effectiveness of the change detection training dataset. Finally, the change detection training dataset is jointly constructed based on the original scene image and the result scene image, which is convenient for improving the training effect of the hidden danger recognition model, thereby improving the generalization ability and recognition accuracy of the hidden danger recognition model in practical applications, and further facilitating the improvement of the accuracy of the safety hidden danger monitoring results.
[0075] Further, in order to facilitate reducing the difference between the locally redrawn image and the original scene image, before determining the result scene image based on the locally redrawn image and the original scene image, the method provided by the embodiments of the present application further includes:
[0076] Identify the redrawing feature information included in the locally redrawn image. The redrawing feature information includes texture redrawing features, color redrawing features, lighting redrawing features, and the feature values corresponding to each redrawing feature; identify the original feature information included in the original scene image. The original feature information includes texture original features, color original features, lighting original features, and the feature values corresponding to each original feature; match the redrawing feature information and the original feature information to obtain the feature matching value between the locally redrawn image and the original scene image.
[0077] Specifically, before determining the result scene image based on the locally redrawn image, the locally redrawn image can be inspected, and whether to update and adjust the locally redrawn image can be judged according to the inspection result. Among them, the redrawing feature information corresponding to the locally redrawn image can be matched with the original feature information corresponding to the original scene image to judge whether the locally redrawn image is unbalanced. Among them, the texture redrawing features, color redrawing features, and lighting redrawing features corresponding to the locally redrawn image can be respectively identified from the locally redrawn image through a feature recognition algorithm, and the texture original features, color original features, and lighting original features corresponding to the original scene image can be identified from the original scene image. The specific feature recognition method is not specifically limited in the embodiments of the present application and can be set by relevant staff.
[0078] Since texture is an important manifestation of the surface features of objects in an image and determines the texture and details of the image, if the redrawn texture in the locally redrawn image is too different from the original texture in the original scene image, when the locally redrawn image is superimposed or pasted back onto the original scene image, obvious splicing marks may occur, affecting the overall beauty and authenticity of the result scene image; color is one of the key factors in the visual effect of an image. If the redrawn color in the locally redrawn image is too different from the original color in the original scene image, when the locally redrawn image is superimposed or pasted back onto the original scene image, the color may appear abrupt or inconsistent; lighting is an important means of expressing the shape and contour of objects in an image. If the redrawn lighting in the locally redrawn image is too different from the original lighting in the original scene image, when the locally redrawn image is superimposed or pasted back onto the original scene image, the lighting effect may be unnatural. Therefore, in the embodiments of the application, the locally redrawn image is inspected based on texture, color, and lighting, but the specific features included in the redrawing feature information are not limited in the embodiments of the present application and can be adjusted by relevant technical personnel according to actual needs.
[0079] When the feature matching value is lower than the preset matching value, based on the feature difference between the feature matching value and the preset matching value and the mapping relationship of the preset border expansion information, the border expansion information corresponding to the feature difference is determined. The preset border expansion information mapping relationship is the corresponding relationship between the feature difference and the border expansion information, and the border expansion information includes the border expansion size and the border expansion transparency; based on the border expansion information, the image of the redrawing area is adjusted to obtain the updated image of the redrawing area, and then the updated local redrawing image is determined based on the updated image of the redrawing area.
[0080] Specifically, when the feature matching value after feature matching between the redrawing feature information corresponding to the local redrawing image and the original feature information corresponding to the original scene image is not lower than the preset matching value, it indicates that there is no need to perform border expansion processing on the local redrawing image, that is, there is no need to perform border expansion processing on the redrawing area image corresponding to the local redrawing image, and the step of determining the result scene image based on the local redrawing image and the original scene image can be executed. When the feature matching value is lower than the preset matching value, it indicates that border expansion processing needs to be performed on the local redrawing image, that is, border expansion processing needs to be performed on the redrawing area image corresponding to the local redrawing image to reduce or eliminate the splicing trace. Among them, the preset matching value can be 80% or 90%. The specific preset matching value is not specifically limited in the embodiments of the present application.
[0081] When it is determined that border expansion processing needs to be performed on the redrawing area image, random border expansion processing can be performed, that is, as long as the size of the redrawing area image obtained after border expansion processing is larger than the size of the redrawing area before border expansion processing. Fixed expansion can also be used to perform border expansion processing on the redrawing area image, that is, as long as it is determined that border expansion processing needs to be performed on the redrawing area image, the redrawing area image is expanded according to a preset fixed ratio. The specific preset fixed ratio can be 2 times or 1.2 times. The specific preset fixed ratio is not specifically limited in the embodiments of the present application. For example, when the preset fixed ratio is 1.2 times, the size corresponding to the redrawing area image is 400*400, and the corresponding size after border expansion processing is 480*480.
[0082] In addition, the corresponding border expansion information, i.e., the border expansion strategy, can be determined based on the feature difference and the preset border expansion information mapping relationship. The preset border expansion information mapping relationship contains the border expansion information corresponding to different feature differences. The specific content is not specifically limited in the embodiments of the present application and can be determined by relevant staff based on historical experimental data and then uploaded to the production system. The border expansion information includes the border expansion size and the border expansion transparency. The border expansion size is added to the size of the redrawn area, that is, on the basis of the redrawn area image, the border expansion area corresponding to the border expansion size is superimposed to adjust the size of the redrawn area of the redrawn area image. The difference between the local redrawn image and the original scene image can be further reduced by reducing the transparency of the border expansion area. For the specific method of determining the updated local redrawn image based on the updated redrawn area image, reference can be made to the method of determining the corresponding local redrawn image based on the redrawn area image in the above embodiments, which will not be elaborated here.
[0083] Further, in order to facilitate improving the coordination between the local redrawn image and the original scene image, adjusting the redrawn area image based on the border expansion information to obtain the updated redrawn area image includes:
[0084] Identifying the redrawn edge information corresponding to the redrawn content, and determining the discrete level of the edge points corresponding to the redrawn content based on the redrawn edge information; determining the border expansion type based on the discrete level of the edge points, and the border expansion type includes balanced border expansion and unbalanced border expansion; when the border expansion type is balanced border expansion, determining the updated redrawn area image based on the target redrawn center point and the border expansion information. When the border expansion type is unbalanced border expansion, identifying the content center point corresponding to the redrawn content, adjusting the target redrawn center point based on the content center point to obtain the updated target redrawn center point, and determining the updated redrawn area image based on the updated target redrawn center point and the border expansion information.
[0085] Specifically, the redrawn edge information corresponding to the redrawn content can be identified from the local redrawn image based on an edge recognition algorithm. At this time, the local redrawn image is the local redrawn image before the border expansion process. The edge recognition algorithm can be the Sobel operator detection algorithm, the Canny edge detection algorithm, and the Prewitt operator detection algorithm. The specific edge recognition algorithm is not specifically limited in the embodiments of the present application, as long as it can identify the redrawn edge information corresponding to the redrawn content from the local redrawn image.
[0086] The redrawing edge information contains the coordinate information of each edge point. By performing discrete analysis on the redrawing edge information, the discrete level of the edge points corresponding to the redrawing content can be determined. Among them, methods such as calculating the standard deviation or variance, calculating the average distance, and using clustering algorithms can be used to perform discrete analysis on the redrawing edge information. The specific discrete analysis method is not specifically limited in the embodiments of the present application. When using the standard deviation or variance to measure the discrete level of edge points, the standard deviation or variance of the edge points in the X coordinate and Y coordinate can be calculated respectively to evaluate the discrete degree of the edge points in the horizontal and vertical directions. The larger the standard deviation or variance value, the higher the discrete level of the edge points in that direction, that is, the sparser the distribution of the edge points; on the contrary, it indicates that the distribution of the edge points is denser.
[0087] After determining the discrete level of the edge points corresponding to the redrawing content, the discrete level of the edge points can be compared with the preset discrete level. When the discrete level of the edge points is lower than the preset discrete level, the corresponding edge expansion type can be determined as balanced edge expansion; when the discrete level of the edge points is not lower than the preset discrete level, the corresponding edge expansion type can be determined as unbalanced edge expansion. Among them, the specific preset discrete level is not specifically limited in the embodiments of the present application and can be set by relevant technical personnel.
[0088] The corresponding edge expansion methods for different edge expansion types are different. When the edge expansion type is balanced edge expansion, the edge expansion process can be directly performed based on the target redrawing center point and the edge expansion information. The center point of the redrawing area image obtained after the edge expansion process is still the target redrawing center point. When the edge expansion type is unbalanced edge expansion, it is necessary to adjust the target redrawing center point based on the content center point corresponding to the redrawing content to obtain the updated target redrawing center point, and then perform the edge expansion process based on the updated target redrawing center point and the edge expansion information. Among them, the updated target redrawing center point may be the content center point or any point located between the content center point and the target redrawing center point.
[0089] After determining the edge expansion information, the redrawing edge information of the redrawing content can also be analyzed to determine the edge expansion method adapted to the redrawing content, and the redrawing area image can be edge-expanded based on the adapted edge expansion method, which is convenient for improving the coordination between the local redrawing image and the original scene image, thereby facilitating the improvement of the effectiveness of the result scene image.
[0090] Furthermore, in order to facilitate improving the adaptability between the redrawing content and the original scene image, after extracting the corresponding redrawing area image from the original scene image based on the target position information, the method provided in the embodiments of the present application further includes steps S1 - S3, as Figure 2 shown, where:
[0091] Step S1: Identify the scene features included in the redrawing area image. When there are at least two different scene features in the redrawing area image, check whether the redrawing prompt contains a scene description prompt. The scene description prompt is the description prompt corresponding to any one of the at least two different scene features.
[0092] Specifically, the scene features can be uphill roads, downhill roads, flat roads, lakes, etc. Different scene features are presented differently in the redrawing area image, and the scene features included in the redrawing area image can be identified through feature recognition. The specific feature recognition method is not specifically limited in the embodiments of the present application. When there are two or more scene features in the redrawing area image, it may affect the accuracy of determining the redrawing content. For example, when the redrawing prompt is a yellow crane and the redrawing area image contains both an uphill road and a downhill road at the same time, a yellow crane needs to be added to the redrawing area image. However, since the parking forms of the yellow crane on the uphill road and the downhill road may be different, and when training the model based on the change detection data of different parking forms, the corresponding training content may also be different. Therefore, it is necessary to check whether the redrawing prompt contains a scene description prompt. The scene description prompt can be adding a yellow crane beside the uphill road. When performing semantic recognition on the redrawing instruction information, the scene description prompt may be mistakenly excluded as invalid data. Therefore, when there are at least two different scene features in the redrawing area image, it is necessary to re-identify whether the redrawing prompt contains a scene description prompt.
[0093] Step S2: When the redrawing prompt contains a scene description prompt, determine the corresponding redrawing content based on the scene description prompt.
[0094] Specifically, when it is determined that the redrawing prompt contains a scene description prompt, re-determine the corresponding redrawing content according to the scene description prompt to ensure that the redrawing content is adapted to the scene description prompt. The method of re-determining the corresponding redrawing content according to the scene description prompt can refer to the method of identifying the redrawing features included in the redrawing prompt in the above embodiments and then determining the corresponding redrawing content based on the redrawing features, which will not be elaborated here.
[0095] Step S3: When the redrawing prompt does not contain a scene description prompt, obtain the corresponding historical training data based on the scene features, and determine the corresponding target historical scene description prompt based on the historical training data. Then determine the corresponding redrawing content based on the target historical scene description prompt. The historical training data contains the scene description prompts corresponding to each scene feature during the historical time period.
[0096] Specifically, when the redrawing prompt does not contain a scene description prompt, instead of randomly determining the corresponding redrawing content, it is necessary to analyze the historical training data to determine the corresponding target historical scene description prompt from the historical training data. The historical training data is all redrawing instruction information and the corresponding original scene images within a historical time period. By analyzing the number of times each scene feature is described with the corresponding scene description prompt in the historical training data, the scene feature with the most description times can be determined as the target scene feature, and based on the scene description prompt corresponding to the target scene feature and the redrawing prompt, the target historical scene description word can be determined. The historical time period can be a period of time before the current moment, and the duration corresponding to the historical time period can be 20 hours or 25 hours. The specific duration is not specifically limited in the embodiments of the present application. The original scene images in the historical training data are scene images that simultaneously contain at least two scene features. By analyzing the historical training data, the scene features that the relevant staff are more concerned about can be determined. For example, there are two existing scene features, namely an uphill road and a downhill road. According to the historical training data, it can be determined that there are a total of 10 original scene image information that simultaneously contain an uphill road and a downhill road within the historical time period, and among the 10 redrawing instruction information corresponding to the original scene images, 8 redrawing instruction information contains a scene description prompt about the uphill road, and 2 redrawing instruction information contains a scene description prompt about the downhill road. At this time, the uphill road can be determined as the target scene feature. When the redrawing prompt contains "yellow crane" and the determined target scene feature is the uphill road, the corresponding target historical scene description prompt can be determined as "add a yellow crane beside the uphill road". By analyzing the historical scene description words and determining the corresponding redrawing content based on the analysis results, it is convenient to improve the adaptability between the redrawing content and the original scene image, thereby facilitating the improvement of the effectiveness when determining the change detection training data set.
[0097] Further, when the number of scene features included in the redrawing area image is higher than a preset threshold, the method provided in the embodiments of the present application further includes:
[0098] Determine multiple scene features as associated scene features, and determine the historical scene description prompt corresponding to each associated scene feature based on the historical training data set; determine the associated redrawing content corresponding to each associated scene feature based on each historical scene description prompt, and match each associated redrawing content to obtain a morphological matching value; when the morphological matching value is lower than a preset morphological matching value, determine the associated redrawing content corresponding to each associated scene feature based on the historical scene description prompt corresponding to each associated scene feature; determine the corresponding associated result scene image based on each associated redrawing content, and establish the association relationship of each associated result scene image in the change detection training data set.
[0099] Specifically, the preset threshold can be 3 or 4. The specific threshold is not specifically limited in the embodiments of the present application and can be set by relevant technicians. When the number of scene features included in the redrawn area image is large, the content disclosed in the above embodiments can be used to determine the historical scene description prompt words corresponding to each scene feature and determine the corresponding redrawn content based on the historical scene description prompt words. The specific process will not be elaborated here. For the convenience of description, multiple scene features can be determined as associated scene features, and the redrawn content corresponding to each associated scene feature can be determined as associated redrawn content.
[0100] Match each associated redrawn content for analyzing and evaluating the differences between different associated redrawn contents. When the morphological matching value is lower than the preset morphological matching value, it indicates that the similarity between the associated redrawn contents corresponding to different associated scene features is low. At this time, if only one of the associated scene features is selected to determine the redrawn content and then the change detection data pair is determined based on the redrawn content, it may reduce the richness of the change detection data set. Therefore, the associated redrawn content of each associated scene feature can be determined respectively to enrich the change detection data set, so as to facilitate improving the recognition effect of the hidden danger recognition model on the same object or device in similar scene features. Among them, the specific preset morphological matching value is not specifically limited in the embodiments of the present application and can be set by relevant staff.
[0101] The connection between the associated result scene images can be established by adding an associated link in the associated result scene image, so as to intuitively compare the training results generated when the hidden danger recognition model is trained on different associated result scene images. In addition, by establishing the association relationship between the associated result scene images, it is also convenient to improve the logic and generalization of the hidden danger recognition model when the hidden danger recognition model uses the change detection training data set for model training, so as to facilitate improving the accuracy when determining the safety hidden danger monitoring result.
[0102] Furthermore, to facilitate improving the accuracy when determining the redrawn content, the method provided in the embodiments of the present application further includes:
[0103] Identify the scene features included in the original scene image. When the scene feature is a preset scene feature, based on the mapping relationship between the preset scene feature and the preset scene prompt word, determine the scene prompt word corresponding to the preset scene feature. The mapping relationship between the preset scene feature and the scene prompt word is the corresponding relationship between the preset scene feature and the scene prompt word; update the redrawing prompt word based on the scene prompt word to obtain the updated redrawing prompt word, and then determine the corresponding redrawn content based on the updated redrawing prompt word.
[0104] Specifically, the preset scenario features can be road maintenance, road collapse, etc. The specific preset scenario features can be determined by relevant staff based on historical research data and then uploaded to the production system. Among them, the scenario prompt words corresponding to different preset scenario features are different. The preset scenario prompt word mapping relationship contains the scenario prompt words corresponding to different preset scenario features. The scenario prompt words can be "Please avoid the maintenance section" or "Please avoid the collapsed section". The specific content of the preset scenario prompt word mapping relationship is not specifically limited in the embodiments of the present application and can be determined by relevant staff based on historical experimental data and then uploaded to the production system.
[0105] Update and redraw the prompt words based on the scenario prompt words, that is, perform descriptive limitations on the basis of the redraw prompt words. When determining the corresponding redrawn content based on the updated redraw prompt words, the adaptability between the updated redraw prompt words and the original scene image can be improved, so as to facilitate reducing the probability of generating invalid partial redrawn images, and thus facilitate improving the quality of the change detection data set.
[0106] In the embodiments of the present application, a production system is provided, such as Figure 3 shown Figure 3 The production system 300 shown in the figure includes: a processor 301 and a memory 303. Among them, the processor 301 and the memory 303 are connected, such as connected through a bus 302. Optionally, the production system 300 may further include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one, and the structure of the production system 300 does not constitute a limitation to the embodiments of the present application.
[0107] The processor 301 may be a CPU (Central Processing Unit, central processor), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), an ASIC (Application Specific Integrated Circuit, application-specific integrated circuit), an FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in connection with the disclosure of the present application. The processor 301 may also be a combination that realizes computing functions, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0108] The bus 302 may include a path for transmitting information among the above components. The bus 302 can be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 302 can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 3 only one line is shown in Figure 3 , but it does not mean that there is only one bus or one type of bus.
[0109] The memory 303 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or it can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0110] The memory 303 is used to store the application program code for executing the solution of this application, and is controlled by the processor 301 for execution. The processor 301 is used to execute the application program code stored in the memory 303 to implement the content shown in the foregoing method embodiments.
[0111] Among them, the production system includes but is not limited to: mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. It can also be a server, etc. Figure 3 The shown production system is only an example and should not bring any limitations to the functions and usage scopes of the embodiments of this application.
[0112] The embodiments of this application provide a computer-readable storage medium on which a computer program is stored. When it runs on a computer, it enables the computer to execute the corresponding content in the foregoing method embodiments.
[0113] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method in any of the above embodiments.
[0114] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order restriction, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0115] The above are only some embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A method for preparing a data set for detecting power transmission and transformation scene changes, characterized in that: include: Obtaining redraw instruction information, wherein the redraw instruction information includes target position information and redraw prompt words, and the target position information includes a target redraw center point and a redraw area size; Extracting a corresponding redrawing area image from the original scene image based on the target position information; Identifying the redrawing features contained in the redrawing prompt word, and determining the corresponding redrawing content based on the redrawing features; Identifying a scene resolution corresponding to the original scene image, and determining a local redrawn image based on the scene resolution, the redrawn area image, and the redrawn content; Determine a result scene image based on the local redrawn image and the original scene image, and determine a change detection training data set based on the result scene image and the original scene image; Wherein, before determining the result scene image based on the partial redrawn image and the original scene image, the method further includes: Identifying redrawing feature information contained in the partial redrawn image, wherein the redrawing feature information includes texture redrawing features, color redrawing features, illumination redrawing features, and feature values corresponding to each redrawing feature; Identify original feature information contained in the original scene image, wherein the original feature information includes texture original features, color original features, illumination original features, and feature values corresponding to each original feature; Matching the redrawn feature information with the original feature information to obtain a feature matching value between the local redrawn image and the original scene image; When the feature matching value is lower than the preset matching value, based on the feature difference between the feature matching value and the preset matching value and the preset edge expansion information mapping relationship, determining the edge expansion information corresponding to the feature difference, wherein the preset edge expansion information mapping relationship is a corresponding relationship between the feature difference and the edge expansion information, and the edge expansion information includes an edge expansion size and an edge expansion transparency; Adjusting the redrawing region image based on the edge expansion information to obtain an updated redrawing region image, and then determining an updated partial redrawing image based on the updated redrawing region image; The adjusting the redrawing area image based on the edge expansion information to obtain an updated redrawing area image includes: Identifying redrawn edge information corresponding to the redrawn content, and determining an edge point discrete level corresponding to the redrawn content based on the redrawn edge information; Determining an edge expansion type based on the discrete level of the edge points, wherein the edge expansion type includes balanced edge expansion and unbalanced edge expansion; When the edge expansion type is balanced edge expansion, determining an updated redrawing area image based on the target redrawing center point and the edge expansion information; When the edge expansion type is non-balanced edge expansion, the content center point corresponding to the redrawn content is identified, the target redrawing center point is adjusted based on the content center point to obtain an updated target redrawing center point, and an updated redrawing area image is determined based on the updated target redrawing center point and the edge expansion information.
2. The method for preparing a power transmission and transformation scene change detection data set according to claim 1, characterized in that: After extracting the corresponding redrawing area image from the original scene image based on the target position information, the method further includes: Identify the scene features contained in the redrawing area image, and when the redrawing area image contains at least two different scene features, identify whether the redrawing prompt word contains a scene description prompt word, wherein the scene description prompt word is a description prompt word corresponding to any scene feature of the at least two different scene features; When the redrawing prompt word includes the scene description prompt word, determining the corresponding redrawing content based on the scene description prompt word; When the redrawing prompt word does not include the scene description prompt word, the corresponding historical training data is obtained based on the scene feature, and the corresponding target historical scene description prompt word is determined based on the historical training data, and the corresponding redrawing content is determined based on the target historical scene description prompt word, and the historical training data includes the scene description prompt word corresponding to each scene feature in the historical time period.
3. The method for preparing a data set for detecting power transmission and transformation scene changes according to claim 2, characterized in that: When the number of scene features included in the redrawn area image is higher than a preset threshold, the method further includes: Determine multiple scene features as associated scene features, and determine the historical scene description prompt word corresponding to each associated scene feature based on the historical training data set; Determine the associated redrawing content corresponding to the associated scene feature based on each historical scene description prompt word, and match each associated redrawing content to obtain a morphological matching value; When the morphology matching value is lower than a preset morphology matching value, determining the associated redrawing content corresponding to each associated scene feature based on the historical scene description prompt word corresponding to each associated scene feature; A corresponding associated result scene image is determined based on each associated redrawing content, and an associated relationship of each associated result scene image in the change detection training data set is established.
4. The method for preparing a data set for detecting power transmission and transformation scene changes according to claim 1, characterized in that: Also includes: Identifying a scene feature included in the original scene image, and when the scene feature is a preset scene feature, determining a scene prompt word corresponding to the preset scene feature based on a mapping relationship between the preset scene feature and a preset scene prompt word, wherein the preset scene prompt word mapping relationship is a corresponding relationship between the preset scene feature and the scene prompt word; The redrawing prompt word is updated based on the scene prompt word to obtain an updated redrawing prompt word, and then the corresponding redrawing content is determined based on the updated redrawing prompt word.
5. A production system, characterized in that: The production system includes: at least one processor; Memory; At least one application, wherein the at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute a method for producing a data set for detecting changes in power transmission and transformation scenarios as described in any one of claims 1-4.
6. A computer-readable storage medium, characterized in that: include: A computer program is stored which can be loaded by a processor and executes a method for producing a data set for detecting changes in power transmission and transformation scenarios as described in any one of claims 1 to 4.
7. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the steps of a method for producing a data set for detecting changes in power transmission and transformation scenarios according to any one of claims 1 to 4.
Citation Information
Patent Citations
Image redrawing method and device, computer equipment and storage medium
CN117808917A
Human body abdominal muscle image generation method, system and device and storage medium
CN118365723A