Detrium 模型库 (Model Zoo)
共索引 24 个 Apache-2.0 预设配置(Recipe)。支持按家族筛选,点击任意行查看训练参数、Hub 源与完整展开 YAML。
| 模型别名 | 家族 | 主干网络 | 输入尺寸 | 默认轮次 / Batch | 优化器 | 蒸馏 / Hub |
|---|---|---|---|---|---|---|
rtv4 | HGNetv2-B0 | 640×640 | 96e / bs 32 | MuAdamW | DINOv3TeacherModel | |
rtv4 | HGNetv2-B2 | 640×640 | 72e / bs 32 | MuAdamW | DINOv3TeacherModel | |
rtv4 | HGNetv2-B4 | 640×640 | 50e / bs 32 | MuAdamW | DINOv3TeacherModel | |
rtv4 | HGNetv2-B5 | 640×640 | 50e / bs 32 | MuAdamW | DINOv3TeacherModel | |
deim | HGNetv2-B0 | 640×640 | 136e / bs 128 | MuAdamW | 无教师 | |
deim | HGNetv2-B0 | 640×640 | 96e / bs 32 | MuAdamW | 无教师 | |
deim | HGNetv2-B2 | 640×640 | 72e / bs 32 | MuAdamW | 无教师 | |
deim | HGNetv2-B4 | 640×640 | 50e / bs 32 | MuAdamW | 无教师 | |
deim | HGNetv2-B5 | 640×640 | 50e / bs 32 | MuAdamW | 无教师 | |
deim | PResNet-18 | 640×640 | 100e / bs 16 | MuAdamW | 无教师 | |
deim | PResNet-34 | 640×640 | 100e / bs 16 | MuAdamW | 无教师 | |
deim | PResNet-50 | 640×640 | 52e / bs 16 | MuAdamW | 无教师 | |
deim | PResNet-50 | 640×640 | 52e / bs 16 | MuAdamW | 无教师 | |
deim | PResNet-101 | 640×640 | 52e / bs 16 | MuAdamW | 无教师 | |
dfine | HGNetv2-B0 | 640×640 | 136e / bs 128 | MuAdamW | 无教师 | |
dfine | HGNetv2-B0 | 640×640 | 112e / bs 32 | MuAdamW | 无教师 | |
dfine | HGNetv2-B2 | 640×640 | 112e / bs 32 | MuAdamW | 无教师 | |
dfine | HGNetv2-B4 | 640×640 | 68e / bs 32 | MuAdamW | 无教师 | |
dfine | HGNetv2-B5 | 640×640 | 68e / bs 32 | MuAdamW | 无教师 | |
rtv2 | PResNet-18 | 640×640 | 100e / bs 16 | MuAdamW | 无教师 | |
rtv2 | PResNet-34 | 640×640 | 100e / bs 16 | MuAdamW | 无教师 | |
rtv2 | PResNet-50 | 640×640 | 60e / bs 16 | MuAdamW | 无教师 | |
rtv2 | PResNet-50 | 640×640 | 72e / bs 16 | MuAdamW | 无教师 | |
rtv2 | PResNet-101 | 640×640 | 60e / bs 16 | MuAdamW | 无教师 |
rtv2-r50m
RTV2 主干网络 PResNet-50 · 默认 72 epochs · 全局 Batch 16 · 优化器 MuAdamW · lr 0.0001
from detrium import Detrium
model = Detrium("rtv2-r50m")
metrics = model.train(data="custom.yaml", epochs=72, batch=16, imgsz=640, device="0,1")
results = model.predict("images/", conf=0.25, save=True)
model.export(format="onnx", imgsz=640, dynamic=True)展开完整合并后 YAML 配置(rtv2/rtv2_r50vd_m_7x_coco.yml)
task: detection
evaluator:
type: CocoEvaluator
iou_types:
- bbox
num_classes: 80
remap_mscoco_category: true
train_dataloader:
type: DataLoader
dataset:
type: CocoDetection
img_folder: ./dataset/coco/train2017/
ann_file: ./dataset/coco/annotations/instances_train2017.json
return_masks: false
transforms:
type: Compose
ops:
- type: RandomPhotometricDistort
p: 0.5
- type: RandomZoomOut
fill: 0
- type: RandomIoUCrop
p: 0.8
- type: SanitizeBoundingBoxes
min_size: 1
- type: RandomHorizontalFlip
- type: Resize
size:
- 640
- 640
- type: SanitizeBoundingBoxes
min_size: 1
- type: ConvertPILImage
dtype: float32
scale: true
- type: ConvertBoxes
fmt: cxcywh
normalize: true
policy:
name: stop_epoch
epoch: 69
ops:
- Mosaic
- RandomPhotometricDistort
- RandomZoomOut
- RandomIoUCrop
shuffle: true
num_workers: 8
pin_memory: true
drop_last: true
collate_fn:
type: BatchImageCollateFunction
base_size: 640
base_size_repeat: 3
stop_epoch: 69
total_batch_size: 16
val_dataloader:
type: DataLoader
dataset:
type: CocoDetection
img_folder: ./dataset/coco/val2017/
ann_file: ./dataset/coco/annotations/instances_val2017.json
return_masks: false
transforms:
type: Compose
ops:
- type: Resize
size:
- 640
- 640
- type: ConvertPILImage
dtype: float32
scale: true
shuffle: false
num_workers: 8
pin_memory: true
drop_last: false
collate_fn:
type: BatchImageCollateFunction
total_batch_size: 64
print_freq: 100
output_dir: ./outputs/rtv2_r50vd_m_7x_coco
checkpoint_freq: 4
sync_bn: true
bn_ema_sync_interval: 1
bn_momentum: null
precise_bn: null
precise_bn_batches: 64
find_unused_parameters: false
use_amp: true
scaler:
type: GradScaler
enabled: true
use_ema: true
ema:
type: ModelEMA
decay: 0.9999
warmups: 2000
start: 0
cuda_ops:
mode: auto
ops:
ms_deform_attn_v2: true
epochs: 72
clip_max_norm: 0.1
optimizer:
type: MuAdamW
include_backbone: false
muon_ratio: 1.0
momentum: 0.95
nesterov: true
ns_steps: 5
ns_scale: 0.2
params:
- params: ^(?=.*backbone)(?!.*norm).*$
lr: 1.0e-05
- params: ^(?=.*(?:encoder|decoder))(?=.*(?:norm|bn)).*$
weight_decay: 0.0
lr: 0.0001
betas:
- 0.9
- 0.999
weight_decay: 0.0001
lr_scheduler:
type: MultiStepLR
milestones:
- 1000
gamma: 0.1
lr_warmup_scheduler:
type: LinearWarmup
warmup_duration: 2000
model: RTv4
criterion: RTv4Criterion
postprocessor: PostProcessor
use_focal_loss: true
eval_spatial_size:
- 640
- 640
RTv4:
backbone: PResNet
encoder: HybridEncoder
decoder: RTDETRTransformerv2
lr_scheduler_type: flatcosine
lr_gamma: 1
warmup_iter: 2000
flat_epoch: 4000000
no_aug_epoch: 0
PResNet:
depth: 50
variant: d
freeze_at: 0
return_idx:
- 1
- 2
- 3
num_stages: 4
freeze_norm: true
pretrained: true
local_model_dir: pretrain/INK1k/
HybridEncoder:
in_channels:
- 512
- 1024
- 2048
feat_strides:
- 8
- 16
- 32
hidden_dim: 256
use_encoder_idx:
- 2
num_encoder_layers: 1
nhead: 8
dim_feedforward: 1024
dropout: 0.0
enc_act: gelu
expansion: 0.5
depth_mult: 1
act: silu
version: rt_detrv2
RTDETRTransformerv2:
feat_channels:
- 256
- 256
- 256
feat_strides:
- 8
- 16
- 32
hidden_dim: 256
num_levels: 3
num_layers: 6
num_queries: 300
num_denoising: 100
label_noise_ratio: 0.5
box_noise_scale: 1.0
eval_idx: 2
num_points:
- 4
- 4
- 4
cross_attn_method: default
query_select_method: default
PostProcessor:
num_top_queries: 300
RTv4Criterion:
weight_dict:
loss_vfl: 1
loss_bbox: 5
loss_giou: 2
losses:
- vfl
- boxes
alpha: 0.75
gamma: 2.0
use_uni_set: false
matcher:
type: GPUAuctionMatcher
weight_dict:
cost_class: 2
cost_bbox: 5
cost_giou: 2
alpha: 0.25
gamma: 2.0
auction_rounds: 12
auction_eps: 0.015
greedy_passes: 2
disp_passes: 4