CN112115970A - Lightweight image detection agricultural bird repelling method and system based on hierarchical regression - Google Patents

Lightweight image detection agricultural bird repelling method and system based on hierarchical regression Download PDF

Info

Publication number
CN112115970A
CN112115970A CN202010804741.0A CN202010804741A CN112115970A CN 112115970 A CN112115970 A CN 112115970A CN 202010804741 A CN202010804741 A CN 202010804741A CN 112115970 A CN112115970 A CN 112115970A
Authority
CN
China
Prior art keywords
image
detection
birds
bird
feature map
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
CN202010804741.0A
Other languages
Chinese (zh)
Other versions
CN112115970B (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.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
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 Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN202010804741.0A priority Critical patent/CN112115970B/en
Publication of CN112115970A publication Critical patent/CN112115970A/en
Application granted granted Critical
Publication of CN112115970B publication Critical patent/CN112115970B/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/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2431Multiple classes
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • 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
    • G06N3/045Combinations of networks
    • 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
    • G06N3/048Activation functions
    • 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)
  • Life Sciences & Earth Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Birds (AREA)
  • Insects & Arthropods (AREA)
  • Pest Control & Pesticides (AREA)
  • Wood Science & Technology (AREA)
  • Zoology (AREA)
  • Environmental Sciences (AREA)
  • Image Analysis (AREA)
  • Catching Or Destruction (AREA)

Abstract

The invention discloses a lightweight image detection agricultural bird repelling method and system based on hierarchical regression.A model training module establishes a hierarchical regression target detection model ScareDet based on a convolutional neural network, trains on a bird data set by using a gradient descent algorithm, and stores the trained model into a raspberry group; the image acquisition module shoots an image in a designated area by using the zoom camera and transmits image data to the raspberry group through the USB interface; the bird detection module performs bird detection by using a ScareDet detection model and image data stored in a raspberry group; the bird repelling module controls the loudspeaker to supply power according to the raspberry sending detection result, if birds exist in the detection, the loudspeaker is powered, the loudspeaker sends alarm noise to repel the birds, and otherwise, the monitoring is continued by the image acquisition module and the bird detection module. The invention adopts a photoelectric detection means for birds, and only sends out alarm sound if birds are found in a specified area, thereby realizing all-weather detection and intelligent bird repelling.

Description

