  Accurate drone detection is strongly desired in drone collision avoidance,
drone defense and autonomous Unmanned Aerial Vehicle (UAV) self-landing. With
the recent emergence of the Vision Transformer (ViT), this critical task is
reassessed in this paper using a UAV dataset composed of 1359 drone photos. We
construct various CNN and ViT-based models, demonstrating that for single-drone
detection, a basic ViT can achieve performance 4.6 times more robust than our
best CNN-based transfer learning models. By implementing the state-of-the-art
You Only Look Once (YOLO v7, 200 epochs) and the experimental ViT-based You
Only Look At One Sequence (YOLOS, 20 epochs) in multi-drone detection, we
attain impressive 98% and 96% mAP values, respectively. We find that ViT
outperforms CNN at the same epoch, but also requires more training data,
computational power, and sophisticated, performance-oriented designs to fully
surpass the capabilities of cutting-edge CNN detectors. We summarize the
distinct characteristics of ViT and CNN models to aid future researchers in
developing more efficient deep learning models.
