RF-DETR Large for Minecraft mobs
Fly-throughs of twelve places the model never saw during training. Left: the game's true boxes. Right: the model's boxes.
Object detector for Minecraft Java 1.21.11. It detects all 88 classes (87 mobs and the player). It is the baseline model for the Minecraft Mobs dataset.
- Training code and method: minecraft-mob-dataset. The same repository can generate your own dataset.
Results
Scores on the test split: 5,583 pictures from places not used in training.
| mAP50-95 | mAP50 | mobs found at score 0.5 | found but wrong class |
|---|---|---|---|
| 0.602 | 0.741 | 73 % | 5 % |
mAP50-95 by condition:
| condition | mAP50-95 |
|---|---|
| mob closer than 8 blocks | 0.78 |
| mob further than 128 blocks | 0.12 |
| box taller than 128 pixels | 0.84 |
| box 8 pixels tall or less | 0.06 |
| caves | 0.74 |
| under water | 0.48 |
| aerial views | 0.33 |
- Size has the largest effect on the score.
- Time of day and weather change the score by less than 0.04.
- Best classes: magma cube 0.87, ender dragon 0.86, ghast 0.84.
- Weakest classes:
- Small water mobs with few labels: tropical fish 0.14, pufferfish 0.25, tadpole 0.29.
- Mobs that look like other mobs: creaking 0.32, wither skeleton 0.39.
Scores per class, distance, size and place are in the baseline notebook.
Use
import json
from huggingface_hub import hf_hub_download
from rfdetr import RFDETRLarge
repo = "OlleOltorp/rfdetr-minecraft-mobs"
model = RFDETRLarge(pretrain_weights=hf_hub_download(repo, "checkpoint_best_total.pth"))
names = json.load(open(hf_hub_download(repo, "classes.json")))
detections = model.predict("picture.png", threshold=0.5)
print([names[c] for c in detections.class_id])
model.predict resizes the picture to a square. The model was trained on 16:9 pictures at
1248×704. To get the scores above, use mobdataset.model.infer.predict from the GitHub repo,
which keeps the 16:9 shape.
Training
| setting | value |
|---|---|
| starting weights | RF-DETR Large, COCO |
| data | train split, 39,158 pictures |
| epochs | 10 |
| batch size | 16 |
| learning rate | 1e-4, quarter-epoch warm-up, cosine decay |
| seed | 0 |
| hardware | one RTX 4070, about 50 minutes per epoch |
The settings and the command to repeat the run are in the GitHub repo under
baselines/rf-detr/.
Limits
- Trained on vanilla graphics only. Shader packs and resource packs are not covered.
- Trained on Java 1.21.11 mobs. Later versions may change how mobs look.
- Far and very small mobs are often missed.
Citation
@misc{oltorp2026rfdetrminecraftmobs,
author = {Olle Oltorp},
title = {RF-DETR Large for Minecraft mobs},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/OlleOltorp/rfdetr-minecraft-mobs}
}
Licence
The weights are licensed CC BY-NC 4.0. Minecraft is a trademark of Mojang. This model is not affiliated with or endorsed by Mojang or Microsoft.