CN114022773A - Data enhancement method and equipment based on automatic mapping - Google Patents

Data enhancement method and equipment based on automatic mapping Download PDF

Info

Publication number
CN114022773A
CN114022773A CN202111364689.2A CN202111364689A CN114022773A CN 114022773 A CN114022773 A CN 114022773A CN 202111364689 A CN202111364689 A CN 202111364689A CN 114022773 A CN114022773 A CN 114022773A
Authority
CN
China
Prior art keywords
image
target
bird
target area
synthesized
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111364689.2A
Other languages
Chinese (zh)
Other versions
CN114022773B (en
Inventor
刘焕云
蔡富东
吕昌峰
边竞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Xinxinda Electric Technology Co ltd
Original Assignee
Jinan Xinxinda Electric Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Xinxinda Electric Technology Co ltd filed Critical Jinan Xinxinda Electric Technology Co ltd
Priority to CN202111364689.2A priority Critical patent/CN114022773B/en
Publication of CN114022773A publication Critical patent/CN114022773A/en
Application granted granted Critical
Publication of CN114022773B publication Critical patent/CN114022773B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a data enhancement method and equipment based on automatic mapping, belongs to the technical field of electric power, and is used for solving the technical problems that bird damage samples are difficult to collect and accumulate in an overhead power transmission line scene, and the quantity of bird damage samples is not enough to train a neural network model. The method comprises the following steps: inputting a preset number of bird images into a trained bird detection model, identifying a target area of each bird image, and outputting a target original image and an edge point coordinate set of the target area; generating a corresponding target template image based on the edge point coordinate set of the target area; randomly setting a target size for a target area; obtaining a bird image to be synthesized based on the target size, and obtaining a corresponding Gaussian template image; randomly determining a preset number of target synthesis positions in the selected power transmission line scene image, and respectively superposing each bird image to be synthesized and the corresponding Gaussian template image at each target synthesis position to obtain a bird sample image.

Description

Data enhancement method and equipment based on automatic mapping
Technical Field
The application relates to the technical field of electric power, in particular to a data enhancement method and equipment based on automatic mapping.
Background
Overhead transmission line plays the effect of well stream column in electric wire netting system, but open-air environment leads to transmission line can receive multiple factor influence in service, and wherein the bird pest is one of the main harm that threatens transmission line safe operation, and bird droppings can cause flashover, short circuit, tripping operation scheduling problem. Some measures for controlling bird damage have been taken: bird stabbing prevention, windmill driving, ultrasonic wave prevention and the like, the consumption of manpower and material resources is huge, the prevention and control effect is not obvious, and an accurate, efficient and real-time bird repelling technology is urgently needed.
At present, artificial intelligence methods are adopted to detect birds, and then ultrasonic bird repelling is carried out according to detection results, so that safe and stable operation of the power transmission line is guaranteed. As is known, a great amount of high-quality samples are needed for training a neural network model to achieve a good recognition effect, and in the real world, few bird damage pictures are shot from overhead transmission line tower visualization equipment, on-line sample collection is difficult, and the accumulation speed is slow, so that the number of samples needed for training the neural network model is insufficient, and the neural network model with a good recognition effect cannot be obtained.
Disclosure of Invention
The embodiment of the application provides a data enhancement method and equipment based on automatic mapping, which are used for solving the following technical problems: bird samples are difficult to collect and accumulate in an overhead power transmission line scene, and the number of bird samples is not enough to train a neural network model.
The embodiment of the application adopts the following technical scheme:
in one aspect, an embodiment of the present application provides a data enhancement method based on automatic mapping, where the method includes: randomly selecting a preset number of bird images and a power transmission line scene image; inputting the bird images of the preset number into a trained bird detection model, identifying a target area of each bird image, and outputting a target original image and an edge point coordinate set of the target area; wherein, a plurality of edge points are marked at the edge of a target area in the target original image; generating a corresponding target template image based on the edge point coordinate set of the target area; randomly setting a target size for each target area; if the target size of the target area is larger than or equal to a preset threshold value, scaling the target original image corresponding to the target area to the corresponding target size in an equal proportion manner to obtain a corresponding bird image to be synthesized; if the target size of the target area is smaller than a preset threshold value, scaling the target template image corresponding to the target area to the corresponding target size in an equal proportion manner to obtain a corresponding bird image to be synthesized; creating a Gaussian blur template for each bird image to be synthesized to obtain a corresponding Gaussian template image; randomly determining a preset number of target synthesis positions in the selected scene image of the power transmission line, and respectively superposing each bird image to be synthesized and the corresponding Gaussian template image at each target synthesis position to obtain a bird damage sample image.
According to the embodiment of the application, bird targets in a plurality of bird images are added to one power transmission line scene image in a map pasting mode, so that a plurality of bird targets are superposed in a large number of power transmission line scene images through the method, the appearance of bird damage in the power transmission line scene is simulated, a large number of bird damage sample images are provided for bird damage identification of the power transmission line scene, an ultra-large-scale bird training data set is constructed, and the detection rate of a neural network model to birds in the power transmission line scene is improved. This application is still through the size of random determination birds target, and the great birds target of size then uses original image, and the less birds target of size then uses black and white image to simulate out the different effects that birds are far away from the camera or are close, accord with the shooting effect of reality, make the sample image that arrives more true.
In a possible embodiment, before randomly selecting the preset number of bird images and one power transmission line scene image, the method further comprises: acquiring various bird images and various power transmission line scene images; selecting one part of the obtained bird images of various types as a model training sample, and using the other part of the obtained bird images as a model testing sample; performing edge point labeling on a target area in the model training sample through labelme data labeling software to obtain an edge point training set; training the bird detection model through the edge point training set so that the bird detection model can identify a target area in a bird image, and outputting a target original image and an edge point coordinate set of the target area; and testing the bird detection model through the model test sample.
According to the bird detection model, the bird target area is marked first, then the marked data are used for training the bird detection model, the bird detection model can automatically identify and mark the target area in the bird image, the target area is obtained in the data enhancement process, manual marking is not needed, and the workload of workers is greatly reduced.
In a possible implementation manner, after performing edge point labeling on a target area in the model training sample by labelme data labeling software to obtain an edge point training set, the method further includes: marking key position points on the head position, the wing position and the tail position of a target area in the model training sample through the labelme data marking software to obtain a key position point training set; marking the target posture of the target area to obtain a target posture training set; wherein the target attitude comprises a standing attitude and a flying attitude; training a target posture detection model through the key position point training set and the target posture training set; detecting the target posture of the bird image to be synthesized through the target posture detection model; and identifying the position of a power transmission conductor in the scene image of the power transmission line, and superposing the bird image to be synthesized in a standing posture on the position of the power transmission conductor to obtain a bird sample image of birds standing on the power transmission conductor.
This application can automatic identification birds 'gesture through training birds' target gesture detection model to synthesizing the birds of state of standing on the wire, simulating birds and standing the scene on the wire, the effect that makes the sample image of synthesizing is more lifelike.
In a possible implementation manner, generating a corresponding target template image based on the edge point coordinate set of the target region specifically includes: creating a blank image of the same size as the bird image; determining a region corresponding to the target region in the blank image according to the edge point coordinate set of the target region; setting the pixels of the area corresponding to the target area in the blank image to be 255, and setting the pixels of other areas in the blank image to be 0 to obtain the target template image; wherein, the target template image is a black and white image.
The black-and-white image with the same size as the original bird image is created to simulate the image shot by the bird far away from the camera, so that on one hand, the real effect can be better simulated, on the other hand, the difficulty of data processing is reduced, and the data volume of the black-and-white image is less than that of the original image.
In a possible embodiment, randomly setting a target size for each target area specifically includes: determining a minimum bounding rectangle of a target area in the bird image based on the selected edge point coordinate set of the target area; randomly setting a target size for the minimum circumscribed rectangle of the target area; wherein, the value range of the target size is [30, 300], and the unit is pixel.
In a possible embodiment, determining the minimum bounding rectangle of the target region based on the selected edge point coordinate set of the target region in the bird image specifically includes: according to minx ═ mini∈PxiObtaining a first boundary minx of the minimum circumscribed rectangle; wherein P is the selected edge point coordinate set of the target area in the bird image, i is the ith edge point in the edge point coordinate set, and xiThe abscissa of the ith edge point is taken as the abscissa of the ith edge point; according to miny ═ mini∈ PyiObtaining a second boundary miny of the minimum circumscribed rectangle; wherein, yiThe vertical coordinate of the ith edge point is taken as the vertical coordinate; according to maxx ═ maxi∈PxiObtaining a third boundary maxx of the minimum circumscribed rectangle; according to maxy ═ maxi∈PyiObtaining a fourth boundary maxy of the minimum external rectangle; and obtaining the minimum circumscribed rectangle based on the first boundary, the second boundary, the third boundary and the fourth boundary.
In a possible embodiment, a gaussian fuzzy template is created for each bird image to be synthesized, and a corresponding gaussian template image is obtained, specifically including: according to
Figure BDA0003360183860000041
Creating a Gaussian blur template for the bird image to be synthesized to obtain a Gaussian template image G (x, y); wherein u is the blur radius of the bird image to be synthesized in the horizontal direction, v is the blur radius of the bird image to be synthesized in the vertical direction, and sigma is the standard deviation of normal distribution.
In a feasible implementation manner, randomly determining a preset number of target synthesis positions in the selected scene image of the power transmission line specifically includes: randomly determining a first target synthesis position in the scene image of the power transmission line; randomly determining a second target synthesis position in the scene image of the power transmission line, and judging whether the second target synthesis position and the first target synthesis position are overlapped; and if the overlap exists, randomly determining a second target synthesis position again until the second target synthesis position does not overlap with the first target synthesis position, and circulating the steps until a preset number of target synthesis positions are randomly determined in the scene image of the power transmission line.
In a possible implementation manner, superimposing each bird image to be synthesized and the corresponding gaussian template image at each target synthesis position respectively to obtain a bird damage sample image, specifically including: according to Output-min (Image (x + x)1,y+y1)*(1-G(x, y)) + Niao (x, y) × G (x, y),255), superimposing one of the bird images to be synthesized and the corresponding gaussian template image on one of the target synthesis positions; wherein Image (x, y) is the scene Image of the power transmission line; (x)1,y1) Is the target synthesis position; niao (x, y) is the bird image to be synthesized; g (x, y) is a Gaussian template image corresponding to the bird image to be synthesized; and superposing the bird images to be synthesized in the preset number and the corresponding Gaussian template images at the target synthesis positions in the preset number to obtain the bird sample images.
According to the method and the device, the Gaussian template is created for the bird image to be synthesized, Gaussian weighting is carried out on the bird image to be synthesized during image synthesis, the problem that the edge of the bird image to be synthesized is sharp is greatly avoided, and the charting effect is more vivid.
On the other hand, the embodiment of the present application further provides a data enhancement device based on automatic mapping, and the device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method for auto-map based data enhancement according to any of the above embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts. In the drawings:
fig. 1 is a flowchart of a data enhancement method based on automatic mapping according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a target original image according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an image of a target template provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of an image of a bird damage sample according to an embodiment of the present disclosure;
FIG. 5 is a schematic view of another bird damage sample image provided in the embodiments of the present application;
fig. 6 is a schematic structural diagram of a data enhancement device based on automatic mapping according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
The embodiment of the application provides a data enhancement method based on automatic mapping, and as shown in fig. 1, the data enhancement method based on automatic mapping specifically includes steps S101-S106:
s101, randomly selecting a preset number of bird images and a power transmission line scene image by the data enhancement equipment.
Specifically, a sufficient number of images of various types of birds are first acquired on the internet. And acquiring or automatically shooting a sufficient number of scene images of various types of power transmission lines on the network. And selecting one part of all the obtained bird images as a model training sample, and selecting the other part of all the obtained bird images as a model testing sample.
Further, edge point labeling is carried out on the target area in the model training sample through labelme data labeling software, and an edge point training set is obtained. The target area is an area occupied by the birds, the edge points are points on the edges of the birds, and as shown in fig. 2, the points on the edge lines of the bird targets are the edge points. Birds surrounded by edge points are the target area.
Further, the bird detection model is trained through the edge point training set, so that the bird detection model can identify a target area in a bird image, and a target original image of the target area and an edge point coordinate set are output. The target original image is the image with the original color, which is marked out from the bird region, as shown in fig. 2.
Furthermore, the trained bird detection model is tested through the model test sample, the accuracy is calculated, and the bird detection model can be put into use after the accuracy of the bird detection model meets the requirement.
Furthermore, after the model is trained, the data enhancement equipment randomly selects a preset number of bird images from all the obtained bird images, randomly selects one power transmission line scene image from all the obtained power transmission line scene images,
in one embodiment, the preset number may be set manually according to requirements, for example, if 5 birds need to be added to one power transmission line scene image, the preset number is set to 5. The preset number may also be randomly generated.
S102, inputting a preset number of bird images into a trained bird detection model by the data enhancement equipment so that the bird detection model can identify a target area of each bird image, and outputting a target original image corresponding to each target area and an edge point coordinate set of each target area.
S103, the data enhancement equipment generates a corresponding target template image based on the edge point coordinate set of the target area.
Specifically, a blank image with the same size is created for each selected bird image, and then an area corresponding to the target area of the bird image in the blank image is determined according to the edge point coordinate set of the target area. Then, the pixels of the region corresponding to the target region in the blank image are set to be 255, and the pixels of other regions in the blank image are set to be 0, so that the target template image is obtained. As shown in FIG. 3, the target template image is a black and white image
In one embodiment, a blank image with the same size is created for the first bird image, then the edge point coordinate set of the first bird image is labeled in the blank image, and all the edge points are connected to form an area, wherein the area is an area corresponding to the target area of the first bird image. The pixel value in this region is set to 255, and the pixel values in the other regions are set to 0, so that the target template image corresponding to the first bird image shown in fig. 3 can be obtained. And obtaining target template images corresponding to other bird images by using the same method.
And S104, randomly setting a target size for the target area by the data enhancement equipment.
Specifically, based on the selected edge point coordinate set of the target area in the bird image, the minimum bounding rectangle of the target area is determined.
As a possible implementation manner, based on the selected edge point coordinate set of the target region in the bird image, the specific method for determining the minimum bounding rectangle of the target region is as follows: according to minx ═ mini∈PxiObtaining a first boundary minx of the minimum external rectangle; wherein, P is the edge point coordinate set of the target area in the selected bird image, i is the ith edge point in the edge point coordinate set, and xiThe abscissa of the ith edge point is taken; then min is defined according to minyi∈PyiObtaining a second boundary miny of the minimum external rectangle; wherein, yiIs the ordinate of the ith edge point; according to maxx ═ maxi∈PxiObtaining a third boundary maxx of the minimum circumscribed rectangle; according to maxy ═ maxi∈PyiAnd obtaining the fourth boundary maxy of the minimum circumscribed rectangle. Four boundaries are obtained, and the minimum circumscribed rectangle of the target area is also obtained.
In one embodiment, the minimum abscissa, the maximum abscissa, the minimum ordinate and the maximum ordinate in the edge point coordinate set of each target area are selected to respectively correspond to the left boundary, the right boundary, the lower boundary and the upper boundary of the minimum circumscribed rectangle, so that the minimum circumscribed rectangle of each target area is determined.
Further, a target size scale is set for the minimum bounding rectangle of each target area, wherein the value range of the scale is [30, 300], and the unit is a pixel.
S105, the data enhancement device obtains bird images to be synthesized based on the target size of the target area, and a Gaussian blur template is created for each bird image to be synthesized to obtain a corresponding Gaussian template image.
Specifically, if the target size of one target area is greater than or equal to a preset threshold, scaling the target original image corresponding to the target area to the corresponding target size in an equal proportion manner, and obtaining the bird image to be synthesized corresponding to the target area. And processing other target areas by the same method to obtain the bird images to be synthesized corresponding to all target areas with the target size smaller than the preset threshold value.
If the target size of one target area is smaller than a preset threshold value, scaling the target template image corresponding to the target area into the corresponding target size in an equal proportion to obtain a bird image to be synthesized corresponding to the target area; and processing other target areas by the same method to obtain all bird images to be synthesized corresponding to the target areas with the target size being larger than or equal to the preset threshold value. The number of bird images to be synthesized in the two parts is added to be the preset number.
In an embodiment, if the preset threshold is 100, when the scale of the minimum bounding rectangle of a certain target region is greater than or equal to 100, scaling the target original image corresponding to the target region to scale pixels to obtain a corresponding image to be synthesized. And when the scale of the minimum bounding matrix of a certain target area is less than 100, scaling the target template image corresponding to the target area to scale pixels in an equal proportion. This is because the larger the target area is, the closer the bird is to the camera, and the closer the bird is to the camera, the image captured by the camera tends to be clearer, so that the effect of real shooting can be better simulated by using the large-size target original image. And the smaller the target area is, the farther the bird is from the camera is shown, and the image far from the camera is fuzzy, so that the simplified target template image can be adopted to reduce the data volume of image processing.
Further in accordance with
Figure BDA0003360183860000091
Creating a Gaussian blur template for each bird image to be synthesized to obtain a corresponding Gaussian template image G (x, y); wherein u is the fuzzy radius of the bird image to be synthesized in the horizontal direction, v is the fuzzy radius of the bird image to be synthesized in the vertical direction, and sigma is the standard deviation of normal distribution.
S106, the data enhancement equipment randomly determines a preset number of target synthesis positions in the selected power transmission line scene image, and superimposes each bird image to be synthesized and the corresponding Gaussian template image at each target synthesis position respectively to obtain a bird sample image.
Specifically, a first target synthesis position is randomly determined in the power transmission line scene image, a second target synthesis position is randomly determined in the power transmission line scene image, whether the second target synthesis position is overlapped with the first target synthesis position or not is judged, if the second target synthesis position is overlapped with the first target synthesis position, the second target synthesis position is randomly determined again until the second target synthesis position is not overlapped with the first target synthesis position, and the process is repeated until a preset number of target synthesis positions are randomly determined in the power transmission line scene image.
Further, according to Output min (Image (x + x)1,y+y1) (1-G (x, y)) + Niao (x, y) × G (x, y),255), one of the bird images to be synthesized and the corresponding gaussian template image are superimposed at one of the target synthesis positions. Wherein, Image (x, y) is a scene Image of the power transmission line; (x)1,y1) Is a target synthesis position; niao (x, y) is an image of the bird to be synthesized; g (x, y) is a Gaussian template image corresponding to the bird image to be synthesized. And according to the same method, superposing all bird images to be synthesized in the scene image of the power transmission line to obtain a bird sample image.
By creating a Gaussian template for the bird image to be synthesized and performing Gaussian weighting on the bird image to be synthesized during image synthesis, the problem that the edge of the bird image to be synthesized is sharp is greatly avoided, and the chartlet effect is more vivid.
As a possible implementation manner, the first target synthesis position may be determined randomly in the power transmission line scene image, and then one of the bird images to be synthesized and the corresponding gaussian template image may be superimposed on the first target synthesis position according to an Output formula. And then randomly determining a second target synthesis position which is not overlapped with the first target synthesis position in the scene image of the power transmission line, and superposing another bird image to be synthesized and the corresponding Gaussian template image at the second target synthesis position according to an Output formula. And circulating the steps until all the bird images to be synthesized are superposed in the scene image of the power transmission line, so that a bird sample image is obtained. Fig. 4 is a schematic diagram of a bird damage sample image after superposition.
Through the data enhancement method based on the automatic mapping described in the application S101-S106, a preset number of bird targets can be superimposed in a large number of power transmission line scene images, so that the appearance of bird damage in the power transmission line scene is simulated, a large number of bird damage sample images are provided for bird damage identification of the power transmission line scene, an ultra-large-scale bird training data set is constructed, and the detection rate of a neural network model on birds in the power transmission line scene is improved.
As a possible implementation, the present application may also enhance an image sample of a bird standing on a lead by: and marking key position points on the head position, the wing position and the tail position of the target region in the model training sample through labelme data marking software to obtain a key position point training set. And marking the target posture of the target area to obtain a target posture training set. Wherein the target attitude comprises a standing attitude and a flying attitude. And then training a target posture detection model through the key position point training set and the target posture training set so as to detect the target posture of the bird image to be synthesized through the target posture detection model.
Further, the position of a power transmission conductor in the scene image of the power transmission line is identified, and the bird image to be synthesized in the standing posture is superposed on the position of the power transmission conductor to obtain a bird sample image of birds standing on the power transmission conductor. Fig. 5 is a schematic diagram of a synthetic image of a bird pest sample standing on a power transmission conductor.
In addition, an embodiment of the present application further provides an automatic mapping-based data enhancement device, and as shown in fig. 6, the automatic mapping-based data enhancement device 600 specifically includes:
at least one processor 601; and a memory 602 communicatively coupled to the at least one processor 601; wherein the memory 602 stores instructions executable by the at least one processor 601 to cause the at least one processor 601 to perform:
randomly selecting a preset number of bird images and a power transmission line scene image;
inputting a preset number of bird images into a trained bird detection model, identifying a target area of each bird image, and outputting a target original image and an edge point coordinate set of the target area; wherein, a plurality of edge points are marked at the edge of a target area in a target original image;
generating a corresponding target template image based on the edge point coordinate set of the target area;
randomly setting a target size for each target area;
if the target size is smaller than a preset threshold value, scaling the target original images corresponding to the bird images in the preset number into the corresponding target size in an equal proportion to obtain the bird images to be synthesized in the preset number;
if the target size is larger than or equal to the preset threshold value, scaling the target template images corresponding to the preset number of bird images into the corresponding target size in an equal proportion to obtain the preset number of bird images to be synthesized;
creating a Gaussian blur template for each bird image to be synthesized to obtain a corresponding Gaussian template image;
randomly determining a preset number of target synthesis positions in the selected power transmission line scene image, and respectively superposing each bird image to be synthesized and the corresponding Gaussian template image at each target synthesis position to obtain a bird sample image.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the embodiments of the present application pertain. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. An automatic mapping-based data enhancement method is characterized by comprising the following steps:
randomly selecting a preset number of bird images and a power transmission line scene image;
inputting the bird images of the preset number into a trained bird detection model, identifying a target area of each bird image, and outputting a target original image and an edge point coordinate set of the target area; wherein, a plurality of edge points are marked at the edge of a target area in the target original image;
generating a corresponding target template image based on the edge point coordinate set of the target area;
randomly setting a target size for each target area;
if the target size of the target area is larger than or equal to a preset threshold value, scaling the target original image corresponding to the target area to the corresponding target size in an equal proportion manner to obtain a corresponding bird image to be synthesized;
if the target size of the target area is smaller than a preset threshold value, scaling the target template image corresponding to the target area to the corresponding target size in an equal proportion manner to obtain a corresponding bird image to be synthesized;
creating a Gaussian blur template for each bird image to be synthesized to obtain a corresponding Gaussian template image;
randomly determining a preset number of target synthesis positions in the selected scene image of the power transmission line, and respectively superposing each bird image to be synthesized and the corresponding Gaussian template image at each target synthesis position to obtain a bird damage sample image.
2. The method of claim 1, wherein before randomly selecting a predetermined number of bird images and a power line scene image, the method further comprises:
acquiring various bird images and various power transmission line scene images;
selecting one part of the obtained bird images of various types as a model training sample, and using the other part of the obtained bird images as a model testing sample;
performing edge point labeling on a target area in the model training sample through labelme data labeling software to obtain an edge point training set;
training the bird detection model through the edge point training set so that the bird detection model can identify a target area in a bird image, and outputting a target original image and an edge point coordinate set of the target area;
and testing the bird detection model through the model test sample.
3. The method of claim 2, wherein after labeling the edge points of the target region in the model training sample by labelme data labeling software to obtain an edge point training set, the method further comprises:
marking key position points on the head position, the wing position and the tail position of a target area in the model training sample through the labelme data marking software to obtain a key position point training set;
marking the target posture of the target area to obtain a target posture training set; wherein the target attitude comprises a standing attitude and a flying attitude;
training a target posture detection model through the key position point training set and the target posture training set;
detecting the target posture of the bird image to be synthesized through the target posture detection model;
and identifying the position of a power transmission conductor in the scene image of the power transmission line, and superposing the bird image to be synthesized in a standing posture on the position of the power transmission conductor to obtain a bird sample image of birds standing on the power transmission conductor.
4. The method according to claim 1, wherein generating a corresponding target template image based on the edge point coordinate set of the target region specifically includes:
creating a blank image of the same size as the bird image;
determining a region corresponding to the target region in the blank image according to the edge point coordinate set of the target region;
setting the pixels of the area corresponding to the target area in the blank image to be 255, and setting the pixels of other areas in the blank image to be 0 to obtain the target template image; wherein, the target template image is a black and white image.
5. The method for enhancing data based on automatic mapping according to claim 1, wherein the randomly setting a target size for each target area specifically comprises:
determining a minimum bounding rectangle of a target area in the bird image based on the selected edge point coordinate set of the target area;
randomly setting a target size for the minimum circumscribed rectangle of the target area; wherein, the value range of the target size is [30, 300], and the unit is pixel.
6. The method according to claim 5, wherein the determining the minimum bounding rectangle of the target region based on the selected edge point coordinate set of the target region in the bird image specifically comprises:
according to minx ═ mini∈PxiObtaining a first boundary minx of the minimum circumscribed rectangle; wherein P is the selected edge point coordinate set of the target area in the bird image, i is the ith edge point in the edge point coordinate set, and xiThe abscissa of the ith edge point is taken as the abscissa of the ith edge point;
according to miny ═ mini∈PyiObtaining a second boundary miny of the minimum circumscribed rectangle; wherein, yiThe vertical coordinate of the ith edge point is taken as the vertical coordinate;
according to maxx ═ maxi∈PxiObtaining a third boundary maxx of the minimum circumscribed rectangle;
according to maxy ═ maxi∈PyiObtaining a fourth boundary maxy of the minimum external rectangle;
and obtaining the minimum circumscribed rectangle based on the first boundary, the second boundary, the third boundary and the fourth boundary.
7. The method for enhancing data based on automatic mapping according to claim 1, wherein a gaussian fuzzy template is created for each bird image to be synthesized, and a corresponding gaussian template image is obtained, specifically comprising:
according to
Figure FDA0003360183850000031
Creating a Gaussian blur template for the bird image to be synthesized to obtain a Gaussian template image G (x, y);
wherein u is the blur radius of the bird image to be synthesized in the horizontal direction, v is the blur radius of the bird image to be synthesized in the vertical direction, and sigma is the standard deviation of normal distribution.
8. The automatic mapping-based data enhancement method according to claim 1, wherein randomly determining a preset number of target synthesis positions in the selected scene image of the power transmission line specifically comprises:
randomly determining a first target synthesis position in the scene image of the power transmission line;
randomly determining a second target synthesis position in the scene image of the power transmission line, and judging whether the second target synthesis position and the first target synthesis position are overlapped;
and if the overlap exists, randomly determining a second target synthesis position again until the second target synthesis position does not overlap with the first target synthesis position, and circulating the steps until a preset number of target synthesis positions are randomly determined in the scene image of the power transmission line.
9. The method for enhancing data based on automatic mapping according to claim 1, wherein each bird image to be synthesized and the corresponding gaussian template image are respectively superimposed at each target synthesis position to obtain a bird damage sample image, and specifically comprises:
according to Output-min (Image (x + x)1,y+y1)*(1-G(x,y))+Niao(x,y)*
G (x, y),255), superposing one bird image to be synthesized and the corresponding Gaussian template image at one target synthesis position;
wherein Image (x, y) is the scene Image of the power transmission line; (x)1,y1) Is the target synthesis position; niao (x, y) is the bird image to be synthesized; g (x, y) is the avian image to be synthesizedCorresponding Gaussian template images;
and superposing the bird images to be synthesized in the preset number and the corresponding Gaussian template images at the target synthesis positions in the preset number to obtain the bird sample images.
10. An auto-map based data enhancement device, the device comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method for auto-map based data enhancement according to any one of claims 1-9.
CN202111364689.2A 2021-11-17 2021-11-17 Automatic mapping-based data enhancement method and equipment Active CN114022773B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111364689.2A CN114022773B (en) 2021-11-17 2021-11-17 Automatic mapping-based data enhancement method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111364689.2A CN114022773B (en) 2021-11-17 2021-11-17 Automatic mapping-based data enhancement method and equipment

