Train a DEIM detector on your own labeled images and get its accuracy measured on images it never saw during training.
Overview
- Model: DEIM detector (DEIMv2, a real-time transformer detector) - fine-tuned here from a pre-trained checkpoint you pick
- Task: Object detection
- Input: A labeled image dataset with boxes and classes. No split needed: the template makes one.
- Pipeline: split into train / validation / test -> train -> predict on the test part -> evaluate
- Output: A trained detector registered as a model, a training report, and a full evaluation report on the held-out test part (mAP, AP50, AP75, precision, recall, F1, per-class breakdown, error analysis, prediction previews)
When you need it
You have labeled images and want a DEIM model that knows your classes, with a score you can defend: it comes from a test part that neither the training nor the choice of the best checkpoint ever touched. Use it for a first baseline, or to see what a transformer-based detector gets out of your data before you pick a family. The YOLO and EdgeCrafter templates run the same chain, so the three reports are directly comparable in layout.
What you need
A labeled image dataset in OvalBee, every object boxed and classed. If it is not there yet, bring it in with one of the import templates first. In the setup you pick the dataset and the pre-trained DEIM model to start from. Classes come from the dataset's own labels.
How it works
| Step | What happens |
|---|---|
| Split | Your dataset is divided 70 / 15 / 15 into training, validation and test images (the ratios can be changed) |
| Train | The detector is fine-tuned on the training images; the validation images are scored along the way and the best checkpoint is kept. The template sets 24 epochs and scales the learning-rate and augmentation schedule to that length; if you change the epochs, change the schedule with them |
| Predict | The trained detector runs on the test images only, keeping every box above a low confidence of 0.05 so the evaluation sees the whole score range |
| Evaluate | The predictions are scored against the test labels |
What a run gives you
The trained model, ready to use in other OvalBee templates, and two reports. The training report states what the run was given and what it cost. The evaluation report gives mAP (50:95), AP50, AP75, precision, recall and F1 at an automatically chosen confidence, a per-class table, a breakdown of the kinds of mistakes the model makes, a confusion matrix, a precision-recall curve, a calibration view, and the hardest images next to their labels. It also lists suspected annotation issues.
For scale: on a PCB component dataset (9 classes, about 1,400 images) a 24-epoch run with the template's batch size of 2 took about 25 minutes of training on one GPU and scored mAP 0.78 on its test part. This is one run, with one random split; your dataset will land elsewhere. Do not read that figure against the YOLO or EdgeCrafter templates' figures: each run draws its own split.
The template trains with a batch of 2 images because that fits the shared cloud GPUs: a batch of 8 needs about 15 GB of GPU memory and ran out of memory there, while a batch of 2 needs about 4 GB. On a GPU with more memory you can raise batch_size in the training settings; training then takes fewer steps per epoch and finishes sooner. Batch 8 on the same data and split scored mAP 0.77, so the batch size did not change the result noticeably in this one comparison.
Re-running the graph after new labels arrive repeats the same chain, so runs on successive dataset versions are comparable in method. Two trainings sharing one GPU can run out of memory; run them one after another.
Related templates
- Train YOLO detector - the same chain with a YOLO detector
- Train EdgeCrafter detector - the same chain with an EdgeCrafter detector
- Detector evaluation - score a model you already have against a labeled set
- Detector comparison - compare ready-made detectors without training