The Inner Mongolia Autonomous Region is rich in grassland resources,but the grassland resources have been degraded significantly in recent years.Overgrazing is one of the main causes of grassland desertification.Sheep is one of the most important livestock in Inner Mongolia,but the traditional manual counting method is often used to count the number of sheep,which is difficult and inefficient,and the accuracy of this method is easily affected by the posture of the sheep and the subjective factors of people.The statistical accuracy is unstable.With the continuous development of computer vision technology and deep learning,more and more artificial intelligence methods have effectively improved people’s production and life.The introduction of computer vision technology into the statistics of the actual livestock carrying capacity of the grassland is of great significance and value.This study focuses on the actual grazing flock image of Gegentala grassland in Inner Mongolia collected by DJI drone.Considering that the pixel area of sheep in the image taken by drone at high altitude is too small for the pixel area of the entire image,small objects are mainly studied.The object detection algorithm realizes the recognition and counting of sheep.The specific work content is as follows:1.The DJI Phantom 4 drone equipped with a CMOS camera is used to collect images of the grazing sheep in the Gegentala grassland.The collection height is 20 meters,and the collected image pixels are 4000×2250.2.Compare the detection results of Faster R-CNN,YOLO and SSD algorithms based on the convolutional neural network theory on the open source data set PASCAL VOC.Among them,the SSD algorithm has the highest recognition accuracy for small objects,so the SSD algorithm is used as the grassland grazing sheep,the basic algorithm for individual detection of small objects in groups.3.Use Label Img software to make sheep data set.After cutting the grazing images equally,500 sheep sample images are obtained,and each sample image contains multiple sheep objects.4.The head of the sheep is selected as the object area for detection,and the SSD algorithm is improved.(1)Improve the SSD algorithm.First,pruning the deep network that does not participate in small object object detection to reduce the amount of network calculation;rebuilding the feature pyramid for feature enhancement,so that the shallow feature layer can obtain deep semantic information;the spatial channel attention mechanism is introduced to extract key feature information;Use the Focal Loss mechanism to solve the problem of sample imbalance;use the method of merging the images after the image is divided into blocks to detect the optimization in the object detection strategy.(2)The improved SSD algorithm is used for the detection and counting of the grazing sheep on the grassland,and the accuracy rate is increased by four times.In the photos taken by a drone flying at an altitude of 20 meters,the accuracy of counting 160 sheep in a flock of sheep is 92.5%,and the accuracy of counting in a flock of 369 sheep is above88%.The research on the method of identifying and counting individual sheep in the grazing flock based on the drone’s high-altitude shooting angle proposed in this paper is fast and feasible.It can be used to estimate the reasonable stocking capacity of the area and provide data for the balance of grass and livestock stand by. |