Publications (2)

Publication Number Publication Date
CN114022773A true CN114022773A (en) 2022-02-08
CN114022773B CN114022773B (en) 2024-04-02

Family

ID=80064920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111364689.2A Active CN114022773B (en) 2021-11-17 2021-11-17 Automatic mapping-based data enhancement method and equipment

Country Status (1)

Country Link
CN (1) CN114022773B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106971152A (en) * 2017-03-16 2017-07-21 天津大学 A kind of method of Bird's Nest in detection transmission line of electricity based on Aerial Images
CN110889841A (en) * 2019-11-28 2020-03-17 江苏电力信息技术有限公司 YOLOv 3-based bird detection algorithm for power transmission line
CN112348117A (en) * 2020-11-30 2021-02-09 腾讯科技(深圳)有限公司 Scene recognition method and device, computer equipment and storage medium
WO2021098796A1 (en) * 2019-11-20 2021-05-27 Oppo广东移动通信有限公司 Image processing method and apparatus, device, and computer readable storage medium
CN113255691A (en) * 2021-04-15 2021-08-13 南昌大学 Method for detecting and identifying harmful bird species target of bird-involved fault of power transmission line

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106971152A (en) * 2017-03-16 2017-07-21 天津大学 A kind of method of Bird's Nest in detection transmission line of electricity based on Aerial Images
WO2021098796A1 (en) * 2019-11-20 2021-05-27 Oppo广东移动通信有限公司 Image processing method and apparatus, device, and computer readable storage medium
CN110889841A (en) * 2019-11-28 2020-03-17 江苏电力信息技术有限公司 YOLOv 3-based bird detection algorithm for power transmission line
CN112348117A (en) * 2020-11-30 2021-02-09 腾讯科技(深圳)有限公司 Scene recognition method and device, computer equipment and storage medium
CN113255691A (en) * 2021-04-15 2021-08-13 南昌大学 Method for detecting and identifying harmful bird species target of bird-involved fault of power transmission line

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张逸扬;储;王璐;: "结合多通道特征和可形变模型的自然场景鸟类检测", 南昌航空大学学报(自然科学版), no. 01, 15 March 2018 (2018-03-15) *