Lightweight image detection agricultural bird repelling method and system based on hierarchical regression
Technical Field
The invention relates to the field of computer vision and intelligent agriculture, in particular to a lightweight image detection agricultural bird repelling method based on hierarchical regression.
Background
China is a big agricultural country, and in many rural areas, in order to prevent flying birds from eating crops under unattended condition, humanoid scarecrows are made and placed among fields to scare the birds. However, because of its simple structure and long-term stillness, birds may not be able to adapt to such control means during long-term activities.
The bird is driven by an automatic means (mechanical movement or circuit sound), so that the problems existing in the traditional mode can be overcome. The threat of utilizing mechanical motion is mainly to make a relatively precise and complete robot to rotate and emit certain sound at the same time, but the measures are not suitable for long-time work, have high energy consumption and are easy to damage. The circuit sound scaring is used for enabling the loudspeaker to emit audio by utilizing the power supply of the electronic circuit and the solar energy, so that birds are repelled, but noise caused by long-term sound production can bring certain influence on life of residents nearby farmlands.
Disclosure of Invention
The invention aims to provide a lightweight image detection agricultural bird repelling method and system based on hierarchical regression.
The technical solution for realizing the purpose of the invention is as follows: a lightweight image detection agricultural bird repelling method based on hierarchical regression comprises the following steps:
step 1, establishing a hierarchical regression target detection model ScareDet based on a convolutional neural network, training on a bird data set by using a gradient descent algorithm, and storing the trained model into a raspberry group;
step 2, shooting an image in a designated area by using a zoom camera, and transmitting image data to a raspberry group through a USB interface;
step 3, bird detection is carried out by utilizing a ScareDet detection model stored in the raspberry group and image data;
and 4, controlling the loudspeaker to supply power according to the raspberry group detection result, if birds are detected to exist, supplying power to the loudspeaker, sending alarm noise by the loudspeaker to drive the birds, and otherwise, returning to the step 2 to continue monitoring.
In step 1, the established hierarchical regression target detection model ScareDet based on the convolutional neural network has the following detection process:
step 11: utilizing a convolution neural network to carry out feature extraction on the image and carry out 1-time down-sampling to obtain an image feature map C1Then to C1Continue to sample for 3 times to obtain C2,C3,C4Then in the feature maps of the four different scales { C }1,C2,C3,C4Respectively extracting image areas by using anchor frames with fixed sizes and length-width ratios, classifying and screening the anchor frames by using a foreground and background two-classification focus loss function, and correcting the sizes and coordinates of the anchor frames by using a regression loss function Smooth L1 to obtain a series of pre-selection frames with more accurate positions;
step 12: for the four feature maps { C ] of step 111,C2,C3,C4Making two groups of convolution of 3 x 3, further abstracting image characteristics to obtain characteristic diagram { C }1',C2',C3',C4' and sequentially adding each feature map to each feature map behind the feature map according to the sequence from left to right to realize the complementation and fusion of image detail features and semantic features, and finally obtaining four new feature maps { P }1',P2',P3',P4'};
Step 13: firstly, the feature map { P ] output in step 12 is compared1',P2',P3',P4' make a set of 3 × 3 convolutions to obtain a feature map P11',P22',P33',P44' } then pair { P11',P22',P33',P44'carry on global average pooling, full connection layer connection, ReLU activation function nonlinearity, full connection layer connection and Sigmoid activation function weight value prediction to each feature map in' } get the first weight value w1, for { P11',P22',P33',P44'carry on the biggest pooling of the whole situation, connect the layer of the complete connection, ReLU activation function nonlinearity, connect the layer of the complete connection and predict with the activation function weight value of Sigmoid in every feature map in' }, get the second weight value w2, add and average these two part weight values and get the final weight value, the most important is thatThen will { P11',P22',P33',P44' } each feature map gets the weighted value corresponding to { P }11',P22',P33',P44' multiplication of the corresponding characteristic maps, and output of the characteristic map P of the second stage1,P2,P3,P4};
Step 14: feature map P according to the second stage1,P2,P3,P4And (4) combining the preselection frame corrected in the step (11) with a focus loss classification function and a Smooth L1 regression loss function to perform classification and coordinate regression training of the preselection frame region, and further optimizing recognition and detection accuracy.
In the step 2, a data standardization process is also included, and the specific method is as follows:
the raspberry sends and reads internal clock time, an image within the time of 7:00-18:00 is read by using an immead function in an OpenCV (open circuit vehicle) library, and the image is scaled to 256 x 256 by using a resize function and stored in a memory; and adjusting the brightness and exposure of the image in 18:00-7:00 time by using an addWeighted function before resize.
In the step 3, the raspberry group uses the stored ScareDet detection model and image data to detect birds, if birds exist in the picture, the model outputs coordinates and category labels '1' of the birds, meanwhile, a mark bit is arranged higher in the raspberry group to represent that the birds are detected, and otherwise, the mark bit is low to represent that the birds are not detected.
And 4, controlling a loudspeaker to supply power according to the zone bit of the raspberry group, controlling the loudspeaker to be electrified to alarm and interfere and repel birds if the zone bit is high, otherwise, performing no treatment, and returning to the step 2 to continue monitoring.
A lightweight image detection agricultural bird repelling system based on hierarchical regression comprises:
the model training module is used for establishing a hierarchical regression target detection model ScareDet based on a convolutional neural network, training on the bird data set by using a gradient descent algorithm, and storing the trained model into a raspberry group;
the image acquisition module is used for shooting images in a designated area by using the zoom camera and transmitting image data to the raspberry pi through the USB interface;
the bird detection module is used for detecting birds by utilizing the ScareDet detection model and the image data stored in the raspberry group;
the bird repelling module is used for controlling the loudspeaker to supply power according to the raspberry sending detection result, if birds exist in the detection, the loudspeaker is powered, the loudspeaker sends alarm noise to repel the birds, and otherwise, the monitoring is continued by the image acquisition module and the bird detection module.
In the model training module, the detection process of the hierarchical regression target detection model ScareDet based on the convolutional neural network is as follows:
step 11: utilizing a convolution neural network to carry out feature extraction on the image and carry out 1-time down-sampling to obtain an image feature map C1Then to C1Continue to sample for 3 times to obtain C2,C3,C4Then in the feature maps of the four different scales { C }1,C2,C3,C4Respectively extracting image areas by using anchor frames with fixed sizes and length-width ratios, classifying and screening the anchor frames by using a foreground and background two-classification focus loss function, and correcting the sizes and coordinates of the anchor frames by using a regression loss function Smooth L1 to obtain a series of pre-selection frames with more accurate positions;
step 12: for the four feature maps { C ] of step 111,C2,C3,C4Making two groups of convolution of 3 x 3, further abstracting image characteristics to obtain characteristic diagram { C }1',C2',C3',C4' and sequentially adding each feature map to each feature map behind the feature map according to the sequence from left to right to realize the complementation and fusion of image detail features and semantic features, and finally obtaining four new feature maps { P }1',P2',P3',P4'};
Step 13: firstly, the feature map { P ] output in step 12 is compared1',P2',P3',P4' make a set of 3 × 3 convolutions to obtain a feature map P11',P22',P33',P44' } then pair { P11',P22',P33',P44'carry on global average pooling, full connection layer connection, ReLU activation function nonlinearity, full connection layer connection and Sigmoid activation function weight value prediction to each feature map in' } get the first weight value w1, for { P11',P22',P33',P44'carry on the biggest pooling of the whole situation, connect the layer of the full connection, ReLU activation function is nonlinear, connect the layer of the full connection and predict with the activation function weight value of Sigmoid in each characteristic map in' }, get the second weight value w2, add and average these two part weight values and get the final weight value, will { P in the end11',P22',P33',P44' } each feature map gets the weighted value corresponding to { P }11',P22',P33',P44' multiplication of the corresponding characteristic maps, and output of the characteristic map P of the second stage1,P2,P3,P4};
Step 14: feature map P according to the second stage1,P2,P3,P4And (4) combining the preselection frame corrected in the step (11) with a focus loss classification function and a Smooth L1 regression loss function to perform classification and coordinate regression training of the preselection frame region, and further optimizing recognition and detection accuracy.
In the image acquisition module, data standardization operation is also performed, and the specific method comprises the following steps:
the raspberry sends and reads internal clock time, an image within the time of 7:00-18:00 is read by using an immead function in an OpenCV (open circuit vehicle) library, and the image is scaled to 256 x 256 by using a resize function and stored in a memory; and adjusting the brightness and exposure of the image in 18:00-7:00 time by using an addWeighted function before resize.
In the bird detection module, the raspberry group utilizes the stored ScareDet detection model and image data to carry out bird detection, if birds exist in the picture, the model can output coordinates and category labels '1' of the birds, meanwhile, a higher mark position can be arranged inside the raspberry group to represent that the birds are detected, and otherwise, the mark position is low to represent that the birds are not detected.
In the bird repelling module, the loudspeaker is controlled to supply power according to the zone bit of the raspberry group, if the zone bit is high, the loudspeaker is controlled to be electrified to alarm and interfere, birds are repelled, otherwise, the image acquisition module and the bird detection module continue to monitor the birds without any processing.
Compared with the prior art, the invention has the remarkable advantages that: 1) the image detection is adopted, the use is flexible and convenient, the weather is all-weather, and the anti-interference performance is strong; 2) bird target identification and detection are carried out by utilizing the customized lightweight detection model, so that the control is convenient, the detection speed and the detection precision are high, and the system robustness is good; 3) only send out the police dispatch newspaper when having detected birds, realize energy saving, the noise reduction is to near resident's influence.
Drawings
FIG. 1 is a flow chart of the method for detecting agricultural bird repellence based on hierarchical regression.
Fig. 2 is a structural diagram of a detection model ScareDet designed by the present invention.
Detailed Description
The invention adopts a photoelectric detection means for birds, and only sends out alarm sound if birds are found in a specified area, thereby realizing all-weather detection and intelligent bird repelling. As shown in fig. 1, the method for detecting agricultural bird repelling based on the lightweight image of hierarchical regression specifically comprises the following steps:
step 1, designing and training a detection model ScareDet
In order to meet the requirement of rapid and accurate detection of embedded equipment, the invention utilizes a hierarchical regression method to carry out efficient and compact transmission on image characteristics, and designs a lightweight ScareDet detection model as shown in FIG. 2.
The ScareDet detection model is inspired by RefineDet, and the specific model framework is as follows:
firstly, a convolution neural network is utilized to carry out feature extraction on an image and carry out 1-time down-sampling to obtain an image feature map C1Then to C1Continue downsampling 3 times (each downsampling feature map size is reduced by 2 times) to obtain C2,C3,C4Then in the four areSame scale feature map { C1,C2,C3,C4Respectively extracting image areas by using anchor frames with fixed sizes and length-width ratios, classifying and screening the anchor frames by using a foreground-background two-classification focus loss function, and correcting the sizes and coordinates of the anchor frames by using a regression loss function Smooth L1 to obtain a series of pre-selected frames with more accurate positions;
then, four feature maps { C }are processed1,C2,C3,C4Making two groups of convolution of 3 x 3, further abstracting image characteristics to obtain characteristic diagram { C }1',C2',C3',C4' and adding each feature map to each feature map behind the feature map in sequence from left to right to realize complementation and fusion of image detail features and semantic features, and finally obtaining four new feature maps { P }1',P2',P3',P4'};
Then for { P1',P2',P3',P4' make a set of 3 × 3 convolutions to obtain a feature map P11',P22',P33',P44' }, then pair { P11',P22',P33',P44' performing Global Average Pooling (GAP) on each feature map in the sequence, performing Full Connected (FC) connection, performing ReLU activation function nonlinearity, performing full Connected layer connection, and Sigmoid activation function weight value prediction to obtain a first weight value w1, performing Global maximum Pooling (Global Max Pooling, GMP), performing full Connected layer connection, performing ReLU activation function nonlinearity, performing full Connected layer connection, and Sigmoid activation function weight value prediction to obtain a second weight value w 2; then adding and averaging the two weight values to obtain the final weight value, and finally, adding the { P to the weight value11',P22',P33',P44' } each feature map gets the weighted value corresponding to { P }11',P22',P33',P44' multiplication of the corresponding characteristic maps, and output of the characteristic map P of the second stage1,P2,P3,P4};
Finally, according to the feature map { P1,P2,P3,P4And (4) dividing and revising the preselection frame, and performing preselection frame area belonging classification (birds or non-birds) and coordinate regression training by combining a focus loss classification function and a Smooth L1 regression loss function to further optimize the recognition and detection accuracy.
And training the model on a training set by utilizing a gradient descent algorithm on the whole model, and continuously updating model parameters until the model error is not descended any more.
The whole model adopts a hierarchical regression structure, and only utilizes the feature map to carry out regression, so that the method is simpler and has the advantage of light weight compared with other existing detection networks which utilize an original image region to carry out judgment and correction for multiple times. Because the classification of the two stages only involves two classifications, and meanwhile, the dominant negative samples (background classes) in the regression preselected region are considered, for the effective learning of the model, a focus loss function is constructed as a classification loss function, and the hard-to-classify samples are mined, wherein the mathematical formula is as follows:
Loss(p,y)=-α(1-p)γy log(p)-(1-α)pγ(1-y) log (1-p) formula (1) wherein p is the probability that the model predicts that the region is a positive sample, y is the true label of the region, and α, γ are regulatory factors.
The regression loss functions of the two stages both adopt Smooth L1 functions, and the specific calculation formula is as follows:
Figure BDA0002628669100000061
wherein x represents regression parameters, and the absolute value of the learning rate of the regression parameters is limited to be 1 when the difference between the initial stage and the true value is too large, so that unstable learning caused by gradient explosion is prevented.
In addition, before the training set is input into the model for carrying out the average value reduction processing on three channels of R, G and B, and the size of the image is scaled to a fixed size so as to reduce the calculation amount.
Step 2, collecting, processing and storing target area images
The method comprises the steps of shooting an image in a designated area by using a zoom camera, sending the RGB image to a raspberry party through a USB serial port, and simultaneously reading internal clock time by the raspberry party. Reading the images within the time of 7:00-18:00 by utilizing an imread function in an OpenCV library, and zooming the images to 256 x 256 by utilizing a resize function and storing the images in a memory; in the 18:00-7:00 time period, because of insufficient illumination, the addWeight function is required to adjust the brightness and exposure of the image before resize.
Step 3, target detection is carried out based on the trained detection model
The raspberry pie reads an image in the memory, if birds exist in the image, the model outputs coordinates and a category label '1' of the birds, meanwhile, a mark position is set to be higher in the raspberry pie to represent that the birds are detected, and otherwise, the mark position is low to represent that the birds are not detected.
Step 4, bird repelling is implemented according to the detection result
And (3) determining whether to supply power to the loudspeaker according to the zone bit in the step (3), if birds are detected, the zone bit is high, so that the loudspeaker can give an alarm to interfere and expel the birds, otherwise, no treatment is carried out, and returning to the step (2) to continue image acquisition and monitoring.
The invention also provides a lightweight image detection agricultural bird repelling system based on hierarchical regression, which comprises the following components:
the model training module is used for establishing a hierarchical regression target detection model ScareDet based on a convolutional neural network, training on the bird data set by using a gradient descent algorithm, and storing the trained model into a raspberry group;
the image acquisition module is used for shooting images in a designated area by using the zoom camera and transmitting image data to the raspberry pi through the USB interface;
the bird detection module is used for detecting birds by utilizing the ScareDet detection model and the image data stored in the raspberry group;
the bird repelling module is used for controlling the loudspeaker to supply power according to the raspberry sending detection result, if birds exist in the detection, the loudspeaker is powered, the loudspeaker sends alarm noise to repel the birds, and otherwise, the monitoring is continued by the image acquisition module and the bird detection module.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A lightweight image detection agricultural bird repelling method based on hierarchical regression is characterized by comprising the following steps:
step 1, establishing a hierarchical regression target detection model ScareDet based on a convolutional neural network, training on a bird data set by using a gradient descent algorithm, and storing the trained model into a raspberry group;
step 2, shooting an image in a designated area by using a zoom camera, and transmitting image data to a raspberry group through a USB interface;
step 3, bird detection is carried out by utilizing a ScareDet detection model stored in the raspberry group and image data;
and 4, controlling the loudspeaker to supply power according to the raspberry group detection result, if birds are detected to exist, supplying power to the loudspeaker, sending alarm noise by the loudspeaker to drive the birds, and otherwise, returning to the step 2 to continue monitoring.
2. The method for detecting agricultural bird repeller by using the lightweight image based on hierarchical regression as claimed in claim 1, wherein in step 1, the detection process of the hierarchical regression target detection model ScareDet based on the convolutional neural network is as follows:
step 11: feature extraction and image processing using convolutional neural networksDown sampling for 1 time to obtain an image feature map C1Then to C1Continue to sample for 3 times to obtain C2,C3,C4Then in the feature maps of the four different scales { C }1,C2,C3,C4Respectively extracting image areas by using anchor frames with fixed sizes and length-width ratios, classifying and screening the anchor frames by using a foreground and background two-classification focus loss function, and correcting the sizes and coordinates of the anchor frames by using a regression loss function Smooth L1 to obtain a series of pre-selection frames with more accurate positions;
step 12: for the four feature maps { C ] of step 111,C2,C3,C4Making two groups of convolution of 3 x 3, further abstracting image characteristics to obtain characteristic diagram { C }1',C2',C3',C4' and sequentially adding each feature map to each feature map behind the feature map according to the sequence from left to right to realize the complementation and fusion of image detail features and semantic features, and finally obtaining four new feature maps { P }1',P2',P3',P4'};
Step 13: firstly, the feature map { P ] output in step 12 is compared1',P2',P3',P4' make a set of 3 × 3 convolutions to obtain a feature map P11',P22',P33',P44' } then pair { P11',P22',P33',P44'carry on global average pooling, full connection layer connection, ReLU activation function nonlinearity, full connection layer connection and Sigmoid activation function weight value prediction to each feature map in' } get the first weight value w1, for { P11',P22',P33',P44'carry on the biggest pooling of the whole situation, connect the layer of the full connection, ReLU activation function is nonlinear, connect the layer of the full connection and predict with the activation function weight value of Sigmoid in each characteristic map in' }, get the second weight value w2, add and average these two part weight values and get the final weight value, will { P in the end11',P22',P33',P44' } each feature map gets the weighted value corresponding to { P }11',P22',P33',P44' }corresponds toMultiplying the feature maps of (1) to output a feature map { P } of the second stage1,P2,P3,P4};
Step 14: feature map P according to the second stage1,P2,P3,P4And (4) combining the preselection frame corrected in the step (11) with a focus loss classification function and a Smooth L1 regression loss function to perform classification and coordinate regression training of the preselection frame region, and further optimizing recognition and detection accuracy.
3. The method for detecting agricultural bird repeller by using lightweight images based on hierarchical regression as claimed in claim 1, wherein step 2 further comprises a data standardization process, and the specific method is as follows:
the raspberry sends and reads internal clock time, an image within the time of 7:00-18:00 is read by using an immead function in an OpenCV (open circuit vehicle) library, and the image is scaled to 256 x 256 by using a resize function and stored in a memory; and adjusting the brightness and exposure of the image in 18:00-7:00 time by using an addWeighted function before resize.
4. The method for detecting agricultural bird repellence by using lightweight images based on hierarchical regression as claimed in claim 1, wherein in step 3, the raspberry pi uses the stored ScareDet detection model and image data to detect birds, if birds exist in the image, the model outputs coordinates and class labels "1" of the birds, meanwhile, a flag bit is set higher inside the raspberry pi to represent that the birds are detected, otherwise, the flag bit is set lower to represent that the birds are not detected.
5. The method for detecting agricultural bird repellence by using the lightweight image based on hierarchical regression as claimed in claim 4, wherein in step 4, the loudspeaker is controlled to supply power according to the zone bit of the raspberry group, if the zone bit is high, the loudspeaker is controlled to be powered on to alarm and interfere, birds are repelled, otherwise, no treatment is performed, and the method returns to step 2 to continue monitoring.
6. The utility model provides a lightweight image detection agricultural bird repellent system based on hierarchical regression which characterized in that includes:
the model training module is used for establishing a hierarchical regression target detection model ScareDet based on a convolutional neural network, training on the bird data set by using a gradient descent algorithm, and storing the trained model into a raspberry group;
the image acquisition module is used for shooting images in a designated area by using the zoom camera and transmitting image data to the raspberry pi through the USB interface;
the bird detection module is used for detecting birds by utilizing the ScareDet detection model and the image data stored in the raspberry group;
the bird repelling module is used for controlling the loudspeaker to supply power according to the raspberry sending detection result, if birds exist in the detection, the loudspeaker is powered, the loudspeaker sends alarm noise to repel the birds, and otherwise, the monitoring is continued by the image acquisition module and the bird detection module.
7. The system for detecting agricultural bird repeller based on hierarchical regression of claim 6, wherein in the model training module, the detection process of the hierarchical regression target detection model ScareDet based on the convolutional neural network is as follows:
step 11: utilizing a convolution neural network to carry out feature extraction on the image and carry out 1-time down-sampling to obtain an image feature map C1Then to C1Continue to sample for 3 times to obtain C2,C3,C4Then in the feature maps of the four different scales { C }1,C2,C3,C4Respectively extracting image areas by using anchor frames with fixed sizes and length-width ratios, classifying and screening the anchor frames by using a foreground and background two-classification focus loss function, and correcting the sizes and coordinates of the anchor frames by using a regression loss function Smooth L1 to obtain a series of pre-selection frames with more accurate positions;
step 12: for the four feature maps { C ] of step 111,C2,C3,C4Making two groups of convolution of 3 x 3, further abstracting image characteristics to obtain characteristic diagram { C }1',C2',C3',C4' and sequentially adding each feature map to each feature map behind the feature map according to the sequence from left to right to realize the complementation and fusion of image detail features and semantic features, and finally obtaining four new feature maps { P }1',P2',P3',P4'};
Step 13: firstly, the feature map { P ] output in step 12 is compared1',P2',P3',P4' make a set of 3 × 3 convolutions to obtain a feature map P11',P22',P33',P44' } then pair { P11',P22',P33',P44'carry on global average pooling, full connection layer connection, ReLU activation function nonlinearity, full connection layer connection and Sigmoid activation function weight value prediction to each feature map in' } get the first weight value w1, for { P11',P22',P33',P44'carry on the biggest pooling of the whole situation, connect the layer of the full connection, ReLU activation function is nonlinear, connect the layer of the full connection and predict with the activation function weight value of Sigmoid in each characteristic map in' }, get the second weight value w2, add and average these two part weight values and get the final weight value, will { P in the end11',P22',P33',P44' } each feature map gets the weighted value corresponding to { P }11',P22',P33',P44' multiplication of the corresponding characteristic maps, and output of the characteristic map P of the second stage1,P2,P3,P4};
Step 14: feature map P according to the second stage1,P2,P3,P4And (4) combining the preselection frame corrected in the step (11) with a focus loss classification function and a Smooth L1 regression loss function to perform classification and coordinate regression training of the preselection frame region, and further optimizing recognition and detection accuracy.
8. The agricultural bird repellent system for lightweight image detection based on hierarchical regression as claimed in claim 6, wherein the image acquisition module further performs data standardization operation, and the specific method is as follows:
the raspberry sends and reads internal clock time, an image within the time of 7:00-18:00 is read by using an immead function in an OpenCV (open circuit vehicle) library, and the image is scaled to 256 x 256 by using a resize function and stored in a memory; and adjusting the brightness and exposure of the image in 18:00-7:00 time by using an addWeighted function before resize.
9. The system for detecting agricultural bird repeller based on hierarchical regression is characterized in that in the bird detection module, the raspberry pi uses the stored ScareDet detection model and image data to detect birds, if birds exist in the picture, the model outputs coordinates and class labels of the birds, meanwhile, a flag bit is set higher inside the raspberry pi to represent that the birds are detected, and otherwise, the flag bit is set lower to represent that the birds are not detected.
10. The agricultural bird repelling system based on hierarchical regression as claimed in claim 9, wherein in the bird repelling module, the speaker is controlled to supply power according to the flag bit of the raspberry pi, if the flag bit is high, the speaker is controlled to be powered on to alarm and interfere, birds are repelled, otherwise, the image acquisition module and the bird detection module continue to monitor the bird repelling system without any treatment.
CN202010804741.0A 2020-08-12 2020-08-12 Lightweight image detection agricultural bird repelling method and system based on hierarchical regression Active CN112115970B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010804741.0A CN112115970B (en) 2020-08-12 2020-08-12 Lightweight image detection agricultural bird repelling method and system based on hierarchical regression

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010804741.0A CN112115970B (en) 2020-08-12 2020-08-12 Lightweight image detection agricultural bird repelling method and system based on hierarchical regression

