PyTorch example with CNN-based object detection

Hi guys, I was wondering is there any example or at least pull request in progress regarding a PyTorch example with CNN-based object detection? For instance a short enough code on the COCO detection dataset? I looked in the examples on GitHub but at least I couldn’t find anything similar.

Any help is greatly appreciated,


There was a pending PR in that implemented a Faster R-CNN object detector in PyTorch, but I never finished testing it. Since then, several implementations were done, to cite a few:

Hi @fmassa,
Thanks for the great references.
Is there an intent to release any unified pytorch API/project for object detection ?

This is done recently by tensorflow (
This kind of API can help reasearchers to easily :

  • switch between meta-architectures (SSD/Faster-RCNN) and base architectures (Resnet/Inception/…)
  • test training tricks such as hard-negatives mining
  • many other tweaks relevant for object detection

@YossiB yes, it would definitely be valuable. A couple of years ago I released exactly the same thing for lua torch. Unfortunately, I don’t think I will have time anytime soon to do something similar now for pytorch, but one can definitely get lots of inspiration from the tensorflow implementation of object detection, which would make the task of implementing it simpler.


citing few more (prolly some better too)


Below one is Python3


Best place to check for more or other pytorch models would be soumith’s starred repos :stuck_out_tongue:




Hijacking the thread : is anyone aware of a pytorch implementation , or an easy way to port to pytorch the models in ?

1 Like


I started working on that. Check here

1 Like

@ignacio-rocco Very cool, thanks for letting me know!