CN115606575A - Intelligent bird repelling method and system based on target detection network - Google Patents

Intelligent bird repelling method and system based on target detection network Download PDF

Info

Publication number
CN115606575A
CN115606575A CN202211356398.3A CN202211356398A CN115606575A CN 115606575 A CN115606575 A CN 115606575A CN 202211356398 A CN202211356398 A CN 202211356398A CN 115606575 A CN115606575 A CN 115606575A
Authority
CN
China
Prior art keywords
target detection
bird
birds
data set
detection network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211356398.3A
Other languages
Chinese (zh)
Inventor
张腾龙
李擎
付国栋
苏中
刘柯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Information Science and Technology University
Original Assignee
Beijing Information Science and Technology University
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 Beijing Information Science and Technology University filed Critical Beijing Information Science and Technology University
Priority to CN202211356398.3A priority Critical patent/CN115606575A/en
Publication of CN115606575A publication Critical patent/CN115606575A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A01AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
    • A01MCATCHING, TRAPPING OR SCARING OF ANIMALS; APPARATUS FOR THE DESTRUCTION OF NOXIOUS ANIMALS OR NOXIOUS PLANTS
    • A01M29/00Scaring or repelling devices, e.g. bird-scaring apparatus
    • A01M29/16Scaring or repelling devices, e.g. bird-scaring apparatus using sound waves
    • A01M29/18Scaring or repelling devices, e.g. bird-scaring apparatus using sound waves using ultrasonic signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Pest Control & Pesticides (AREA)
  • Insects & Arthropods (AREA)
  • Birds (AREA)
  • Environmental Sciences (AREA)
  • Wood Science & Technology (AREA)
  • Zoology (AREA)
  • Human Computer Interaction (AREA)
  • Catching Or Destruction (AREA)

Abstract

The invention discloses an intelligent bird repelling method and system based on a target detection network. Wherein, the method comprises the following steps: acquiring image data of a designated area; identifying whether birds to be repelled exist in the image data or not by utilizing a target detection model which is constructed and trained on the basis of the target detection network in advance; in the case where the birds to be repelled are present in the image data, the birds to be repelled are repelled from the specified area with a bird repelling device. The invention solves the technical problem that birds cannot be accurately identified.

Description