Publications (2)

Publication Number Publication Date
CN112115970A true CN112115970A (en) 2020-12-22
CN112115970B CN112115970B (en) 2023-03-31

Family

ID=73804905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010804741.0A Active CN112115970B (en) 2020-08-12 2020-08-12 Lightweight image detection agricultural bird repelling method and system based on hierarchical regression

Country Status (1)

Country Link
CN (1) CN112115970B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113435316A (en) * 2021-06-25 2021-09-24 平安国际智慧城市科技股份有限公司 Intelligent bird repelling method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170344808A1 (en) * 2016-05-28 2017-11-30 Samsung Electronics Co., Ltd. System and method for a unified architecture multi-task deep learning machine for object recognition
CN110287849A (en) * 2019-06-20 2019-09-27 北京工业大学 A kind of lightweight depth network image object detection method suitable for raspberry pie
CN110679586A (en) * 2019-09-30 2020-01-14 深圳供电局有限公司 Bird repelling method and system for power transmission network and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170344808A1 (en) * 2016-05-28 2017-11-30 Samsung Electronics Co., Ltd. System and method for a unified architecture multi-task deep learning machine for object recognition
CN110287849A (en) * 2019-06-20 2019-09-27 北京工业大学 A kind of lightweight depth network image object detection method suitable for raspberry pie
CN110679586A (en) * 2019-09-30 2020-01-14 深圳供电局有限公司 Bird repelling method and system for power transmission network and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113435316A (en) * 2021-06-25 2021-09-24 平安国际智慧城市科技股份有限公司 Intelligent bird repelling method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112115970B (en) 2023-03-31

