With burn, This DINOv3 crate is a RIIR of facebookresearch/dinov3's python project.
Usage
Download pretrained model from facebookresearch/dinov3.
Loaded pretrained model:
use ;
use ;
use ;
And got:
┌─ Tensor Loading Summary ─────────────────────────
│
│ ✓ Successfully applied: 188 tensors
│ ⊘ Skipped (filtered): 0 tensors
│ ✗ Missing in source: 0 tensors
│ ? Unused in target: 0 tensors
│ ! Errors: 0 errors
│
└───────────────────────────────────────────────────
[src/main.rs:24:5] dino.forward(Tensor::zeros([1, 3, 256, 256], &device), None) = Tensor {
primitive: Float(
{ id: TensorId { value: 1289 }, shape: Shape { dims: [1, 261, 384] }, device: Cuda(0) },
),
}
Do not forget image-transforms in practice.
Others
There's no test for now, only all tensor loaded and just seems working.
The API will be changed as I like, no sem ver guarentee (although there is likely no big change).
If I found any version is not correct, I'll simply yank it.