Also Published As

Publication number Publication date
CN114022773B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
CN111784685B (en) Power transmission line defect image identification method based on cloud edge cooperative detection
CN109615611B (en) Inspection image-based insulator self-explosion defect detection method
CN107742093B (en) Real-time detection method, server and system for infrared image power equipment components
CN108648169B (en) Method and device for automatically identifying defects of high-voltage power transmission tower insulator
JP6926335B2 (en) Variable rotation object detection in deep learning
CN109376605B (en) Electric power inspection image bird-stab-prevention fault detection method
CN109448001B (en) Automatic picture clipping method
CN110133443B (en) Power transmission line component detection method, system and device based on parallel vision
CN109658418A (en) Learning method, device and the electronic equipment of scene structure
CN110570435B (en) Method and device for carrying out damage segmentation on vehicle damage image
CN109117838B (en) Target detection method and device applied to unmanned ship sensing system
CN112101138B (en) Bridge inhaul cable surface defect real-time identification system and method based on deep learning
CN110163798B (en) Method and system for detecting damage of purse net in fishing ground
CN104735435A (en) Image processing method and electronic device
CN113095441A (en) Pig herd bundling detection method, device, equipment and readable storage medium
CN113515655A (en) Fault identification method and device based on image classification
CN114972646B (en) Method and system for extracting and modifying independent ground objects of live-action three-dimensional model
CN114220009A (en) Infrared image-based wire windage yaw identification method and system
CN115965934A (en) Parking space detection method and device
CN111507249A (en) Transformer substation nest identification method based on target detection
CN117409083B (en) Cable terminal identification method and device based on infrared image and improved YOLOV5
CN114022773B (en) Automatic mapping-based data enhancement method and equipment
CN113280820A (en) Orchard visual navigation path extraction method and system based on neural network
CN113361520B (en) Transmission line equipment defect detection method based on sample offset network
CN111429411B (en) X-ray defect image sample generation method for carbon fiber composite core wire

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant