Facebook DETR | ML Coding Series | End to end object detection with transformers @TheAIEpiphany
Facebook DETR | ML Coding Series | End to end object detection with transformers  @TheAIEpiphany
Uploaded June 2022 | Updated September 2026, 1 week ago
❀️ Become The AI Epiphany Patreon ❀️
patreon.com/theaiepiphany

πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Join our Discord community πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦
discord.gg/peBrCpheKE

The second video in the ML coding series! The longest video I ever made!

In this video I do a code walkthrough of Facebook's DETR model from the "End-to-End Object Detection with Transformers" paper.

Let me know what you'd like me to cover next!

β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬
βœ… DETR GitHub: github.com/facebookresearch/detr
βœ… DETR Paper: arxiv.org/abs/2005.12872
βœ… Mini COCO: github.com/giddyyupp/coco-minitrain
I edited the download/sampling scripts and ended up downloading a valid dataset that has only 100 images.
β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬

⌚️ Timetable:
00:00:00 DETR model recap
00:07:30 DETR demo notebook
00:18:55 Visualizing attention notebook
00:29:50 Visualizing encoder attention
00:36:45 Going through the training script
00:38:45 Backbone construction
00:42:05 DETR construction
00:54:00 Data loading and nested tensors
01:02:30 Forward pass through ResNet backbone
01:09:00 Forward pass through the transformer
01:22:00 Hungarian matching algorithm
01:32:50 Loss calculation
01:40:50 Outro

β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬
πŸ’° BECOME A PATREON OF THE AI EPIPHANY ❀️

If these videos, GitHub projects, and blogs help you,
consider helping me out by supporting me on Patreon!

The AI Epiphany - patreon.com/theaiepiphany
One-time donation - paypal.com/paypalme/theaiepiphany

Huge thank you to these AI Epiphany patreons:
Eli Mahler
Petar VeličkoviΔ‡

β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬

πŸ’Ό LinkedIn - linkedin.com/in/aleksagordic
🐦 Twitter - twitter.com/gordic_aleksa
πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Discord - discord.gg/peBrCpheKE

πŸ“Ί YouTube - youtube.com/c/TheAIEpiphany
πŸ“š Medium - gordicaleksa.medium.com
πŸ’» GitHub - github.com/gordicaleksa
πŸ“’ AI Newsletter - aiepiphany.substack.com

β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬

#detr #transformers #coding
Facebook DETR | ML Coding Series | End to end object detection with transformersUltimate Guide to Diffusion Models | ML Coding Series | Denoising Diffusion Probabilistic ModelsDay 2: Replicating Metas NLLB - primary & mined data (Pt. 3)Day 11: Open NLLB - FSDP, on-boarding as a new-joiner (Pt 3.)Neural Search with Jina AI | Open-source ML Tool ExplainedJarvis for Images! (demo) - run locally, no external APIsUnderstanding over-squashing and bottlenecks on graphs via curvature | Ricci Flow | Paper Explained
Aleksa Gordić - The AI Epiphany |

Facebook DETR | ML Coding Series | End to end object detection with transformers

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER