MENU

Fun & Interesting

How to Train DETR Object Detection Transformer on Custom Dataset

Roboflow 33,612 2 years ago
Video Not Working? Fix It Now

In this tutorial, we'll show you how to train Object Detection Transformers using DETR as an example. We'll guide you through every step of the process, starting with setting up your Python environment and demonstrating DETR model inference on example images. Next, we'll show you how to download custom datasets from Roboflow Universe and build custom PyTorch COCO Detection datasets. We'll also cover how to visualize COCO dataset entries and build custom PyTorch data loaders. At the core of this tutorial, we'll demonstrate how to build a custom PyTorch Lightning DETR module for training your own object detection model. We'll then guide you through training DETR on your custom dataset, followed by custom DETR model inference and evaluation. Chapters: 0:00 Introduction 1:06 Setting up the Python environment 3:19 DETR model inference on example images 8:40 Download custom dataset from Roboflow Universe 10:31 Building custom PyTorch COCO Detection datasets 12:25 Visualising COCO datasets entry 13:15 Building custom PyTorch Data Loaders 15:59 Building custom PyTorch Lightning DETR Module 18:50 Training DETR on custom dataset 20:06 Custom DETR model inference 22:07 Evaluating custom DETR model 22:40 Outro Resources: 🌏 Roboflow: https://roboflow.com 🌌 Roboflow Universe: https://universe.roboflow.com 🗒️ How to Train DETR with 🤗 Transformers on a Custom Dataset notebook: https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/train-huggingface-detr-on-custom-dataset.ipynb 🤗 Transformers DETR documentation: https://huggingface.co/docs/transformers/model_doc/detr 🎬 Exploring The COCO Dataset YouTube video: https://youtu.be/B4gNml3V2cc ⌛ PyTorch Data Loader documentation: https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader ⚡PyTorch Lightning Module documentation: https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_module.html Stay updated with the projects I'm working on at https://github.com/roboflow and https://github.com/SkalskiP! ⭐

Comment