Dynamic neural network is an emerging research topic in deep learning. With adaptive inference, dynamic models can achieve remarkable accuracy and computational efficiency. However, it is challenging to design a powerful dynamic detector, because of no suitable dynamic architecture and exiting criterion for object detection. To tackle these difficulties, we propose a dynamic framework for object detection, named DynamicDet. Firstly, we carefully design a dynamic architecture based on the nature of the object detection task. Then, we propose an adaptive router to analyze the multi-scale information and to decide the inference route automatically. We also present a novel optimization strategy with an exiting criterion based on the detection losses for our dynamic detectors. Last, we present a variable-speed inference strategy, which helps to realize a wide range of accuracy-speed trade-offs with only one dynamic detector. Extensive experiments conducted on the COCO benchmark demonstrate that the proposed DynamicDet achieves new state-of-the-art accuracy-speed trade-offs. For instance, with comparable accuracy, the inference speed of our dynamic detector Dy-YOLOv7-W6 surpasses YOLOv7-E6 by 12%, YOLOv7-D6 by 17%, and YOLOv7-E6E by 39%. The code is available at https://github.com/VDIGPKU/DynamicDet.
翻译:动态神经网络是深度学习中的一个新兴研究课题。通过自适应推断,动态模型可以实现卓越的准确性和计算效率。然而,设计一个强大的动态检测器是具有挑战性的,因为目前不存在适合目标检测的动态架构和退出标准。为了解决这些困难,我们提出了一种用于目标检测的动态框架DynamicDet。首先,我们根据目标检测任务的特性仔细设计了一个动态架构。然后,我们提出了一种自适应路由器,用于分析多尺度信息并自动决定推断路线。我们还提出了一种新颖的优化策略,具有基于检测损失的退出标准,适用于我们的动态检测器。最后,我们提出了一种可变速推断策略,帮助实现一种广泛的准确度-速度折衷,只需要一个动态检测器。在COCO基准测试上进行的广泛实验表明,我们提出的DynamicDet实现了新的准确度-速度折衷的最新技术水平。例如,与具有可比准确度的情况下,我们的动态检测器Dy-YOLOv7-W6比YOLOv7-E6快12%,比YOLOv7-D6快17%,比YOLOv7-E6E快39%。代码可在https://github.com/VDIGPKU/DynamicDet上获得。