Intelligent bird repelling method and system based on target detection network
Technical Field
The invention relates to the field of artificial intelligence, in particular to an intelligent bird repelling method and system based on a target detection network.
Background
With the improvement of animal protection consciousness of people, the number of wild birds in China is increasing year by year, meanwhile, due to the expansion of the human activity range, the natural environment suitable for bird life, inhabitation and multiplication is greatly reduced, areas around airports with dense vegetation, farmlands and the like become ideal places for bird life and multiplication, however, bird collision and bird damage symptoms easily occur in the environment, and certain threat is caused to the life and property safety of people.
At present, aiming at bird collision and bird damage prevention, the long-term use of the bird repelling mode of scarecrow and sports scarecrow can reduce the sensitivity of birds to scarecrow, the effect is poor, and different birds react with the devices differently; and the arrangement of a large-area wire netting or a mechanical bird repelling device is high in cost, and can damage birds and even influence human beings.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides an intelligent bird repelling method and system based on a target detection network, which at least solve the technical problem that birds cannot be accurately identified.
According to an aspect of an embodiment of the present invention, there is provided an intelligent bird repelling method based on a target detection network, the method including: acquiring image data of a designated area; identifying whether birds to be repelled exist in the image data or not by utilizing a target detection model which is constructed and trained on the basis of the target detection network in advance; in the case where the birds to be repelled are present in the image data, the birds to be repelled are repelled from the specified area with a bird repelling device.
According to another aspect of the embodiments of the present invention, there is also provided an intelligent bird repelling system based on a target detection network, including: an intelligent bird repelling device based on a target detection network; a bird repelling device configured to repel the birds to be repelled out of the designated area by emitting ultrasonic waves.
In the embodiment of the invention, whether birds to be repelled exist in the image data is identified based on the target detection model constructed and trained by the target detection network, so that the technical effect is realized, and the technical problem that the birds cannot be accurately identified is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of an intelligent bird repelling method based on a target detection network according to an embodiment of the present invention;
FIG. 2 is a flow chart of another intelligent bird repelling method based on a target detection network according to an embodiment of the present invention;
FIG. 3 is a flowchart of yet another intelligent bird repelling method based on a target detection network according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a YOLOv5 target detection network structure according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the internal modules of the YOLOv5 target detection network according to an embodiment of the present invention;
FIG. 6 is a schematic interface diagram of an avian target detection system according to an embodiment of the present invention;
FIG. 7 is a schematic diagram illustrating the operational video detection function and effect of the bird target detection system according to the embodiment of the invention;
fig. 8 is a schematic structural diagram of an intelligent bird repelling device based on a target detection network according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an intelligent bird repelling system based on a target detection network according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of another intelligent bird repelling device based on a target detection network according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, there is provided an intelligent bird repelling method based on a target detection network, as shown in fig. 1, the method including:
step S102, collecting image data of a designated area;
and step S104, identifying whether birds to be repelled exist in the image data by using a target detection model which is constructed and trained on the basis of the target detection network in advance.
In one example, the object detection model is constructed and trained by: acquiring a bird image, establishing a bird sample data set based on the bird image, labeling and dividing the bird data set to obtain a training data set and a test data setThe data set is tried. For example, labeling a sample picture in the bird data set with a labeling tool to generate a corresponding label of the sample picture, wherein the label includes a category cls, a normalized bird target center point abscissa p nx Normalized bird target center point ordinate p ny Normalized bird target width p nw Normalized bird target height p nh
In one example, the specific normalization method may be as follows: if the sample picture size is P x ×P y If the horizontal and vertical coordinates of the center point of the labeling frame are p respectively x ,p y The width and height of the label box are respectively p w ,p h . Then the normalized bird center point horizontal and vertical coordinates, width and height are:
Figure BDA0003921410270000041
dividing the marked sample picture and the corresponding label according to the preset proportion of the training data set and the testing data set to obtain the training data set and the testing data set.
And constructing a target detection network, taking the bird data set after marking and dividing as the input of the target detection network to perform parameter training of the target detection model, so that the target detection network can output image data containing a detection frame for identifying the birds to be expelled under the condition that the image data contains the birds to be expelled, and the target detection network is obtained.
For example, initializing the target detection network; and traversing the sample pictures in the training data set, and processing the sample pictures. For example, an image area with a preset size is created, and the central point of the enhanced image is randomly selected in a square interval of the preset interval in the horizontal and vertical coordinates; randomly selecting a plurality of sample pictures to be placed in an image area, splicing the sample pictures by taking a preset central point as a center, and cutting the part which exceeds the image area. Zooming the whole cut image area according to a preset proportion; the short side of the scaled image area is supplemented with a gray background so that the entire scaled image area is filled.
In one example, the specific rule of the zoom stitching is as follows, if the size of the image area with the preset size is P x0 ,P y0 The number of the images to be spliced is NP, and the size of the spliced images is P x,i ×P y,i And i is the serial number of the image to be spliced and satisfies the condition that i | i belongs to Z + I is more than or equal to 0 and less than or equal to NP, wherein Z + Representing a positive integer field. E.g. P x,i Representing the length of the abscissa of the ith picture, taking the upper left corner point of the image area as the origin of coordinates, and the picture area is in the fourth quadrant, then the position [ x ] of each picture to be spliced j1 ,y j1 ,x j2 ,y j2 ]The calculation formula of (c) may be as follows:
[x j1 ,y j1 ,x j2 ,y j2 ]=[l i x cx,i λ x,i P x,i ,l i y cy,i λ y,i P y,i
l i x cx,ix,i +1)P x,i ,l i y cy,iy,i +1)P y,i ]
wherein x is j1y j 1,x j2 ,y j2 The horizontal coordinate, the vertical coordinate, the horizontal coordinate and the vertical coordinate of the upper left corner, the lower right corner of the spliced picture are respectively. l. the i And the position coefficient of the ith picture is related to the position of the picture to be spliced in the preset image area. Kappa type x,i ,κ y,i The orientation factor of the ith picture is k, which is-1 or 1, if the image i is located at the left side of the enhancement center, k x,i =1, otherwise +1, and κ if image i is above the center of enhancement y,i =1, otherwise +1. Lambda [ alpha ] x,i 、λ y,i Is the scaling factor, x, of the ith image in the horizontal and vertical coordinate directions c ,y c Enhancing central horizontal and vertical sitting for imagesAnd (4) marking.
By the position calculation method, the sample background can be greatly enriched under the condition that the original features of the image are not lost, the batch standardization efficiency is improved, and the training speed is accelerated.
In one example, x c ,y c This can be calculated as follows:
Figure BDA0003921410270000051
wherein r is x ,r y The values of the scaling coefficients of the preset image area in the x direction and the y direction are respectively larger than 1. Sigma is a random coefficient, and the condition that { sigma | sigma belongs to R,0 is larger than or equal to sigma and is smaller than or equal to 1} is met, so that the position of the enhanced center has randomness, and R represents a real number domain. After splicing, x is less than 0 or x is more than P x0 Y > 0 or y<-P y0 The portion of (2) is cut.
Thus calculating the center x of image enhancement c ,y c The training samples can be subjected to proper random scaling and shielding, the diversity of the training samples is increased, and the performance of the target detection model is improved.
Then, inputting the processed sample picture into the target detection network, predicting the input sample picture, and outputting a characteristic diagram; and carrying out grid detection according to the output feature map.
In one example, the specific steps of grid detection may be as follows:
firstly, a processed sample image is divided into N multiplied by N grids, and if the area contained in each grid is S, the grid S is n Prediction (p) nx +p nw /2,p ny -p nh /2)∈S n The object of (1). Specifically, the detection frame of the target is predicted by using the following formula:
Figure BDA0003921410270000061
wherein x is b ,y b ,w b ,h b The horizontal coordinate and the vertical coordinate of the central point of the prediction detection frame, the width of the prediction detection frame and the height of the prediction detection frame are respectively. x is the number of Sk 、y Sk Is a grid S k The horizontal and vertical coordinates of the upper left corner of (1). Y is x ,Y y For translational offset, for adjusting the position of the detection frame, Y w ,Y h To scale the offset, the scale of the detection box is adjusted. Pairs Y during training based on subsequently calculated losses x ,Y y ,Y w ,Y h And adjusting to obtain a more accurate prediction detection frame.
The detection frame is detected by the method, so that the detection speed can be increased, the correlation among the variables of the detection frame is reduced, the accumulation of the whole error caused by the error of a certain variable is prevented, and the detection result is more accurate.
Under the condition that the birds to be expelled are contained in the sample picture, outputting a prediction result containing a detection frame for identifying the birds to be expelled, calculating loss according to the prediction result, and updating the weight of the target detection model; and calculating the indexes of the target detection model after the weight is updated by using the test data set, and evaluating the target detection model. For example, the test data set is used to calculate at least one of the following indicators for the target detection model after updating the weights: frame selection loss, confidence loss, precision, recall rate and average precision; and evaluating the target detection model by using the index.
In one example, the box loss function is calculated as follows:
if the image is divided into NxN grids, the network predicts NxNxC frames, where C is the frame type number preset by the network, and a three-dimensional matrix LB (LB) with size of NxNxC is established according to the prediction result x ,LB y ,LB c ) If lattice LB x Line, LB y Selection frame LB corresponding to the column c The object is present in memory, and the element LB (LB) of the position of the matrix is set x ,LB y ,LB c ) And =1, otherwise 0. When the frame selection loss is calculated for the whole image, onlyCalculating LB (LB) x ,LB y ,LB c ) Loss of mesh =1, i.e. overall frame selection Loss ∑B The calculation formula of (2) is as follows:
Figure BDA0003921410270000071
wherein, N represents the number of grids contained in a row or a column, C represents the number of detection frames preset by the network, and Loss box (LB x ,LB y ,LB c ) For each box loss function, the formula is calculated as follows:
Figure BDA0003921410270000072
wherein x is b Represents the abscissa, y, of the center point of the prediction detection frame b Represents the ordinate of the center point of the prediction detection frame, w b Indicates the width of the prediction detection box, h b Indicates the predicted detection frame height, p nx Represents the abscissa, p, of the center point of the normalized bird tag ny Representing normalized bird tag center point ordinate, P x Representing the width, P, of the sample image y Representing the height, p, of the sample image nw Indicates normalized bird tag width, p nh Indicating normalized bird tag height. Γ is the intersection ratio of the prediction frame to the real frame, and has a value equal to:
Figure BDA0003921410270000073
eta is a frame selection proportion influence factor, and the calculation formula is as follows:
Figure BDA0003921410270000074
cRx, cRy is the horizontal coordinate and the vertical coordinate of the upper left corner of the rectangle of the overlapped part of the prediction frame and the real frame, and cPx, cPy is the horizontal coordinate and the vertical coordinate of the lower right corner of the rectangle of the overlapped part of the prediction frame and the real frame, and the calculation formula is as follows;
Figure BDA0003921410270000081
similarly, loss of confidence in the image as a whole is used in Loss of confidence ∑C To indicate, then Loss ∑C The calculation of (c) is as follows:
Figure BDA0003921410270000082
wherein Loss conf (LB x ,LB y ,LB c ) For each box confidence loss, it is calculated as follows:
Figure BDA0003921410270000083
the overall loss of the detection network is GLoss, the value of the GLoss is related to the box loss and the confidence loss, and the calculation formula is as follows:
GLoss=ρ box Loss ∑Bconf Loss ∑C
wherein ρ box For boxed lost weight coefficients, ρ conf For confidence loss weight coefficients, classification loss is not considered since the detection target is only birds. The global loss Gloss consists of only the box penalty and the confidence penalty.
The method for calculating the frame selection loss has the advantages of enhancing the robustness of the algorithm, enabling the training result to have better generalization, increasing the frame selection accuracy, increasing the attention to the frame selection loss and accelerating the effect of the weight updating speed.
And step S106, if the birds to be repelled exist in the image data, expelling the birds to be repelled out of the specified area by using a bird expelling device.
The intelligent bird repelling method provided by the embodiment can repel birds accurately, quickly, with low cost and in a mode of little damage to birds. The embodiment adopts a target detection algorithm, solves the object detection as a regression problem, is higher in detection speed than a traditional two-stage (two-stage) method from the input of an original image to the output of the position and the category of the object based on a single end-to-end network, is suitable for a real-time detection scene, has higher accuracy, and can accurately identify birds so as to drive the birds.
Example 2
According to an embodiment of the present invention, there is provided an intelligent bird repelling method based on a target detection network, as shown in fig. 2, the method including:
step S201, acquiring bird images and establishing a bird sample data set.
The bird data set may include, for example, a CUB-200-2011 data set, a data set published by bird parts in a Pascal VOC2012 data set, bird parts in a COCO data set, and the like, as well as a picture of a real bird sample taken by an individual.
And S202, marking and dividing the bird data set.
Step S203, training a target detection model.
And (3) building a target detection network such as a YOLOv5 target detection network, and performing model parameter training by taking the bird data set as network input, so that the target detection network can output images of bird targets framed in the video image by a detection frame (bounding box).
The training step of the target detection model based on the YOLOv5 target detection network comprises the following steps:
1) The sample data is loaded using a data loader (dataloader).
2) Inputting a blank picture of 640 × 640 into the YOLOv5 target detection network to initialize the YOLOv5 target detection network.
3) And traversing the input picture samples, and sequentially processing each picture.
4) And performing image enhancement and scaling on the picture sample.
5) And inputting the processed three-color channel picture into a YOLOv5 network as network input, and predicting an input image.
The target detection network is constructed by a backbone (backbone), a neck (neck) and a head (head), wherein the backbone network part is used for feature extraction, the neck part is used for feature fusion, and the head part is used for prediction output.
6) And carrying out grid detection according to the output characteristic diagram result to obtain a detection frame prediction result, calculating loss according to the result, and updating the model weight.
7) And calculating each index of the target detection model by using the test set, and evaluating the target detection model.
8) And after one generation (epoch) is finished, storing the obtained target detection model, continuing to perform the next epoch until all epochs are finished, and selecting the model best in evaluation index best as an output model, so far, finishing the training of the target detection model.
And step S204, deploying the target detection model generated by the target detection network into the bird target detection system.
Step S205, configuring the environment required by the operation of the target detection system, and installing the target detection system into the host.
Step S206, configuring the system.
Erect intelligent bird repellent system based on target detection network under the scene that has the demand of driving birds, include: high definition digtal camera, host computer, ultrasonic wave bird repellent device, solar panel and communication medium.
And step S207, operating the intelligent bird repelling system based on the target detection network on the host, and repelling birds out of the designated area shot by the camera.
The intelligent bird repelling system in the embodiment comprises a solar device, a high-definition camera, a host, an ultrasonic bird repelling device and the like.
The solar device supplies power to the accessory equipment, saves energy and solves the problem of difficulty in erecting a power supply in a field environment.
The high-definition camera is powered by the solar device, and a shooting area of the high-definition camera is a target bird repelling area.
The bird target detection system mounted on the host can select bird targets in the bird target detection system according to read-in video image information, give confidence and frame selection information, and display results in a graphical user interface. And transmitting a control signal to the other device via the communication medium according to the detection result. For example, a target detection model of an avian target detection system may detect video captured by a camera or a video camera frame by frame, identify avian targets therein and frame and display them in a graphical user interface. And sending instruction information to the equipment connected with the host according to the detection result.
The ultrasonic bird repelling device is powered by the solar device and can emit sound waves disliked by birds.
The communication medium comprises a network cable, wifi, a serial port and the like, is connected with each device, and realizes communication between each device and the host.
The host machine is loaded with the bird target detection system, and is connected with the high-definition camera and the ultrasonic transmitting device through communication media. And according to the result sent by the detection system, sending a control command to a device connected with the detection system through a communication medium to realize intelligent bird repelling.
The intelligent bird repelling system performs bird repelling as follows: the high-definition camera shoots an area to be scared. And uploading the shot target area image to the host by the high-definition camera. And the host carrying the bird target detection system predicts the video image data uploaded by the high-definition camera frame by frame, judges whether birds exist in the area, gives a detection frame and confidence on a graphical user interface if the birds exist in the area, sends an instruction to the ultrasonic bird repelling device and controls the ultrasonic bird repelling device to start to repel the birds. If the ultrasonic wave orders about birds to leave the picture position, once drive the bird action and accomplish, ultrasonic device closes until the camera next time detects birds. In order to conveniently erect a power supply and save energy in different scenes, the solar panel is used for supplying power for the high-definition camera and the ultrasonic bird repelling device.
In the embodiment of the application, a bird picture data set is prepared firstly, wherein the bird picture data set comprises a bird part in a CUB-200-2011 data set Pascal-VOC 2012 data set, a bird part in a COCO data set, a bird sample picture taken by an individual and tag data corresponding to the picture sample; then, preprocessing the bird data set, and dividing the process according to the training set: validation set =4:1, randomly dividing; the YOLOv5 target detection network comprises backbone, neck and head parts; the target detection model is obtained by sending a data set consisting of the pictures and the labels into a YOLOv5 network for training; the bird target detection system can read in video image information transmitted by the camera in real time, select bird targets in the video image information, give confidence and detection frame coordinates, and accordingly can accurately identify birds to be expelled.
Example 3
According to the embodiment of the invention, the intelligent bird repelling method based on the target detection network is provided, the method utilizes a high-definition camera to monitor a target bird repelling area, a shot video is uploaded to a host carrying a target detection algorithm, and the host controls an ultrasonic bird repelling device to release bird repelling sound waves according to a detection result, so that the aim of intelligently repelling birds is fulfilled. As shown in fig. 3, the intelligent bird repelling method based on the target detection network includes the following steps:
and S301, acquiring a bird image and establishing a bird sample data set.
In this embodiment, the bird sample data sets are derived from 4 sources, which are respectively a CUB-200-2011 data set, a bird part in a Pascal VOC2012 data set, a bird part in a COCO data set, and a bird picture shot by a person.
And step S302, marking and dividing the bird data set.
In this embodiment, the acquired bird pictures are labeled by using a labeling tool, and the horizontal coordinate of the center point of the bird target including the category and the normalization, the vertical coordinate of the center point of the bird target after the normalization, the width of the bird target after the normalization, and the height of the bird target after the normalization are generated. In this embodiment, specifically, the marked pictures and the corresponding labels are according to a training set: validation set =4: a ratio of 1.
Step 303, building a YOLOv5 target detection network.
And taking the bird data set in the step S302 as the input of the YOLOv5 target detection network to perform parameter training of a target detection model, so that the target detection network can output images of bird targets in the video images framed by a bounding box.
In this embodiment, the parameter training of the target detection model specifically includes:
and loading sample data and a pre-training model, and configuring training parameters. For the present embodiment, the pre-training model adopts yolov5l model, and the parameters adopt preset parameters.
Inputting a blank 640 x 640 picture into the network to initialize the network. And traversing the input picture samples, and sequentially reading in each picture. And performing image enhancement and scaling on the picture sample. In the present embodiment, a mosaic image enhancement method and padding scaling are adopted.
The method for enhancing the mosaics image comprises the following steps: firstly, an image area of 1280 x 1280 is created, and the central point (x, y) of the mosaic enhanced image is randomly selected in a square interval with the horizontal and vertical coordinates of (320, 960).
Four images are randomly selected and placed in the image area, the lower right corner, the lower left corner, the upper right corner and the upper left corner of the four images are overlapped, and the parts exceeding the image area are cut.
The specific steps of scaling with padding are as follows: if the picture size is (x, y), the whole picture is scaled at a ratio of 640/max (x, y). The longer edge of the picture is scaled to 640 pixels in length.
The shorter side is then supplemented with a gray background so that the entire image area is filled, the scaled picture size being 640 x 640. And inputting the processed three-color channel picture as network input into a YOLOv5 network, and predicting an input image.
In this embodiment, the YOLOv5 target detection network structure is constructed by a backbone network part, a neck part and a head part, and the structure is shown in fig. 4, wherein the backbone network part is used for feature extraction, the neck part is used for feature fusion, and the head part is used for prediction output.
In this embodiment, the backbone network of the YOLOv5 target detection network adopts a CSP-Darknet53 architecture, and is formed by connecting a CBS module, a CSP1_ n module, and an SPPF module in the order shown in fig. 5. The CBS module (convbnsilo) is composed of a volume block (constraint), a normalization module (batch normalization) and an activation function (silo) module, which are connected in sequence according to the structure shown in fig. 5. The CSP1_ n module is composed of a CBS module, a BottleNeck1 module and Concat according to the connection mode of the figure 5, wherein n is the number of times of occurrence of the BottleNeck module in the network. The BottleNeck1 module is composed of 2 CBS modules and a residual error structure, and as shown in FIG. 5, the input of the BottleNeck1 is added with the original input after being convolved twice and then is output.
In this embodiment, the neck network of the YOLOv5 target detection network adopts a CSP-PAN structure, and as shown in fig. 5, the neck network is composed of a CBS module, a CSP2_ n module, and an upsampling (upsampling) operation and a Concat operation. Wherein, the CSP2_ n module comprises: the CBS module, the BottleNeck2 module and the Concat are connected according to the structure shown by CSP2_ n in FIG. 5, wherein n is the number of the BottleNeck2 modules. Wherein, the BottleNect2 module includes: two CBS modules, connected as shown by BottleNeck2 in FIG. 5.
In this embodiment, as shown in the structure of fig. 4, the head layer of the YOLOv5 target detection network outputs feature maps of three scales, i.e., 20 × 20, 40 × 40, and 80 × 80, with the outputs of the module 11, the module 21, and the module 24 as inputs of convolution.
Carrying out grid detection according to the output characteristic diagram result, obtaining a detection frame prediction result, calculating loss according to the result, and updating the model weight, for the embodiment, only judging the position of birds in the scene, not calculating classification loss, but only calculating two kinds of loss: and (4) positioning loss and confidence coefficient loss, wherein a specific calculation mode adopts CIoU.
Evaluating the model by utilizing each index of the test set calculation model, wherein in the embodiment, the specific indexes comprise: box loss box _ loss, confidence loss obj _ loss, precision (Precision), recall (Recall), mAP average Precision.
And after one epoch is finished, storing the obtained target detection model, continuing to perform the next epoch until all epochs are finished, selecting the model best in evaluation index best as an output model, and finishing model training.
And S304, deploying the target detection model generated by the bird target detection network into a bird target detection system.
In this embodiment, as shown in fig. 6, the system may call a high definition camera connected to a host attached to the system, and acquire video information captured by the high definition camera. Clicking the video real-time detection button shown in fig. 6, detecting the video frame by using the trained target detection model, identifying the bird target in the video, selecting the bird target in the video, and displaying the prediction result in the graphical user interface as shown in fig. 7. The system can send instruction information to the equipment connected with the host according to the detection result. The detection may be stopped by clicking the stop detect button shown in fig. 6.
Step S305, configuring an environment required by the operation of the target detection system, and installing the bird target detection system into a host.
Specifically, the operating system is a Windows10 and above downward compatible system, and in this embodiment, a Windows11 operating system is used. In addition, a Pythroch machine learning framework needs to be installed, and the version of the Pytorch is required to be more than or equal to 1.8.0.torchvision version > =0.9.0 and torchaudio version ≧ 0.8.0. In addition, if GPU training is adopted, the CUDA version is required to be more than or equal to 10.2. Specifically, in the present embodiment, the CUDA version 11.1 is installed with the pitorch version =1.8.0, the torchvision version =0.9.0, the torchaudio version = 0.8.0. In the aspect of host hardware, in the embodiment, a host CPU adopts i7-11800H-2.30GHz 32GB, and a GPU adopts Nvidia RTX 3070G.
And S306, erecting an intelligent bird repelling system based on a target detection network under the scene with the bird repelling requirement.
The bird system is driven to intelligence includes: high definition digtal camera, host computer, ultrasonic wave bird repellent device, solar panel and communication medium.
The scenes with the bird repelling requirements are obtained by researching and researching in modes of on-line internet inquiry, off-line investigation and the like, and the probability of bird collision and bird damage is high in the fields of farmlands, airports and the like. Specifically, the intelligent bird repelling system in the embodiment can be arranged in experimental open space where vegetation is exuberant and birds pass through.
In the present embodiment, the devices are mounted as follows:
the high-definition camera is connected with the internet, and the shot video is uploaded to a network video server through the network. The high-definition camera utilizes solar panel to supply power, fixes in the position that can shoot the target and drive the bird region.
The host computer uses the independent power supply to supply power for the host computer, and is connected with the Internet to call the video information uploaded to the network video server by the camera. The host computer and the ultrasonic transmitter adopt Zigbee communication connection, and the host computer can send instructions to the ultrasonic transmitter to control the opening and closing of the ultrasonic transmitter.
The ultrasonic transmitter utilizes the solar panel to supply power, the installation position of the ultrasonic transmitter ensures that the influence range of bird repelling sound waves at least comprises a target bird repelling area, and the Zigbee is adopted to communicate with the host, so that the self equipment state can be uploaded to the host.
Running an intelligent bird repelling system based on a target detection network on a host computer to repel birds out of a designated area shot by a camera,
the high-definition camera shoots an area to be scared. And uploading the shot target area image to the host by the high-definition camera. And the host carrying the bird target detection system predicts the video image data uploaded by the high-definition camera frame by frame, judges whether birds exist in the area, gives a detection frame and confidence level on a graphical user interface if the birds exist in the area, sends an instruction to the ultrasonic bird repelling device, and controls the ultrasonic bird repelling device to start to repel the birds. If the ultrasonic wave orders about birds to leave the picture position, once drive the bird action and accomplish, ultrasonic device closes until the camera next time detects birds.
In this embodiment, when the required confidence is greater than 0.2, an instruction is sent to the ultrasonic bird repelling device. Specifically, in this embodiment, for the convenience of erectting the power and the energy can be saved at different scenes, utilize solar panel to supply power for high definition digtal camera and ultrasonic wave bird repellent device.
It should be noted that for simplicity of description, the above-mentioned method embodiments are shown as a series of combinations of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 4
According to an embodiment of the present invention, there is also provided an intelligent bird repelling device based on a target detection network, including: an acquisition module 82, a detection module 84, and an eviction module 86.
The acquisition module 82 is configured to acquire image data of a specified area.
The detection module 84 is configured to identify whether birds to be repelled are present in the image data using a target detection model that is constructed and trained in advance based on the target detection network;
the expelling module 86 is configured to expel the birds to be expelled from the designated area with a bird expelling device if the birds to be expelled are present in the image data.
The intelligent bird repelling device in the embodiment can realize the intelligent bird repelling method in the embodiment, and therefore, the description is omitted here.
Example 5
According to an embodiment of the present invention, there is also provided an intelligent bird repelling system based on a target detection network, as shown in fig. 9, the system including: intelligent bird expelling device 92 and bird repelling device 94 based on target detection network. The intelligent bird repelling device 52 based on the target detection network is the same as the repelling device 92 in embodiment 4, and is not described in detail here.
A bird repelling device 94, such as an ultrasonic bird repelling device, is configured to repel the birds to be repelled out of the designated area by emitting ultrasonic waves.
Example 6
According to an embodiment of the present invention, there is also provided an intelligent bird repelling system based on a target detection network, as shown in fig. 10, the system including: high-definition camera 62, host computer 64, ultrasonic bird repellent device 66, solar panel 68 and communication medium 60.
The high definition camera 62 is connected to the internet, and uploads the shot video to the network video server through the network. The high definition digtal camera utilizes solar panel to supply power, fixes the position that can shoot the target and drive the bird region.
The host 64 uses an independent power supply to power it, and connects to the internet to invoke the video information uploaded by the cameras to the network video server. The host computer adopts Zigbee communication connection with ultrasonic wave bird repellent device, and the host computer can send the instruction to ultrasonic wave bird repellent device and control its opening and close. Host 64 may include the intelligent bird repelling device based on the target detection network in embodiment 4, and therefore, host 64 will not be described herein.
The ultrasonic bird repelling device 66 is powered by a solar panel, is installed at a position where the influence range of bird repelling sound waves at least includes a target bird repelling area, and is communicated with the host 64 by Zigbee, so that the device state of the device can be uploaded to the host 64.
An intelligent bird repelling system based on a target detection network is operated on the host 64, birds are repelled out of a designated area shot by the camera,
the high definition camera 62 shoots an area to be scared. The high definition camera 62 uploads the captured target area image to the host 64. The host 64 carrying the bird target detection system predicts the video image data uploaded by the high-definition camera frame by frame, judges whether birds exist in the area, gives a detection frame and confidence on a graphical user interface if the birds exist in the area, sends an instruction to the ultrasonic bird repelling device 66, and controls the ultrasonic bird repelling device 66 to start to repel the birds. If the ultrasonic waves drive the birds to leave the picture positions, one-time bird repelling action is completed, and the ultrasonic bird repelling device 66 is closed until the camera detects the birds next time.
In this embodiment, when the confidence level is required to be greater than 0.2, an instruction is sent to the ultrasonic bird repelling device 66. Specifically, in this embodiment, in order to conveniently erect the power supply and save energy in different scenes, the solar panel is used to supply power to the high-definition camera and the ultrasonic bird repelling device 66.
In the embodiment, a high-definition camera is used for monitoring the area with the bird repelling requirement; the high-definition camera is communicated with a host carrying a target detection network and an auxiliary system through a communication medium, and uploads video information to the host in real time; the host operates the target detection system, detects bird targets in videos uploaded by the camera in real time, sends an instruction to the ultrasonic transmitter when birds exist in the scene, and transmits bird-repelling ultrasonic waves to a specified position; when no bird target exists in the camera monitoring area, the transmission is stopped, and the bird is successfully driven once, so that the aim of driving birds intelligently and environmentally is fulfilled.
The embodiment of the application can carry out unmanned real-time autonomous bird repelling in the scene with bird repelling requirements, and ultrasonic waves are emitted quantitatively according to detection results, so that resources can be saved, and the harm to birds can be reduced to the minimum.
Example 7
The embodiment of the invention also provides a storage medium. The above-described storage medium is provided to store a program for executing the intelligent bird repelling method based on the target detection network in the above embodiments 1 to 3.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and amendments can be made without departing from the principle of the present invention, and these modifications and amendments should also be considered as the protection scope of the present invention.

