We propose DiffusionDet, a new framework that formulates object detection asa denoising diffusion process from noisy boxes to object boxes. During trainingstage, object boxes diffuse from ground-truth boxes to random distribution, andthe model learns to reverse this noising process. In inference, the modelrefines a set of randomly generated boxes to the output results in aprogressive way. The extensive evaluations on the standard benchmarks,including MS-COCO and LVIS, show that DiffusionDet achieves favorableperformance compared to previous well-established detectors. Our work bringstwo important findings in object detection. First, random boxes, althoughdrastically different from pre-defined anchors or learned queries, are alsoeffective object candidates. Second, object detection, one of therepresentative perception tasks, can be solved by a generative way. Our code isavailable at https://github.com/ShoufaChen/DiffusionDet.