Similar Documents

Publication Publication Date Title
CN109325495B (en) Crop image segmentation system and method based on deep neural network modeling
CN111025969B (en) Wild animal monitoring system and method based on information fusion
CN108154102A (en) A kind of traffic sign recognition method
CN111611889B (en) Miniature insect pest recognition device in farmland based on improved convolutional neural network
KR102002632B1 (en) Fruit monitoring system and method at the same
WO2020103109A1 (en) Map generation method and device, drone and storage medium
Wang et al. Precision detection of dense plums in orchards using the improved YOLOv4 model
CN110992378B (en) Dynamic updating vision tracking aerial photographing method and system based on rotor flying robot
CN115761529B (en) Image processing method and electronic device
CN109101926A (en) Aerial target detection method based on convolutional neural networks
CN111666897A (en) Oplegnathus punctatus individual identification method based on convolutional neural network
Jia et al. A fast and efficient green apple object detection model based on Foveabox
CN111401215A (en) Method and system for detecting multi-class targets
CN112115970B (en) Lightweight image detection agricultural bird repelling method and system based on hierarchical regression
CN112435257A (en) Smoke detection method and system based on multispectral imaging
CN110097047A (en) A kind of vehicle checking method using single line laser radar based on deep learning
CN112613438A (en) Portable online citrus yield measuring instrument
CN112597919A (en) Real-time medicine box detection method based on YOLOv3 pruning network and embedded development board
CN115713546A (en) Lightweight target tracking algorithm for mobile terminal equipment
CN115376125A (en) Target detection method based on multi-modal data fusion and in-vivo fruit picking method based on target detection model
CN114359578A (en) Application method and system of pest and disease damage identification intelligent terminal
CN111354016A (en) Unmanned aerial vehicle ship tracking method and system based on deep learning and difference value hashing
CN113128308A (en) Pedestrian detection method, device, equipment and medium in port scene
CN113936019A (en) Method for estimating field crop yield based on convolutional neural network technology
Wei et al. Small sample and efficient crop pest recognition method based on transfer learning and data transformation

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