Claims (10)

1. An intelligent bird repelling method based on a target detection network is characterized by comprising the following steps:
acquiring image data of a designated area;
identifying whether birds to be repelled exist in the image data or not by utilizing a target detection model which is constructed and trained on the basis of the target detection network in advance;
in the case where the birds to be repelled are present in the image data, the birds to be repelled are repelled from the specified area with a bird repelling device.
2. The method of claim 1, wherein the object detection model is constructed and trained by:
acquiring a bird image, establishing a bird sample data set based on the bird image, and labeling and dividing the bird data set to obtain a training data set and a test data set;
and building a target detection network, taking the marked and divided bird data set as the input of the target detection network to perform parameter training of the target detection model, so that the target detection network can output image data containing a detection frame for identifying the birds to be expelled under the condition that the image data contains the birds to be expelled, and the target detection network is obtained.
3. The method of claim 2, wherein performing parametric training of the target detection model using the labeled and partitioned bird data set as input to the target detection network comprises:
initializing the target detection network;
traversing sample pictures in the training data set, and processing the sample pictures;
inputting the processed sample picture into the target detection network, predicting the input sample picture, and outputting a feature map;
performing grid detection according to the output feature map, outputting a prediction result containing a detection frame for identifying the birds to be expelled under the condition that the sample picture contains the birds to be expelled, calculating loss according to the prediction result, and updating the weight of the target detection model;
and calculating the indexes of the target detection model after the weight is updated by using the test data set, and evaluating the target detection model.
4. The method of claim 3, wherein processing the sample picture comprises:
creating an image area with a preset size, and randomly selecting a central point of an enhanced image in a square area of a preset area in the horizontal and vertical coordinates;
randomly selecting a plurality of sample pictures to be placed in an image area, splicing the sample pictures by taking a preset central point as a center, and cutting the part which exceeds the image area.
5. The method of claim 4, wherein after performing the cropping, the method further comprises:
zooming the whole cut image area according to a preset proportion;
the short side of the scaled image area is supplemented with a gray background so that the entire scaled image area is filled.
6. The method of claim 3, wherein the evaluating the object detection model by calculating the index of the object detection model after updating the weight using the test data set comprises:
calculating at least one of the following indicators of the target detection model after updating the weights using the test data set: frame selection loss, confidence loss, precision, recall rate and average precision;
and evaluating the target detection model by using the index.
7. The method of claim 2, wherein tagging and partitioning the bird dataset into a training dataset and a test dataset comprises:
marking the sample pictures in the bird data set by using a marking tool to generate marked sample pictures, wherein the marked sample pictures comprise categories, normalized bird target center point horizontal coordinates, normalized bird target center point vertical coordinates, normalized bird target width and normalized bird target height;
dividing the marked sample picture and the corresponding label according to a preset proportion of the training data set and the testing data set to obtain the training data set and the testing data set.
8. The utility model provides an intelligence birds expulsion device based on target detection network which characterized in that includes:
an acquisition module configured to acquire image data of a specified area;
a detection module configured to identify whether birds to be repelled are present in the image data by using a target detection model which is constructed and trained based on the target detection network in advance;
an expulsion module configured to expel the birds to be expelled from the designated area with a bird expelling device in a case where the birds to be expelled are present in the image data.
9. An intelligent bird repelling system based on a target detection network, comprising:
the intelligent bird repelling device based on the target detection network as claimed in claim 8;
a bird repelling device configured to repel the birds to be repelled out of the designated area by emitting ultrasonic waves.
10. A computer-readable storage medium, on which a program is stored, which, when executed, causes a computer to carry out the method according to any one of claims 1 to 7.
CN202211356398.3A 2022-11-01 2022-11-01 Intelligent bird repelling method and system based on target detection network Pending CN115606575A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211356398.3A CN115606575A (en) 2022-11-01 2022-11-01 Intelligent bird repelling method and system based on target detection network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211356398.3A CN115606575A (en) 2022-11-01 2022-11-01 Intelligent bird repelling method and system based on target detection network

