A knowledge distillation method based on detection transformer for farmland obstacle detection
摘要
Reliable and safe obstacle detection is important for unmanned agricultural machinery navigation technology. However, the problem of lack of obstacle datasets still exists, and it is a challenge to collect sufficiently realistic images of agricultural scenes with various types of possible obstacles for the training phase. To address this, an image synthesis method is proposed to alleviate the problem of data scarcity. Meanwhile, Detection Transformer (DETR) is becoming increasingly popular due to its simple framework, but large model sizes and significant time consumption hinder their deployment in edge devices such as unmanned agricultural machinery. Knowledge Distillation (KD) effectively compresses large detectors into small ones, resulting in comparable detection performance and low inference costs. Therefore, a distillation method based on the DETR-like model is proposed, which is lightweight and efficient by transferring the features and predicted outputs from the teacher model to the student model to improve the student network’s feature extraction capability and recognition accuracy. The experimental results show that the proposed model achieves an accuracy of 69.1% Average Precision (AP), 5.4 AP improves compared to the model without distillation, the model is compressed by a factor of 2.18 in terms of the number of parameters. The proposed model still achieves 66.4% AP, higher than the model without distillation by 6.3 AP. The method proposed in this paper is robust and has a generalization ability, which provides a good opportunity for the agricultural field to provide technical support for accurately detecting obstacles in real time.