Detectron2 and torchscript support, attention and panoptic notebooks, code improvements
LatestThis release contains several improvements compared to the initial release of DETR.
Highlights
Detectron2 support
DETR now can be used with Detectron2 in a seamless way. It reuses the original abstractions of DETR, while making a compatibility layer so that it fits Detectron2's API. More information can be found in the README under the d2/
folder
TorchScript support for all models
DETR models can now be natively exported to torchscript. This enables DETR to be run in C++ via libtorch. Converting a model to torchscript is easy:
model = torch.hub.load('facebookresearch/detr', 'detr_resnet50', pretrained=True)
model = torch.jit.script(model)
# now the model run entirely in torchscript!
Notebooks for panoptic segmentation and attention visualization
We added two new notebooks in the repo, which should hopefully facilitate using and understanding how DETR works:
- DETR's hands on Colab Notebook: Shows how to load a model from hub, generate predictions, then visualize the attention of the model (similar to the figures of the paper)
- Panoptic Colab Notebook: Demonstrates how to use DETR for panoptic segmentation and plot the predictions.
Training logs for all models
For easier reproducibility, we provide full training logs for the detection models available in torchhub. They are available together with the model weights in https://github.com/facebookresearch/detr#model-zoo
Changelog
New features
- Add Detectron2 wrapper (#103, #119)
- Add torchscript support for hub detection models (#51)
- Add torchscript support to panoptic models (#87)
- Hub config for panoptic models (#54)
- Add Dockerfile (#26)
- Add model logs to README (#86)
Improvements
- avoid downloading the same file multiple times (#60)
- improve robustness of plot_logs function, handle single directory argument for 'logs' param (#62)
- Move colab to github from drive (#5)
- Unifying the format of argparse (#24)
Bugfixes
- Hot-fix for panoptic hub-conf (#56)
- Update panoptic model hashes (#18)
- update url (#8)
- fix IndexError (#6)