Publications (1)

Publication Number Publication Date
CN115606575A true CN115606575A (en) 2023-01-17

Family

ID=84875903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211356398.3A Pending CN115606575A (en) 2022-11-01 2022-11-01 Intelligent bird repelling method and system based on target detection network

Country Status (1)

Country Link
CN (1) CN115606575A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117351425A (en) * 2023-10-23 2024-01-05 国网山东省电力公司青岛市即墨区供电公司 Bird object expelling method, device, medium and equipment for transformer substation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117351425A (en) * 2023-10-23 2024-01-05 国网山东省电力公司青岛市即墨区供电公司 Bird object expelling method, device, medium and equipment for transformer substation

Similar Documents

Publication Publication Date Title
CN107481327B (en) About the processing method of augmented reality scene, device, terminal device and system
US20200090357A1 (en) Method and system for generating synthetic point cloud data using a generative model
CN109740571A (en) The method of Image Acquisition, the method, apparatus of image procossing and electronic equipment
CN110399908B (en) Event-based camera classification method and apparatus, storage medium, and electronic apparatus
CN114373047B (en) Method, device and storage medium for monitoring physical world based on digital twin
Yandouzi et al. Review on forest fires detection and prediction using deep learning and drones
CN112365604A (en) AR equipment depth of field information application method based on semantic segmentation and SLAM
CN114550053A (en) Traffic accident responsibility determination method, device, computer equipment and storage medium
CN115606575A (en) Intelligent bird repelling method and system based on target detection network
CN110287848A (en) The generation method and device of video
CN115861799A (en) Light-weight air-to-ground target detection method based on attention gradient
CN115641519A (en) Power transmission line inspection method and device and nonvolatile storage medium
CN113222961A (en) Intelligent ship body detection system and method
CN115131407B (en) Robot target tracking method, device and equipment oriented to digital simulation environment
CN117197388A (en) Live-action three-dimensional virtual reality scene construction method and system based on generation of antagonistic neural network and oblique photography
CN116503399A (en) Insulator pollution flashover detection method based on YOLO-AFPS
Lane et al. Object detection in EO/IR and SAR images using low-SWAP hardware
CN115240168A (en) Perception result obtaining method and device, computer equipment and storage medium
CN110008916A (en) A kind of video image storage method, apparatus, equipment and storage medium
CN115758337A (en) Back door real-time monitoring method based on timing diagram convolutional network, electronic equipment and medium
CN112990156B (en) Optimal target capturing method and device based on video and related equipment
CN112070893B (en) Dynamic sea surface three-dimensional modeling method based on deep learning and storage medium
CN115115713A (en) Unified space-time fusion all-around aerial view perception method
Cohen et al. Machine vision algorithms for robust animal species identification
Li et al. On-Board Real-Time Pedestrian Detection for Micro Unmanned Aerial Vehicles Based on YOLO-v8

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