| When the drone is identifying and tracking the flock,if the drone flies too low,the accompanying flight noise will frighten the flock and interfere with the normal activities of the flock;if the drone flies too high,it will There are problems such as too small target size in the field of view and difficulty in target recognition.The application of drones in the production management process of grassland animal husbandry to realize automatic grazing by drones can make the management mode of grassland animal husbandry intelligent,improve the level of scientific and technological management,and reduce the human and material costs of grassland herdsmen.This thesis takes the study of UAV adaptive and stable tracking of sheep as an example.First,the UAV can successfully identify the sheep when cruising.At the same time,a scheme is designed to allow the UAV to judge whether the sheep is disturbed or not.The drone automatically adjusts the tracking distance with the flock according to the feedback information,and finally achieves a stable interaction state between the drone and the flock,which is conducive to the follow-up tracking of the drone.In order to realize the adaptive sheep tracking of UAV,the research contents of this thesis are as follows:(1)The detector part of this thesis adopted yolov5 algorithm.Its flexibility and detection speed are very good.Three data enhancement methods,scaling,color space adjustment and mosaic enhancement,improve the detection effect of small targets,and are suitable for the detection of small targets in the field of view frame of UAV.The server training selects the lightest yolov5 s in the model,which not only reduces the deployment cost,but also deploys quickly.The data set is the sheep video taken by Da jiang Yu2 mavic2 pro UAV,the video frame is intercepted with Python code,and it is manually marked to obtain the training data set of in-depth learning,and the weight model is trained in the server.(2)In order to realize adaptive and stable tracking of sheep and deal with the problem that UAV flying noise is easy to scare sheep,the mixed clustering algorithm MSK is combined with mean shift and K-means clustering algorithms.The motion state between UAV and sheep is divided into four categories.Through multi group experimental analysis,the change trend of normalized clustering radius is compared to judge the sheep state.When tracking the sheep,if the sheep are frightened,the UAV will increase the flight altitude to indirectly reduce the noise until the sheep stabilize and stop increasing the flight altitude;Otherwise,keep the tracking state and do not adjust the tracking height.(3)The thesis combined yolov5 and deep sort models which realized stable tracking of sheep.The deep sort tracking algorithm relies on the target detection of yolov5.The deep sort algorithm is developed from the sort algorithm,which adds the use of motion information and appearance information to make the detection effect better.The tracking principle mainly uses Kalman filter to predict the position of the target,and Hungarian algorithm to correlate and match the trajectory of the target.The experimental results show that it can meet the needs of tracking sheep. |