update
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +2 -0
- Qwen-Image-vae-2d/config.json +57 -0
- Qwen-Image-vae-2d/diffusion_pytorch_model.safetensors +3 -0
- VOSR_0.5B_ms/args.json +26 -0
- VOSR_0.5B_ms/checkpoints/ema_model.safetensors +3 -0
- VOSR_0.5B_os/args.json +30 -0
- VOSR_0.5B_os/checkpoints/ema_model.safetensors +3 -0
- VOSR_1.4B_ms/args.json +26 -0
- VOSR_1.4B_ms/checkpoints/ema_model.safetensors +3 -0
- VOSR_1.4B_os/args.json +30 -0
- VOSR_1.4B_os/checkpoints/ema_model.safetensors +3 -0
- sd21_lwdecoder.pth +3 -0
- stable-diffusion-2-1-base/vae/config.json +29 -0
- stable-diffusion-2-1-base/vae/diffusion_pytorch_model.bin +3 -0
- stable-diffusion-2-1-base/vae/diffusion_pytorch_model.fp16.bin +3 -0
- stable-diffusion-2-1-base/vae/diffusion_pytorch_model.fp16.safetensors +3 -0
- stable-diffusion-2-1-base/vae/diffusion_pytorch_model.safetensors +3 -0
- torch_cache/checkpoints/LPIPS_v0.1_alex-df73285e.pth +3 -0
- torch_cache/checkpoints/alexnet-owt-7be5be79.pth +3 -0
- torch_cache/checkpoints/dinov2_vitb14_pretrain.pth +3 -0
- torch_cache/checkpoints/dinov2_vitl14_pretrain.pth +3 -0
- torch_cache/checkpoints/musiq_koniq_ckpt-e95806b9.pth +3 -0
- torch_cache/facebookresearch_dinov2_main/.github/workflows/lint.yaml +38 -0
- torch_cache/facebookresearch_dinov2_main/.gitignore +11 -0
- torch_cache/facebookresearch_dinov2_main/CODE_OF_CONDUCT.md +80 -0
- torch_cache/facebookresearch_dinov2_main/CONTRIBUTING.md +31 -0
- torch_cache/facebookresearch_dinov2_main/LICENSE +203 -0
- torch_cache/facebookresearch_dinov2_main/LICENSE_CELL_DINO_CODE +395 -0
- torch_cache/facebookresearch_dinov2_main/LICENSE_CELL_DINO_MODELS +124 -0
- torch_cache/facebookresearch_dinov2_main/LICENSE_XRAY_DINO_MODEL +39 -0
- torch_cache/facebookresearch_dinov2_main/MODEL_CARD.md +272 -0
- torch_cache/facebookresearch_dinov2_main/README.md +757 -0
- torch_cache/facebookresearch_dinov2_main/__pycache__/hubconf.cpython-310.pyc +0 -0
- torch_cache/facebookresearch_dinov2_main/conda-extras.yaml +24 -0
- torch_cache/facebookresearch_dinov2_main/conda.yaml +22 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/__init__.py +6 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/__pycache__/__init__.cpython-310.pyc +0 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/__init__.py +22 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/cell_dino/vitl16_channel_adaptive_pretrain.yaml +35 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/cell_dino/vitl16_pretrain.yaml +14 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitb14_pretrain.yaml +6 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitb14_reg4_pretrain.yaml +9 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitg14_pretrain.yaml +7 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitg14_reg4_pretrain.yaml +10 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitl14_pretrain.yaml +6 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitl14_reg4_pretrain.yaml +9 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vits14_pretrain.yaml +6 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vits14_reg4_pretrain.yaml +9 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/ssl_default_config.yaml +123 -0
- torch_cache/facebookresearch_dinov2_main/dinov2/configs/train/cell_dino/vitl16_boc_hpafov.yaml +31 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
torch_cache/facebookresearch_dinov2_main/docs/Cell-DINO.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
torch_cache/facebookresearch_dinov2_main/docs/ChannelAdaptiveDINO.png filter=lfs diff=lfs merge=lfs -text
|
Qwen-Image-vae-2d/config.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderKLQwenImage2D",
|
| 3 |
+
"_diffusers_version": "0.35.0",
|
| 4 |
+
"attn_scales": [],
|
| 5 |
+
"base_dim": 96,
|
| 6 |
+
"dim_mult": [
|
| 7 |
+
1,
|
| 8 |
+
2,
|
| 9 |
+
4,
|
| 10 |
+
4
|
| 11 |
+
],
|
| 12 |
+
"dropout": 0.0,
|
| 13 |
+
"latents_mean": [
|
| 14 |
+
-0.7571,
|
| 15 |
+
-0.7089,
|
| 16 |
+
-0.9113,
|
| 17 |
+
0.1075,
|
| 18 |
+
-0.1745,
|
| 19 |
+
0.9653,
|
| 20 |
+
-0.1517,
|
| 21 |
+
1.5508,
|
| 22 |
+
0.4134,
|
| 23 |
+
-0.0715,
|
| 24 |
+
0.5517,
|
| 25 |
+
-0.3632,
|
| 26 |
+
-0.1922,
|
| 27 |
+
-0.9497,
|
| 28 |
+
0.2503,
|
| 29 |
+
-0.2921
|
| 30 |
+
],
|
| 31 |
+
"latents_std": [
|
| 32 |
+
2.8184,
|
| 33 |
+
1.4541,
|
| 34 |
+
2.3275,
|
| 35 |
+
2.6558,
|
| 36 |
+
1.2196,
|
| 37 |
+
1.7708,
|
| 38 |
+
2.6052,
|
| 39 |
+
2.0743,
|
| 40 |
+
3.2687,
|
| 41 |
+
2.1526,
|
| 42 |
+
2.8652,
|
| 43 |
+
1.5579,
|
| 44 |
+
1.6382,
|
| 45 |
+
1.1253,
|
| 46 |
+
2.8251,
|
| 47 |
+
1.916
|
| 48 |
+
],
|
| 49 |
+
"non_linearity": "silu",
|
| 50 |
+
"num_res_blocks": 2,
|
| 51 |
+
"temperal_downsample": [
|
| 52 |
+
false,
|
| 53 |
+
true,
|
| 54 |
+
true
|
| 55 |
+
],
|
| 56 |
+
"z_dim": 16
|
| 57 |
+
}
|
Qwen-Image-vae-2d/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1dd2c67f3f29734d48709513ed181d4f351966d76ba95f77a5cff8e1daf547fa
|
| 3 |
+
size 178418892
|
VOSR_0.5B_ms/args.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"resolution": 512,
|
| 3 |
+
"patch_size": 2,
|
| 4 |
+
"mlp_ratio": 4,
|
| 5 |
+
"use_qknorm": true,
|
| 6 |
+
"use_swiglu": true,
|
| 7 |
+
"use_rope": true,
|
| 8 |
+
"use_rmsnorm": true,
|
| 9 |
+
"wo_shift": false,
|
| 10 |
+
"dim": 1024,
|
| 11 |
+
"depth": 28,
|
| 12 |
+
"num_heads": 16,
|
| 13 |
+
"ae_type": "sd2",
|
| 14 |
+
"ae_path": "preset/ckpts/stable-diffusion-2-1-base",
|
| 15 |
+
"time_dist": ["uniform", 0, 1.0],
|
| 16 |
+
"cfg_ratio": 0.1,
|
| 17 |
+
"cfg_scale": 2.0,
|
| 18 |
+
"dinov2_size": 448,
|
| 19 |
+
"enc_type": "dinov2b",
|
| 20 |
+
"enc_dim": 768,
|
| 21 |
+
"layer_dinov2b_list": [8],
|
| 22 |
+
"interp_type": "lin",
|
| 23 |
+
"encdim_ratio": 3,
|
| 24 |
+
"weak_cond_strength_aelq_list": [0.05, 0.25],
|
| 25 |
+
"cond_strength_aelq_list": [5, 1]
|
| 26 |
+
}
|
VOSR_0.5B_ms/checkpoints/ema_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec453a1ad84fee401494982f5079febb220f0a14311d8f00948e427251d5dbff
|
| 3 |
+
size 1943086064
|
VOSR_0.5B_os/args.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"resolution": 512,
|
| 3 |
+
"patch_size": 2,
|
| 4 |
+
"mlp_ratio": 4,
|
| 5 |
+
"use_qknorm": true,
|
| 6 |
+
"use_swiglu": true,
|
| 7 |
+
"use_rope": true,
|
| 8 |
+
"use_rmsnorm": true,
|
| 9 |
+
"wo_shift": false,
|
| 10 |
+
"dim": 1024,
|
| 11 |
+
"depth": 28,
|
| 12 |
+
"num_heads": 16,
|
| 13 |
+
"ae_type": "sd2",
|
| 14 |
+
"ae_path": "preset/ckpts/stable-diffusion-2-1-base",
|
| 15 |
+
"time_dist": ["uniform", 0, 1.0],
|
| 16 |
+
"cfg_ratio": 0.1,
|
| 17 |
+
"cfg_scale": 0.5,
|
| 18 |
+
"dinov2_size": 448,
|
| 19 |
+
"enc_type": "dinov2b",
|
| 20 |
+
"enc_dim": 768,
|
| 21 |
+
"layer_dinov2b_list": [8],
|
| 22 |
+
"interp_type": "lin",
|
| 23 |
+
"encdim_ratio": 3,
|
| 24 |
+
"weak_cond_strength_aelq_list": [0.05, 0.25],
|
| 25 |
+
"weak_cond_strength_aelq": 0.1,
|
| 26 |
+
"cond_strength_aelq_list": [5, 1],
|
| 27 |
+
"t_start": 0,
|
| 28 |
+
"t_end": 1,
|
| 29 |
+
"distill_type": "rcgm"
|
| 30 |
+
}
|
VOSR_0.5B_os/checkpoints/ema_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45b6687b4ce59fa3451300f9e0fdcaf2e729c15e65f444af210a7851dfa13203
|
| 3 |
+
size 1948337520
|
VOSR_1.4B_ms/args.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"resolution": 512,
|
| 3 |
+
"patch_size": 2,
|
| 4 |
+
"mlp_ratio": 4,
|
| 5 |
+
"use_qknorm": true,
|
| 6 |
+
"use_swiglu": true,
|
| 7 |
+
"use_rope": true,
|
| 8 |
+
"use_rmsnorm": true,
|
| 9 |
+
"wo_shift": false,
|
| 10 |
+
"dim": 1536,
|
| 11 |
+
"depth": 36,
|
| 12 |
+
"num_heads": 24,
|
| 13 |
+
"ae_type": "qwen",
|
| 14 |
+
"ae_path": "preset/ckpts/Qwen-Image-vae-2d",
|
| 15 |
+
"time_dist": ["uniform", 0, 1.0],
|
| 16 |
+
"cfg_ratio": 0.1,
|
| 17 |
+
"cfg_scale": 2.0,
|
| 18 |
+
"dinov2_size": 448,
|
| 19 |
+
"enc_type": "dinov2l",
|
| 20 |
+
"enc_dim": 1024,
|
| 21 |
+
"layer_dinov2b_list": [17],
|
| 22 |
+
"interp_type": "lin",
|
| 23 |
+
"encdim_ratio": 3,
|
| 24 |
+
"weak_cond_strength_aelq_list": [0.05, 0.25],
|
| 25 |
+
"cond_strength_aelq_list": [5, 1]
|
| 26 |
+
}
|
VOSR_1.4B_ms/checkpoints/ema_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3123e4bf6337af0545fae31f180b3f240ac8d7d3125021495a8da8d55c422f95
|
| 3 |
+
size 5576385424
|
VOSR_1.4B_os/args.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"resolution": 512,
|
| 3 |
+
"patch_size": 2,
|
| 4 |
+
"mlp_ratio": 4,
|
| 5 |
+
"use_qknorm": true,
|
| 6 |
+
"use_swiglu": true,
|
| 7 |
+
"use_rope": true,
|
| 8 |
+
"use_rmsnorm": true,
|
| 9 |
+
"wo_shift": false,
|
| 10 |
+
"dim": 1536,
|
| 11 |
+
"depth": 36,
|
| 12 |
+
"num_heads": 24,
|
| 13 |
+
"ae_type": "qwen",
|
| 14 |
+
"ae_path": "preset/ckpts/Qwen-Image-vae-2d",
|
| 15 |
+
"time_dist": ["uniform", 0, 1.0],
|
| 16 |
+
"cfg_ratio": 0.1,
|
| 17 |
+
"cfg_scale": 0.5,
|
| 18 |
+
"dinov2_size": 448,
|
| 19 |
+
"enc_type": "dinov2l",
|
| 20 |
+
"enc_dim": 1024,
|
| 21 |
+
"layer_dinov2b_list": [17],
|
| 22 |
+
"interp_type": "lin",
|
| 23 |
+
"encdim_ratio": 3,
|
| 24 |
+
"weak_cond_strength_aelq_list": [0.05, 0.25],
|
| 25 |
+
"weak_cond_strength_aelq": 0.1,
|
| 26 |
+
"cond_strength_aelq_list": [5, 1],
|
| 27 |
+
"t_start": 0,
|
| 28 |
+
"t_end": 1,
|
| 29 |
+
"distill_type": "rcgm"
|
| 30 |
+
}
|
VOSR_1.4B_os/checkpoints/ema_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d65f95580c4a04badf646d20aa2482ae9a61d9f5cc7bd278ad8e1a37321fbf5d
|
| 3 |
+
size 5587408152
|
sd21_lwdecoder.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a326a5e5c4a2445ce970987695979f3d5e5413d39b98c73a2ddac0055d2cdf59
|
| 3 |
+
size 52086482
|
stable-diffusion-2-1-base/vae/config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderKL",
|
| 3 |
+
"_diffusers_version": "0.10.0.dev0",
|
| 4 |
+
"act_fn": "silu",
|
| 5 |
+
"block_out_channels": [
|
| 6 |
+
128,
|
| 7 |
+
256,
|
| 8 |
+
512,
|
| 9 |
+
512
|
| 10 |
+
],
|
| 11 |
+
"down_block_types": [
|
| 12 |
+
"DownEncoderBlock2D",
|
| 13 |
+
"DownEncoderBlock2D",
|
| 14 |
+
"DownEncoderBlock2D",
|
| 15 |
+
"DownEncoderBlock2D"
|
| 16 |
+
],
|
| 17 |
+
"in_channels": 3,
|
| 18 |
+
"latent_channels": 4,
|
| 19 |
+
"layers_per_block": 2,
|
| 20 |
+
"norm_num_groups": 32,
|
| 21 |
+
"out_channels": 3,
|
| 22 |
+
"sample_size": 768,
|
| 23 |
+
"up_block_types": [
|
| 24 |
+
"UpDecoderBlock2D",
|
| 25 |
+
"UpDecoderBlock2D",
|
| 26 |
+
"UpDecoderBlock2D",
|
| 27 |
+
"UpDecoderBlock2D"
|
| 28 |
+
]
|
| 29 |
+
}
|
stable-diffusion-2-1-base/vae/diffusion_pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1b4889b6b1d4ce7ae320a02dedaeff1780ad77d415ea0d744b476155c6377ddc
|
| 3 |
+
size 334707217
|
stable-diffusion-2-1-base/vae/diffusion_pytorch_model.fp16.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:44915add42092106e70bffac475aae4283b5e8167a8a0c5f55ccc667ee4ebeb5
|
| 3 |
+
size 167405651
|
stable-diffusion-2-1-base/vae/diffusion_pytorch_model.fp16.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e4c08995484ee61270175e9e7a072b66a6e4eeb5f0c266667fe1f45b90daf9a
|
| 3 |
+
size 167335342
|
stable-diffusion-2-1-base/vae/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1d993488569e928462932c8c38a0760b874d166399b14414135bd9c42df5815
|
| 3 |
+
size 334643276
|
torch_cache/checkpoints/LPIPS_v0.1_alex-df73285e.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df73285e35b22355a2df87cdb6b70b343713b667eddbda73e1977e0c860835c0
|
| 3 |
+
size 6009
|
torch_cache/checkpoints/alexnet-owt-7be5be79.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7be5be791159472b1fbf3c69796f7cb30dca7ad8466c2df70058c37116cdee02
|
| 3 |
+
size 244408911
|
torch_cache/checkpoints/dinov2_vitb14_pretrain.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b8b82f85de91b424aded121c7e1dcc2b7bc6d0adeea651bf73a13307fad8c73
|
| 3 |
+
size 346378731
|
torch_cache/checkpoints/dinov2_vitl14_pretrain.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5383ea8f4877b2472eb973e0fd72d557c7da5d3611bd527ceeb1d7162cbf428
|
| 3 |
+
size 1217586395
|
torch_cache/checkpoints/musiq_koniq_ckpt-e95806b9.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e95806b9eae5f3814c410f574ba8e552362bd5bc63d758ed5b97860f5d6185aa
|
| 3 |
+
size 108610983
|
torch_cache/facebookresearch_dinov2_main/.github/workflows/lint.yaml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Lint
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
pull_request:
|
| 8 |
+
branches:
|
| 9 |
+
- main
|
| 10 |
+
|
| 11 |
+
jobs:
|
| 12 |
+
run-linters:
|
| 13 |
+
name: Run linters
|
| 14 |
+
runs-on: ubuntu-latest
|
| 15 |
+
|
| 16 |
+
steps:
|
| 17 |
+
- name: Checkout repository
|
| 18 |
+
uses: actions/checkout@v3
|
| 19 |
+
- name: Set up Python
|
| 20 |
+
uses: actions/setup-python@v4
|
| 21 |
+
with:
|
| 22 |
+
python-version: 3.9
|
| 23 |
+
cache: 'pip'
|
| 24 |
+
cache-dependency-path: '**/requirements*.txt'
|
| 25 |
+
- name: Install Python (development) dependencies
|
| 26 |
+
run: |
|
| 27 |
+
pip install -r requirements-dev.txt
|
| 28 |
+
- name: Run flake8
|
| 29 |
+
run: |
|
| 30 |
+
flake8
|
| 31 |
+
- name: Run black
|
| 32 |
+
if: always()
|
| 33 |
+
run: |
|
| 34 |
+
black --check dinov2
|
| 35 |
+
- name: Run pylint
|
| 36 |
+
if: always()
|
| 37 |
+
run: |
|
| 38 |
+
pylint --exit-zero dinov2
|
torch_cache/facebookresearch_dinov2_main/.gitignore
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
build/
|
| 2 |
+
dist/
|
| 3 |
+
*.egg-info/
|
| 4 |
+
**/__pycache__/
|
| 5 |
+
|
| 6 |
+
**/.ipynb_checkpoints
|
| 7 |
+
**/.ipynb_checkpoints/**
|
| 8 |
+
|
| 9 |
+
*.swp
|
| 10 |
+
|
| 11 |
+
.vscode/
|
torch_cache/facebookresearch_dinov2_main/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Code of Conduct
|
| 2 |
+
|
| 3 |
+
## Our Pledge
|
| 4 |
+
|
| 5 |
+
In the interest of fostering an open and welcoming environment, we as
|
| 6 |
+
contributors and maintainers pledge to make participation in our project and
|
| 7 |
+
our community a harassment-free experience for everyone, regardless of age, body
|
| 8 |
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
| 9 |
+
level of experience, education, socio-economic status, nationality, personal
|
| 10 |
+
appearance, race, religion, or sexual identity and orientation.
|
| 11 |
+
|
| 12 |
+
## Our Standards
|
| 13 |
+
|
| 14 |
+
Examples of behavior that contributes to creating a positive environment
|
| 15 |
+
include:
|
| 16 |
+
|
| 17 |
+
* Using welcoming and inclusive language
|
| 18 |
+
* Being respectful of differing viewpoints and experiences
|
| 19 |
+
* Gracefully accepting constructive criticism
|
| 20 |
+
* Focusing on what is best for the community
|
| 21 |
+
* Showing empathy towards other community members
|
| 22 |
+
|
| 23 |
+
Examples of unacceptable behavior by participants include:
|
| 24 |
+
|
| 25 |
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
| 26 |
+
advances
|
| 27 |
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
| 28 |
+
* Public or private harassment
|
| 29 |
+
* Publishing others' private information, such as a physical or electronic
|
| 30 |
+
address, without explicit permission
|
| 31 |
+
* Other conduct which could reasonably be considered inappropriate in a
|
| 32 |
+
professional setting
|
| 33 |
+
|
| 34 |
+
## Our Responsibilities
|
| 35 |
+
|
| 36 |
+
Project maintainers are responsible for clarifying the standards of acceptable
|
| 37 |
+
behavior and are expected to take appropriate and fair corrective action in
|
| 38 |
+
response to any instances of unacceptable behavior.
|
| 39 |
+
|
| 40 |
+
Project maintainers have the right and responsibility to remove, edit, or
|
| 41 |
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
| 42 |
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
| 43 |
+
permanently any contributor for other behaviors that they deem inappropriate,
|
| 44 |
+
threatening, offensive, or harmful.
|
| 45 |
+
|
| 46 |
+
## Scope
|
| 47 |
+
|
| 48 |
+
This Code of Conduct applies within all project spaces, and it also applies when
|
| 49 |
+
an individual is representing the project or its community in public spaces.
|
| 50 |
+
Examples of representing a project or community include using an official
|
| 51 |
+
project e-mail address, posting via an official social media account, or acting
|
| 52 |
+
as an appointed representative at an online or offline event. Representation of
|
| 53 |
+
a project may be further defined and clarified by project maintainers.
|
| 54 |
+
|
| 55 |
+
This Code of Conduct also applies outside the project spaces when there is a
|
| 56 |
+
reasonable belief that an individual's behavior may have a negative impact on
|
| 57 |
+
the project or its community.
|
| 58 |
+
|
| 59 |
+
## Enforcement
|
| 60 |
+
|
| 61 |
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
| 62 |
+
reported by contacting the project team at <opensource-conduct@meta.com>. All
|
| 63 |
+
complaints will be reviewed and investigated and will result in a response that
|
| 64 |
+
is deemed necessary and appropriate to the circumstances. The project team is
|
| 65 |
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
| 66 |
+
Further details of specific enforcement policies may be posted separately.
|
| 67 |
+
|
| 68 |
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
| 69 |
+
faith may face temporary or permanent repercussions as determined by other
|
| 70 |
+
members of the project's leadership.
|
| 71 |
+
|
| 72 |
+
## Attribution
|
| 73 |
+
|
| 74 |
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
| 75 |
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
| 76 |
+
|
| 77 |
+
[homepage]: https://www.contributor-covenant.org
|
| 78 |
+
|
| 79 |
+
For answers to common questions about this code of conduct, see
|
| 80 |
+
https://www.contributor-covenant.org/faq
|
torch_cache/facebookresearch_dinov2_main/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Contributing to DINOv2
|
| 2 |
+
We want to make contributing to this project as easy and transparent as
|
| 3 |
+
possible.
|
| 4 |
+
|
| 5 |
+
## Pull Requests
|
| 6 |
+
We actively welcome your pull requests.
|
| 7 |
+
|
| 8 |
+
1. Fork the repo and create your branch from `main`.
|
| 9 |
+
2. If you've added code that should be tested, add tests.
|
| 10 |
+
3. If you've changed APIs, update the documentation.
|
| 11 |
+
4. Ensure the test suite passes.
|
| 12 |
+
5. Make sure your code lints.
|
| 13 |
+
6. If you haven't already, complete the Contributor License Agreement ("CLA").
|
| 14 |
+
|
| 15 |
+
## Contributor License Agreement ("CLA")
|
| 16 |
+
In order to accept your pull request, we need you to submit a CLA. You only need
|
| 17 |
+
to do this once to work on any of Meta's open source projects.
|
| 18 |
+
|
| 19 |
+
Complete your CLA here: <https://code.facebook.com/cla>
|
| 20 |
+
|
| 21 |
+
## Issues
|
| 22 |
+
We use GitHub issues to track public bugs. Please ensure your description is
|
| 23 |
+
clear and has sufficient instructions to be able to reproduce the issue.
|
| 24 |
+
|
| 25 |
+
Meta has a [bounty program](https://www.facebook.com/whitehat/) for the safe
|
| 26 |
+
disclosure of security bugs. In those cases, please go through the process
|
| 27 |
+
outlined on that page and do not file a public issue.
|
| 28 |
+
|
| 29 |
+
## License
|
| 30 |
+
By contributing to DINOv2, you agree that your contributions will be licensed
|
| 31 |
+
under the LICENSE file in the root directory of this source tree.
|
torch_cache/facebookresearch_dinov2_main/LICENSE
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
Apache License
|
| 4 |
+
Version 2.0, January 2004
|
| 5 |
+
http://www.apache.org/licenses/
|
| 6 |
+
|
| 7 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 8 |
+
|
| 9 |
+
1. Definitions.
|
| 10 |
+
|
| 11 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 12 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 13 |
+
|
| 14 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 15 |
+
the copyright owner that is granting the License.
|
| 16 |
+
|
| 17 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 18 |
+
other entities that control, are controlled by, or are under common
|
| 19 |
+
control with that entity. For the purposes of this definition,
|
| 20 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 21 |
+
direction or management of such entity, whether by contract or
|
| 22 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 23 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 24 |
+
|
| 25 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 26 |
+
exercising permissions granted by this License.
|
| 27 |
+
|
| 28 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 29 |
+
including but not limited to software source code, documentation
|
| 30 |
+
source, and configuration files.
|
| 31 |
+
|
| 32 |
+
"Object" form shall mean any form resulting from mechanical
|
| 33 |
+
transformation or translation of a Source form, including but
|
| 34 |
+
not limited to compiled object code, generated documentation,
|
| 35 |
+
and conversions to other media types.
|
| 36 |
+
|
| 37 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 38 |
+
Object form, made available under the License, as indicated by a
|
| 39 |
+
copyright notice that is included in or attached to the work
|
| 40 |
+
(an example is provided in the Appendix below).
|
| 41 |
+
|
| 42 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 43 |
+
form, that is based on (or derived from) the Work and for which the
|
| 44 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 45 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 46 |
+
of this License, Derivative Works shall not include works that remain
|
| 47 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 48 |
+
the Work and Derivative Works thereof.
|
| 49 |
+
|
| 50 |
+
"Contribution" shall mean any work of authorship, including
|
| 51 |
+
the original version of the Work and any modifications or additions
|
| 52 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 53 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 54 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 55 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 56 |
+
means any form of electronic, verbal, or written communication sent
|
| 57 |
+
to the Licensor or its representatives, including but not limited to
|
| 58 |
+
communication on electronic mailing lists, source code control systems,
|
| 59 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 60 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 61 |
+
excluding communication that is conspicuously marked or otherwise
|
| 62 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 63 |
+
|
| 64 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 65 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 66 |
+
subsequently incorporated within the Work.
|
| 67 |
+
|
| 68 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 69 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 70 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 71 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 72 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 73 |
+
Work and such Derivative Works in Source or Object form.
|
| 74 |
+
|
| 75 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 76 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 77 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 78 |
+
(except as stated in this section) patent license to make, have made,
|
| 79 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 80 |
+
where such license applies only to those patent claims licensable
|
| 81 |
+
by such Contributor that are necessarily infringed by their
|
| 82 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 83 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 84 |
+
institute patent litigation against any entity (including a
|
| 85 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 86 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 87 |
+
or contributory patent infringement, then any patent licenses
|
| 88 |
+
granted to You under this License for that Work shall terminate
|
| 89 |
+
as of the date such litigation is filed.
|
| 90 |
+
|
| 91 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 92 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 93 |
+
modifications, and in Source or Object form, provided that You
|
| 94 |
+
meet the following conditions:
|
| 95 |
+
|
| 96 |
+
(a) You must give any other recipients of the Work or
|
| 97 |
+
Derivative Works a copy of this License; and
|
| 98 |
+
|
| 99 |
+
(b) You must cause any modified files to carry prominent notices
|
| 100 |
+
stating that You changed the files; and
|
| 101 |
+
|
| 102 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 103 |
+
that You distribute, all copyright, patent, trademark, and
|
| 104 |
+
attribution notices from the Source form of the Work,
|
| 105 |
+
excluding those notices that do not pertain to any part of
|
| 106 |
+
the Derivative Works; and
|
| 107 |
+
|
| 108 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 109 |
+
distribution, then any Derivative Works that You distribute must
|
| 110 |
+
include a readable copy of the attribution notices contained
|
| 111 |
+
within such NOTICE file, excluding those notices that do not
|
| 112 |
+
pertain to any part of the Derivative Works, in at least one
|
| 113 |
+
of the following places: within a NOTICE text file distributed
|
| 114 |
+
as part of the Derivative Works; within the Source form or
|
| 115 |
+
documentation, if provided along with the Derivative Works; or,
|
| 116 |
+
within a display generated by the Derivative Works, if and
|
| 117 |
+
wherever such third-party notices normally appear. The contents
|
| 118 |
+
of the NOTICE file are for informational purposes only and
|
| 119 |
+
do not modify the License. You may add Your own attribution
|
| 120 |
+
notices within Derivative Works that You distribute, alongside
|
| 121 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 122 |
+
that such additional attribution notices cannot be construed
|
| 123 |
+
as modifying the License.
|
| 124 |
+
|
| 125 |
+
You may add Your own copyright statement to Your modifications and
|
| 126 |
+
may provide additional or different license terms and conditions
|
| 127 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 128 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 129 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 130 |
+
the conditions stated in this License.
|
| 131 |
+
|
| 132 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 133 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 134 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 135 |
+
this License, without any additional terms or conditions.
|
| 136 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 137 |
+
the terms of any separate license agreement you may have executed
|
| 138 |
+
with Licensor regarding such Contributions.
|
| 139 |
+
|
| 140 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 141 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 142 |
+
except as required for reasonable and customary use in describing the
|
| 143 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 144 |
+
|
| 145 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 146 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 147 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 148 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 149 |
+
implied, including, without limitation, any warranties or conditions
|
| 150 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 151 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 152 |
+
appropriateness of using or redistributing the Work and assume any
|
| 153 |
+
risks associated with Your exercise of permissions under this License.
|
| 154 |
+
|
| 155 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 156 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 157 |
+
unless required by applicable law (such as deliberate and grossly
|
| 158 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 159 |
+
liable to You for damages, including any direct, indirect, special,
|
| 160 |
+
incidental, or consequential damages of any character arising as a
|
| 161 |
+
result of this License or out of the use or inability to use the
|
| 162 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 163 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 164 |
+
other commercial damages or losses), even if such Contributor
|
| 165 |
+
has been advised of the possibility of such damages.
|
| 166 |
+
|
| 167 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 168 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 169 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 170 |
+
or other liability obligations and/or rights consistent with this
|
| 171 |
+
License. However, in accepting such obligations, You may act only
|
| 172 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 173 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 174 |
+
defend, and hold each Contributor harmless for any liability
|
| 175 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 176 |
+
of your accepting any such warranty or additional liability.
|
| 177 |
+
|
| 178 |
+
END OF TERMS AND CONDITIONS
|
| 179 |
+
|
| 180 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 181 |
+
|
| 182 |
+
To apply the Apache License to your work, attach the following
|
| 183 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 184 |
+
replaced with your own identifying information. (Don't include
|
| 185 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 186 |
+
comment syntax for the file format. We also recommend that a
|
| 187 |
+
file or class name and description of purpose be included on the
|
| 188 |
+
same "printed page" as the copyright notice for easier
|
| 189 |
+
identification within third-party archives.
|
| 190 |
+
|
| 191 |
+
Copyright [yyyy] [name of copyright owner]
|
| 192 |
+
|
| 193 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 194 |
+
you may not use this file except in compliance with the License.
|
| 195 |
+
You may obtain a copy of the License at
|
| 196 |
+
|
| 197 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 198 |
+
|
| 199 |
+
Unless required by applicable law or agreed to in writing, software
|
| 200 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 201 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 202 |
+
See the License for the specific language governing permissions and
|
| 203 |
+
limitations under the License.
|
torch_cache/facebookresearch_dinov2_main/LICENSE_CELL_DINO_CODE
ADDED
|
@@ -0,0 +1,395 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Attribution 4.0 International
|
| 2 |
+
|
| 3 |
+
=======================================================================
|
| 4 |
+
|
| 5 |
+
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
| 6 |
+
does not provide legal services or legal advice. Distribution of
|
| 7 |
+
Creative Commons public licenses does not create a lawyer-client or
|
| 8 |
+
other relationship. Creative Commons makes its licenses and related
|
| 9 |
+
information available on an "as-is" basis. Creative Commons gives no
|
| 10 |
+
warranties regarding its licenses, any material licensed under their
|
| 11 |
+
terms and conditions, or any related information. Creative Commons
|
| 12 |
+
disclaims all liability for damages resulting from their use to the
|
| 13 |
+
fullest extent possible.
|
| 14 |
+
|
| 15 |
+
Using Creative Commons Public Licenses
|
| 16 |
+
|
| 17 |
+
Creative Commons public licenses provide a standard set of terms and
|
| 18 |
+
conditions that creators and other rights holders may use to share
|
| 19 |
+
original works of authorship and other material subject to copyright
|
| 20 |
+
and certain other rights specified in the public license below. The
|
| 21 |
+
following considerations are for informational purposes only, are not
|
| 22 |
+
exhaustive, and do not form part of our licenses.
|
| 23 |
+
|
| 24 |
+
Considerations for licensors: Our public licenses are
|
| 25 |
+
intended for use by those authorized to give the public
|
| 26 |
+
permission to use material in ways otherwise restricted by
|
| 27 |
+
copyright and certain other rights. Our licenses are
|
| 28 |
+
irrevocable. Licensors should read and understand the terms
|
| 29 |
+
and conditions of the license they choose before applying it.
|
| 30 |
+
Licensors should also secure all rights necessary before
|
| 31 |
+
applying our licenses so that the public can reuse the
|
| 32 |
+
material as expected. Licensors should clearly mark any
|
| 33 |
+
material not subject to the license. This includes other CC-
|
| 34 |
+
licensed material, or material used under an exception or
|
| 35 |
+
limitation to copyright. More considerations for licensors:
|
| 36 |
+
wiki.creativecommons.org/Considerations_for_licensors
|
| 37 |
+
|
| 38 |
+
Considerations for the public: By using one of our public
|
| 39 |
+
licenses, a licensor grants the public permission to use the
|
| 40 |
+
licensed material under specified terms and conditions. If
|
| 41 |
+
the licensor's permission is not necessary for any reason--for
|
| 42 |
+
example, because of any applicable exception or limitation to
|
| 43 |
+
copyright--then that use is not regulated by the license. Our
|
| 44 |
+
licenses grant only permissions under copyright and certain
|
| 45 |
+
other rights that a licensor has authority to grant. Use of
|
| 46 |
+
the licensed material may still be restricted for other
|
| 47 |
+
reasons, including because others have copyright or other
|
| 48 |
+
rights in the material. A licensor may make special requests,
|
| 49 |
+
such as asking that all changes be marked or described.
|
| 50 |
+
Although not required by our licenses, you are encouraged to
|
| 51 |
+
respect those requests where reasonable. More considerations
|
| 52 |
+
for the public:
|
| 53 |
+
wiki.creativecommons.org/Considerations_for_licensees
|
| 54 |
+
|
| 55 |
+
=======================================================================
|
| 56 |
+
|
| 57 |
+
Creative Commons Attribution 4.0 International Public License
|
| 58 |
+
|
| 59 |
+
By exercising the Licensed Rights (defined below), You accept and agree
|
| 60 |
+
to be bound by the terms and conditions of this Creative Commons
|
| 61 |
+
Attribution 4.0 International Public License ("Public License"). To the
|
| 62 |
+
extent this Public License may be interpreted as a contract, You are
|
| 63 |
+
granted the Licensed Rights in consideration of Your acceptance of
|
| 64 |
+
these terms and conditions, and the Licensor grants You such rights in
|
| 65 |
+
consideration of benefits the Licensor receives from making the
|
| 66 |
+
Licensed Material available under these terms and conditions.
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
Section 1 -- Definitions.
|
| 70 |
+
|
| 71 |
+
a. Adapted Material means material subject to Copyright and Similar
|
| 72 |
+
Rights that is derived from or based upon the Licensed Material
|
| 73 |
+
and in which the Licensed Material is translated, altered,
|
| 74 |
+
arranged, transformed, or otherwise modified in a manner requiring
|
| 75 |
+
permission under the Copyright and Similar Rights held by the
|
| 76 |
+
Licensor. For purposes of this Public License, where the Licensed
|
| 77 |
+
Material is a musical work, performance, or sound recording,
|
| 78 |
+
Adapted Material is always produced where the Licensed Material is
|
| 79 |
+
synched in timed relation with a moving image.
|
| 80 |
+
|
| 81 |
+
b. Adapter's License means the license You apply to Your Copyright
|
| 82 |
+
and Similar Rights in Your contributions to Adapted Material in
|
| 83 |
+
accordance with the terms and conditions of this Public License.
|
| 84 |
+
|
| 85 |
+
c. Copyright and Similar Rights means copyright and/or similar rights
|
| 86 |
+
closely related to copyright including, without limitation,
|
| 87 |
+
performance, broadcast, sound recording, and Sui Generis Database
|
| 88 |
+
Rights, without regard to how the rights are labeled or
|
| 89 |
+
categorized. For purposes of this Public License, the rights
|
| 90 |
+
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
| 91 |
+
Rights.
|
| 92 |
+
|
| 93 |
+
d. Effective Technological Measures means those measures that, in the
|
| 94 |
+
absence of proper authority, may not be circumvented under laws
|
| 95 |
+
fulfilling obligations under Article 11 of the WIPO Copyright
|
| 96 |
+
Treaty adopted on December 20, 1996, and/or similar international
|
| 97 |
+
agreements.
|
| 98 |
+
|
| 99 |
+
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
| 100 |
+
any other exception or limitation to Copyright and Similar Rights
|
| 101 |
+
that applies to Your use of the Licensed Material.
|
| 102 |
+
|
| 103 |
+
f. Licensed Material means the artistic or literary work, database,
|
| 104 |
+
or other material to which the Licensor applied this Public
|
| 105 |
+
License.
|
| 106 |
+
|
| 107 |
+
g. Licensed Rights means the rights granted to You subject to the
|
| 108 |
+
terms and conditions of this Public License, which are limited to
|
| 109 |
+
all Copyright and Similar Rights that apply to Your use of the
|
| 110 |
+
Licensed Material and that the Licensor has authority to license.
|
| 111 |
+
|
| 112 |
+
h. Licensor means the individual(s) or entity(ies) granting rights
|
| 113 |
+
under this Public License.
|
| 114 |
+
|
| 115 |
+
i. Share means to provide material to the public by any means or
|
| 116 |
+
process that requires permission under the Licensed Rights, such
|
| 117 |
+
as reproduction, public display, public performance, distribution,
|
| 118 |
+
dissemination, communication, or importation, and to make material
|
| 119 |
+
available to the public including in ways that members of the
|
| 120 |
+
public may access the material from a place and at a time
|
| 121 |
+
individually chosen by them.
|
| 122 |
+
|
| 123 |
+
j. Sui Generis Database Rights means rights other than copyright
|
| 124 |
+
resulting from Directive 96/9/EC of the European Parliament and of
|
| 125 |
+
the Council of 11 March 1996 on the legal protection of databases,
|
| 126 |
+
as amended and/or succeeded, as well as other essentially
|
| 127 |
+
equivalent rights anywhere in the world.
|
| 128 |
+
|
| 129 |
+
k. You means the individual or entity exercising the Licensed Rights
|
| 130 |
+
under this Public License. Your has a corresponding meaning.
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
Section 2 -- Scope.
|
| 134 |
+
|
| 135 |
+
a. License grant.
|
| 136 |
+
|
| 137 |
+
1. Subject to the terms and conditions of this Public License,
|
| 138 |
+
the Licensor hereby grants You a worldwide, royalty-free,
|
| 139 |
+
non-sublicensable, non-exclusive, irrevocable license to
|
| 140 |
+
exercise the Licensed Rights in the Licensed Material to:
|
| 141 |
+
|
| 142 |
+
a. reproduce and Share the Licensed Material, in whole or
|
| 143 |
+
in part; and
|
| 144 |
+
|
| 145 |
+
b. produce, reproduce, and Share Adapted Material.
|
| 146 |
+
|
| 147 |
+
2. Exceptions and Limitations. For the avoidance of doubt, where
|
| 148 |
+
Exceptions and Limitations apply to Your use, this Public
|
| 149 |
+
License does not apply, and You do not need to comply with
|
| 150 |
+
its terms and conditions.
|
| 151 |
+
|
| 152 |
+
3. Term. The term of this Public License is specified in Section
|
| 153 |
+
6(a).
|
| 154 |
+
|
| 155 |
+
4. Media and formats; technical modifications allowed. The
|
| 156 |
+
Licensor authorizes You to exercise the Licensed Rights in
|
| 157 |
+
all media and formats whether now known or hereafter created,
|
| 158 |
+
and to make technical modifications necessary to do so. The
|
| 159 |
+
Licensor waives and/or agrees not to assert any right or
|
| 160 |
+
authority to forbid You from making technical modifications
|
| 161 |
+
necessary to exercise the Licensed Rights, including
|
| 162 |
+
technical modifications necessary to circumvent Effective
|
| 163 |
+
Technological Measures. For purposes of this Public License,
|
| 164 |
+
simply making modifications authorized by this Section 2(a)
|
| 165 |
+
(4) never produces Adapted Material.
|
| 166 |
+
|
| 167 |
+
5. Downstream recipients.
|
| 168 |
+
|
| 169 |
+
a. Offer from the Licensor -- Licensed Material. Every
|
| 170 |
+
recipient of the Licensed Material automatically
|
| 171 |
+
receives an offer from the Licensor to exercise the
|
| 172 |
+
Licensed Rights under the terms and conditions of this
|
| 173 |
+
Public License.
|
| 174 |
+
|
| 175 |
+
b. No downstream restrictions. You may not offer or impose
|
| 176 |
+
any additional or different terms or conditions on, or
|
| 177 |
+
apply any Effective Technological Measures to, the
|
| 178 |
+
Licensed Material if doing so restricts exercise of the
|
| 179 |
+
Licensed Rights by any recipient of the Licensed
|
| 180 |
+
Material.
|
| 181 |
+
|
| 182 |
+
6. No endorsement. Nothing in this Public License constitutes or
|
| 183 |
+
may be construed as permission to assert or imply that You
|
| 184 |
+
are, or that Your use of the Licensed Material is, connected
|
| 185 |
+
with, or sponsored, endorsed, or granted official status by,
|
| 186 |
+
the Licensor or others designated to receive attribution as
|
| 187 |
+
provided in Section 3(a)(1)(A)(i).
|
| 188 |
+
|
| 189 |
+
b. Other rights.
|
| 190 |
+
|
| 191 |
+
1. Moral rights, such as the right of integrity, are not
|
| 192 |
+
licensed under this Public License, nor are publicity,
|
| 193 |
+
privacy, and/or other similar personality rights; however, to
|
| 194 |
+
the extent possible, the Licensor waives and/or agrees not to
|
| 195 |
+
assert any such rights held by the Licensor to the limited
|
| 196 |
+
extent necessary to allow You to exercise the Licensed
|
| 197 |
+
Rights, but not otherwise.
|
| 198 |
+
|
| 199 |
+
2. Patent and trademark rights are not licensed under this
|
| 200 |
+
Public License.
|
| 201 |
+
|
| 202 |
+
3. To the extent possible, the Licensor waives any right to
|
| 203 |
+
collect royalties from You for the exercise of the Licensed
|
| 204 |
+
Rights, whether directly or through a collecting society
|
| 205 |
+
under any voluntary or waivable statutory or compulsory
|
| 206 |
+
licensing scheme. In all other cases the Licensor expressly
|
| 207 |
+
reserves any right to collect such royalties.
|
| 208 |
+
|
| 209 |
+
|
| 210 |
+
Section 3 -- License Conditions.
|
| 211 |
+
|
| 212 |
+
Your exercise of the Licensed Rights is expressly made subject to the
|
| 213 |
+
following conditions.
|
| 214 |
+
|
| 215 |
+
a. Attribution.
|
| 216 |
+
|
| 217 |
+
1. If You Share the Licensed Material (including in modified
|
| 218 |
+
form), You must:
|
| 219 |
+
|
| 220 |
+
a. retain the following if it is supplied by the Licensor
|
| 221 |
+
with the Licensed Material:
|
| 222 |
+
|
| 223 |
+
i. identification of the creator(s) of the Licensed
|
| 224 |
+
Material and any others designated to receive
|
| 225 |
+
attribution, in any reasonable manner requested by
|
| 226 |
+
the Licensor (including by pseudonym if
|
| 227 |
+
designated);
|
| 228 |
+
|
| 229 |
+
ii. a copyright notice;
|
| 230 |
+
|
| 231 |
+
iii. a notice that refers to this Public License;
|
| 232 |
+
|
| 233 |
+
iv. a notice that refers to the disclaimer of
|
| 234 |
+
warranties;
|
| 235 |
+
|
| 236 |
+
v. a URI or hyperlink to the Licensed Material to the
|
| 237 |
+
extent reasonably practicable;
|
| 238 |
+
|
| 239 |
+
b. indicate if You modified the Licensed Material and
|
| 240 |
+
retain an indication of any previous modifications; and
|
| 241 |
+
|
| 242 |
+
c. indicate the Licensed Material is licensed under this
|
| 243 |
+
Public License, and include the text of, or the URI or
|
| 244 |
+
hyperlink to, this Public License.
|
| 245 |
+
|
| 246 |
+
2. You may satisfy the conditions in Section 3(a)(1) in any
|
| 247 |
+
reasonable manner based on the medium, means, and context in
|
| 248 |
+
which You Share the Licensed Material. For example, it may be
|
| 249 |
+
reasonable to satisfy the conditions by providing a URI or
|
| 250 |
+
hyperlink to a resource that includes the required
|
| 251 |
+
information.
|
| 252 |
+
|
| 253 |
+
3. If requested by the Licensor, You must remove any of the
|
| 254 |
+
information required by Section 3(a)(1)(A) to the extent
|
| 255 |
+
reasonably practicable.
|
| 256 |
+
|
| 257 |
+
4. If You Share Adapted Material You produce, the Adapter's
|
| 258 |
+
License You apply must not prevent recipients of the Adapted
|
| 259 |
+
Material from complying with this Public License.
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
Section 4 -- Sui Generis Database Rights.
|
| 263 |
+
|
| 264 |
+
Where the Licensed Rights include Sui Generis Database Rights that
|
| 265 |
+
apply to Your use of the Licensed Material:
|
| 266 |
+
|
| 267 |
+
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
| 268 |
+
to extract, reuse, reproduce, and Share all or a substantial
|
| 269 |
+
portion of the contents of the database;
|
| 270 |
+
|
| 271 |
+
b. if You include all or a substantial portion of the database
|
| 272 |
+
contents in a database in which You have Sui Generis Database
|
| 273 |
+
Rights, then the database in which You have Sui Generis Database
|
| 274 |
+
Rights (but not its individual contents) is Adapted Material; and
|
| 275 |
+
|
| 276 |
+
c. You must comply with the conditions in Section 3(a) if You Share
|
| 277 |
+
all or a substantial portion of the contents of the database.
|
| 278 |
+
|
| 279 |
+
For the avoidance of doubt, this Section 4 supplements and does not
|
| 280 |
+
replace Your obligations under this Public License where the Licensed
|
| 281 |
+
Rights include other Copyright and Similar Rights.
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
| 285 |
+
|
| 286 |
+
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
| 287 |
+
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
| 288 |
+
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
| 289 |
+
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
| 290 |
+
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
| 291 |
+
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
| 292 |
+
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
| 293 |
+
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
| 294 |
+
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
| 295 |
+
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
| 296 |
+
|
| 297 |
+
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
| 298 |
+
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
| 299 |
+
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
| 300 |
+
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
| 301 |
+
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
| 302 |
+
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
| 303 |
+
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
| 304 |
+
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
| 305 |
+
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
| 306 |
+
|
| 307 |
+
c. The disclaimer of warranties and limitation of liability provided
|
| 308 |
+
above shall be interpreted in a manner that, to the extent
|
| 309 |
+
possible, most closely approximates an absolute disclaimer and
|
| 310 |
+
waiver of all liability.
|
| 311 |
+
|
| 312 |
+
|
| 313 |
+
Section 6 -- Term and Termination.
|
| 314 |
+
|
| 315 |
+
a. This Public License applies for the term of the Copyright and
|
| 316 |
+
Similar Rights licensed here. However, if You fail to comply with
|
| 317 |
+
this Public License, then Your rights under this Public License
|
| 318 |
+
terminate automatically.
|
| 319 |
+
|
| 320 |
+
b. Where Your right to use the Licensed Material has terminated under
|
| 321 |
+
Section 6(a), it reinstates:
|
| 322 |
+
|
| 323 |
+
1. automatically as of the date the violation is cured, provided
|
| 324 |
+
it is cured within 30 days of Your discovery of the
|
| 325 |
+
violation; or
|
| 326 |
+
|
| 327 |
+
2. upon express reinstatement by the Licensor.
|
| 328 |
+
|
| 329 |
+
For the avoidance of doubt, this Section 6(b) does not affect any
|
| 330 |
+
right the Licensor may have to seek remedies for Your violations
|
| 331 |
+
of this Public License.
|
| 332 |
+
|
| 333 |
+
c. For the avoidance of doubt, the Licensor may also offer the
|
| 334 |
+
Licensed Material under separate terms or conditions or stop
|
| 335 |
+
distributing the Licensed Material at any time; however, doing so
|
| 336 |
+
will not terminate this Public License.
|
| 337 |
+
|
| 338 |
+
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
| 339 |
+
License.
|
| 340 |
+
|
| 341 |
+
|
| 342 |
+
Section 7 -- Other Terms and Conditions.
|
| 343 |
+
|
| 344 |
+
a. The Licensor shall not be bound by any additional or different
|
| 345 |
+
terms or conditions communicated by You unless expressly agreed.
|
| 346 |
+
|
| 347 |
+
b. Any arrangements, understandings, or agreements regarding the
|
| 348 |
+
Licensed Material not stated herein are separate from and
|
| 349 |
+
independent of the terms and conditions of this Public License.
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
Section 8 -- Interpretation.
|
| 353 |
+
|
| 354 |
+
a. For the avoidance of doubt, this Public License does not, and
|
| 355 |
+
shall not be interpreted to, reduce, limit, restrict, or impose
|
| 356 |
+
conditions on any use of the Licensed Material that could lawfully
|
| 357 |
+
be made without permission under this Public License.
|
| 358 |
+
|
| 359 |
+
b. To the extent possible, if any provision of this Public License is
|
| 360 |
+
deemed unenforceable, it shall be automatically reformed to the
|
| 361 |
+
minimum extent necessary to make it enforceable. If the provision
|
| 362 |
+
cannot be reformed, it shall be severed from this Public License
|
| 363 |
+
without affecting the enforceability of the remaining terms and
|
| 364 |
+
conditions.
|
| 365 |
+
|
| 366 |
+
c. No term or condition of this Public License will be waived and no
|
| 367 |
+
failure to comply consented to unless expressly agreed to by the
|
| 368 |
+
Licensor.
|
| 369 |
+
|
| 370 |
+
d. Nothing in this Public License constitutes or may be interpreted
|
| 371 |
+
as a limitation upon, or waiver of, any privileges and immunities
|
| 372 |
+
that apply to the Licensor or You, including from the legal
|
| 373 |
+
processes of any jurisdiction or authority.
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
=======================================================================
|
| 377 |
+
|
| 378 |
+
Creative Commons is not a party to its public
|
| 379 |
+
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
| 380 |
+
its public licenses to material it publishes and in those instances
|
| 381 |
+
will be considered the “Licensor.” The text of the Creative Commons
|
| 382 |
+
public licenses is dedicated to the public domain under the CC0 Public
|
| 383 |
+
Domain Dedication. Except for the limited purpose of indicating that
|
| 384 |
+
material is shared under a Creative Commons public license or as
|
| 385 |
+
otherwise permitted by the Creative Commons policies published at
|
| 386 |
+
creativecommons.org/policies, Creative Commons does not authorize the
|
| 387 |
+
use of the trademark "Creative Commons" or any other trademark or logo
|
| 388 |
+
of Creative Commons without its prior written consent including,
|
| 389 |
+
without limitation, in connection with any unauthorized modifications
|
| 390 |
+
to any of its public licenses or any other arrangements,
|
| 391 |
+
understandings, or agreements concerning use of licensed material. For
|
| 392 |
+
the avoidance of doubt, this paragraph does not form part of the
|
| 393 |
+
public licenses.
|
| 394 |
+
|
| 395 |
+
Creative Commons may be contacted at creativecommons.org.
|
torch_cache/facebookresearch_dinov2_main/LICENSE_CELL_DINO_MODELS
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FAIR Noncommercial Research License
|
| 2 |
+
v1 Last Updated: August 18, 2025
|
| 3 |
+
|
| 4 |
+
“Acceptable Use Policy” means the FAIR Acceptable Use Policy, applicable to Research Materials, that is incorporated into this Agreement.
|
| 5 |
+
|
| 6 |
+
“Agreement” means the terms and conditions for use, reproduction, distribution and modification of the Research Materials set forth herein.
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
“Documentation” means the specifications, manuals and documentation accompanying
|
| 10 |
+
Research Materials distributed by Meta.
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
“Licensee” or “you” means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entity’s behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
“Meta” or “we” means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland).
|
| 17 |
+
|
| 18 |
+
“Noncommercial Research Uses” means noncommercial research use cases related to research, development, education, processing, or analysis and in each case, is not primarily intended for commercial advantage or monetary compensation to you or others.
|
| 19 |
+
|
| 20 |
+
“Research Materials” means, collectively, Documentation and the models, software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code, demonstration materials and other elements of the foregoing distributed by Meta and made available under this Agreement.
|
| 21 |
+
|
| 22 |
+
By clicking “I Accept” below or by using or distributing any portion or element of the Research Materials, you agree to be bound by this Agreement.
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
1. License Rights and Redistribution.
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Meta’s intellectual property or other rights owned by Meta embodied in the Research Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Research Materials.
|
| 29 |
+
|
| 30 |
+
b. Redistribution and Use.
|
| 31 |
+
i. You will not use the Research Materials or any outputs or results of the Research Materials in connection with any commercial uses or for any uses other than Noncommercial Research Uses;
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
ii. Distribution of Research Materials, and any derivative works thereof, are subject to the terms of this Agreement. If you distribute or make the Research Materials, or any derivative works thereof, available to a third party, you may only do so under the terms of this Agreement. You shall also provide a copy of this Agreement to such third party.
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
iii. If you submit for publication the results of research you perform on, using, or otherwise in connection with Research Materials, you must acknowledge the use of Research Materials in your publication.
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
iv. Your use of the Research Materials must comply with applicable laws and regulations (including Trade Control Laws) and adhere to the FAIR Acceptable Use Policy, which is hereby incorporated by reference into this Agreement.
|
| 41 |
+
2. User Support. Your Noncommercial Research Use of the Research Materials is done at your own discretion; Meta does not process any information nor provide any service in relation to such use. Meta is under no obligation to provide any support services for the Research Materials. Any support provided is “as is”, “with all faults”, and without warranty of any kind.
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE RESEARCH MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE RESEARCH MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE RESEARCH MATERIALS AND ANY OUTPUT AND RESULTS.
|
| 45 |
+
|
| 46 |
+
4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY DIRECT OR INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
|
| 47 |
+
|
| 48 |
+
5. Intellectual Property.
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
a. Subject to Meta’s ownership of Research Materials and derivatives made by or for Meta, with respect to any derivative works and modifications of the Research Materials that are made by you, as between you and Meta, you are and will be the owner of such derivative works and modifications.
|
| 52 |
+
|
| 53 |
+
b. If you institute litigation or other proceedings against Meta or any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Research Materials, outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Meta from and against any claim by any third party arising out of or related to your use or distribution of the Research Materials.
|
| 54 |
+
|
| 55 |
+
6. Term and Termination. The term of this Agreement will commence upon your acceptance of this Agreement or access to the Research Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete and cease use of the Research Materials. Sections 3, 4 and 7 shall survive the termination of this Agreement.
|
| 56 |
+
|
| 57 |
+
7. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of the State of California without regard to choice of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. The courts of California shall have exclusive jurisdiction of any dispute arising out of this Agreement.
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
8. Modifications and Amendments. Meta may modify this Agreement from time to time; provided that they are similar in spirit to the current version of the Agreement, but may differ in detail to address new problems or concerns. All such changes will be effective immediately. Your continued use of the Research Materials after any modification to this Agreement constitutes your agreement to such modification. Except as provided in this Agreement, no modification or addition to any provision of this Agreement will be binding unless it is in writing and signed by an authorized representative of both you and Meta.
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
FAIR Acceptable Use Policy
|
| 64 |
+
|
| 65 |
+
The Fundamental AI Research (FAIR) team at Meta seeks to further understanding of new and existing research domains with the mission of advancing the state-of-the-art in artificial intelligence through open research for the benefit of all.
|
| 66 |
+
|
| 67 |
+
As part of this mission, Meta makes certain research materials available for noncommercial research use. Meta is committed to promoting the safe and responsible use of such research materials.
|
| 68 |
+
|
| 69 |
+
Prohibited Uses
|
| 70 |
+
|
| 71 |
+
You agree you will not use, or allow others to use, Research Materials to:
|
| 72 |
+
|
| 73 |
+
Violate the law or others’ rights, including to:
|
| 74 |
+
Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
|
| 75 |
+
Violence or terrorism
|
| 76 |
+
Exploitation or harm to children, including the solicitation, creation, acquisition, or dissemination of child exploitative content or failure to report Child Sexual Abuse Material
|
| 77 |
+
Human trafficking, exploitation, and sexual violence
|
| 78 |
+
The illegal distribution of information or materials to minors, including obscene materials, or failure to employ legally required age-gating in connection with such information or materials.
|
| 79 |
+
Sexual solicitation
|
| 80 |
+
Any other criminal activity
|
| 81 |
+
|
| 82 |
+
Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
|
| 83 |
+
|
| 84 |
+
Engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, other economic benefits, or other essential goods and services
|
| 85 |
+
|
| 86 |
+
Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
|
| 87 |
+
|
| 88 |
+
Collect, process, disclose, generate, or infer health, demographic, or other sensitive personal or private information about individuals without rights and consents required by applicable laws
|
| 89 |
+
|
| 90 |
+
Engage in or facilitate any action or generate any content that infringes, misappropriates, or otherwise violates any third-party rights, including the outputs or results of any technology using FAIR research materials
|
| 91 |
+
|
| 92 |
+
Create, generate, or facilitate the creation of malicious code, malware, computer viruses or do anything else that could disable, overburden, interfere with or impair the proper working, integrity, operation or appearance of a website or computer system
|
| 93 |
+
|
| 94 |
+
2. Engage in, promote, incite, facilitate, or assist in the planning or development of activities that present a risk of death or bodily harm to individuals, including use of research artifacts related to the following:
|
| 95 |
+
|
| 96 |
+
Military, warfare, nuclear industries or applications, espionage, use for materials or activities that are subject to the International Traffic Arms Regulations (ITAR) maintained by the United States Department of State
|
| 97 |
+
|
| 98 |
+
Guns and illegal weapons (including weapon development)
|
| 99 |
+
|
| 100 |
+
Illegal drugs and regulated/controlled substances
|
| 101 |
+
|
| 102 |
+
Operation of critical infrastructure, transportation technologies, or heavy machinery
|
| 103 |
+
|
| 104 |
+
Self-harm or harm to others, including suicide, cutting, and eating disorders
|
| 105 |
+
|
| 106 |
+
Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
|
| 107 |
+
|
| 108 |
+
3. Intentionally deceive or mislead others, including use of FAIR Research Materials related to the following:
|
| 109 |
+
|
| 110 |
+
Generating, promoting, or furthering fraud or the creation or promotion of disinformation
|
| 111 |
+
|
| 112 |
+
Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content
|
| 113 |
+
|
| 114 |
+
Generating, promoting, or further distributing spam
|
| 115 |
+
|
| 116 |
+
Impersonating another individual without consent, authorization, or legal right
|
| 117 |
+
|
| 118 |
+
Representing that outputs of FAIR research materials or outputs from technology using FAIR research materials are human-generated
|
| 119 |
+
|
| 120 |
+
Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
|
| 121 |
+
|
| 122 |
+
4. Fail to appropriately disclose to end users any known dangers of your Research Materials.
|
| 123 |
+
|
| 124 |
+
Please report any violation of this Policy or other problems that could lead to a violation of this Policy by submitting a report here [https://docs.google.com/forms/d/e/1FAIpQLSeb11cryAopJ7LNrC4nxEUXrHY26hfkXQMf_uH-oFgA3WlYZQ/viewform].
|
torch_cache/facebookresearch_dinov2_main/LICENSE_XRAY_DINO_MODEL
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
X-Ray DINO Research License [2025/12/18]
|
| 2 |
+
|
| 3 |
+
This X-Ray DINO Research License (“Agreement”) contains the terms and conditions that govern your access and use of the Materials (as defined below). You may not use the Materials if you do not accept this Agreement. By clicking “I Accept” to accept, or accessing, using, or distributing any portion or element of the Materials you hereby agree to be bound by the terms of this Agreement. If you are agreeing to be bound by the Agreement on behalf of your employer or other entity, you represent and warrant to Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland) (“Meta”) that you have full legal authority to bind your employer or such entity to this Agreement. If you do not have requisite authority, you may not accept the Agreement or access the Materials on behalf of your employer or other entity.
|
| 4 |
+
|
| 5 |
+
This Agreement is effective upon the earlier of the date that you first access the Materials or accept this Agreement (“Effective Date”), and is entered into by and between Meta, and you, or if you are entering into this Agreement on behalf of your employer or other entity (if you are entering into this Agreement on such person or entity’s behalf), of the age required under applicable laws, rules, or regulations to provide legal consent and, your employer or other entity and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf (“Licensee” or “You”).
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
“Documentation” means the specifications, manuals and documentation accompanying this release distributed by Meta at [https://github.com/facebookresearch/dinov2/blob/main/README.md].
|
| 9 |
+
|
| 10 |
+
“Noncommercial Research Use” means noncommercial research use cases related to research, development, education, processing, or analysis and in each case, is not primarily intended for commercial advantage or monetary compensation to you or others.
|
| 11 |
+
|
| 12 |
+
“Materials” means, collectively, Documentation and the models and software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code, demonstration materials and other elements of the foregoing distributed by Meta at [https://github.com/facebookresearch/dinov2/blob/main/README.md] and made available under this Agreement.
|
| 13 |
+
|
| 14 |
+
“Trade Control Laws” means any applicable U.S. and non-U.S. export control and trade sanctions laws and regulations.
|
| 15 |
+
|
| 16 |
+
2. License Rights and Redistribution. Subject to Your compliance with the terms and conditions of this Agreement, Meta hereby grants you the following:
|
| 17 |
+
Grant of Rights. You are hereby granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Meta’s intellectual property or other rights owned by Meta embodied in the Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Materials solely for Noncommercial Research Uses.
|
| 18 |
+
Redistribution and Use.
|
| 19 |
+
Distribution of Materials, and any derivative works thereof, are subject to the terms of this Agreement. If you distribute or make the Materials, or any derivative works thereof, available to a third party, you may only do so under the terms of this Agreement. You shall also provide a copy of this Agreement to such third party.
|
| 20 |
+
If you submit for publication the results of research you perform on, using, or otherwise in connection with Materials, you must acknowledge the use of Materials in your publication.
|
| 21 |
+
You must retain in all copies of the Materials that you distribute and include the following attribution notice within a “Notice” text file distributed as a part of such copies: “Materials are licensed under the X-Ray DINO Research License, Copyright © Meta Platforms, Inc. All Rights Reserved.”
|
| 22 |
+
Your use of the Materials must comply with applicable laws and regulations (including Trade Control Laws).
|
| 23 |
+
You agree to report any violation of this X-Ray DINO Research License.
|
| 24 |
+
3. Restrictions. You will not, and will not permit, assist or cause any third party to:
|
| 25 |
+
use the Materials or any outputs or results of the Materials in connection with any commercial uses or for any uses other than Noncommercial Research Uses;
|
| 26 |
+
use the Materials or any outputs or results of the Materials for provisioning medical advice or in connection with any clinical purpose or medical procedures, including health preventative, mitigatory, diagnostic, treatment, or curative applications or as a substitute or adjunct to professional medical judgment as the Materials have not been reviewed or approved by the Food and Drug Administration, and are for non-clinical, Noncommerical Research Use only;
|
| 27 |
+
disguise your or their location through IP proxying or other methods;
|
| 28 |
+
use or download Materials if you or they are: (a) located in a comprehensively sanctioned jurisdiction, (b) currently listed on any U.S. or non-U.S. restricted parties list, or (c) will use Materials for any purpose prohibited by Trade Control Laws; or
|
| 29 |
+
directly or indirectly export, re-export, provide, or otherwise transfer Materials: (a) to any individual, entity, or country prohibited by Trade Control Laws; (b) to anyone on U.S. or non-U.S. government restricted parties lists; or (c) for any purpose prohibited by Trade Control Laws, including nuclear, chemical or biological weapons, or missile technology applications.
|
| 30 |
+
4. User Support. Your Noncommercial Research Use of the Materials is done at your own discretion; Meta does not process any information nor provide any service in relation to such use. Meta is under no obligation to provide any support services for the Materials. Any support provided is “as is”, “with all faults”, and without warranty of any kind.
|
| 31 |
+
5. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE MATERIALS AND ANY OUTPUT AND RESULTS.
|
| 32 |
+
6. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY DIRECT OR INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
|
| 33 |
+
7. Intellectual Property.
|
| 34 |
+
No trademark licenses are granted under this Agreement, and in connection with the Materials, neither Meta nor Licensee may use any name or mark owned by or associated with the other or any of its affiliates, except as required for reasonable and customary use in describing and redistributing the Materials.
|
| 35 |
+
Subject to Meta’s ownership of Materials and derivatives made by or for Meta, with respect to any derivative works and modifications of the Materials that are made by you, as between you and Meta, you are and will be the owner of such derivative works and modifications.
|
| 36 |
+
If you institute litigation or other proceedings against Meta or any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Materials or outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses and rights granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Meta from and against any claim by any third party arising out of or related to your use or distribution of the Materials.
|
| 37 |
+
8. Term and Termination. The term of this Agreement will commence upon your acceptance of this Agreement or access to the Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete and cease use of the Materials. Sections 3, 4, 5, 6, 7, 8 and 9 shall survive the termination of this Agreement.
|
| 38 |
+
9. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of the State of California without regard to choice of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. The courts of California shall have exclusive jurisdiction of any dispute arising out of this Agreement.
|
| 39 |
+
10. Modifications and Amendments. Meta may modify this Agreement from time to time by posting a revised version at [https://ai.meta.com/resources/models-and-libraries/raydino-license/]; provided that they are similar in spirit to the current version of the Agreement, but may differ in detail to address new problems or concerns. All such changes will be effective immediately. Your continued use of the Materials after any modification to this Agreement constitutes your agreement to such modification. Except as provided in this Agreement, no other modification or addition to any provision of this Agreement will be binding unless it is in writing and signed by an authorized representative of both you and Meta.
|
torch_cache/facebookresearch_dinov2_main/MODEL_CARD.md
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Model Card for DINOv2-S/B/L/g
|
| 2 |
+
|
| 3 |
+
These are Vision Transformer models trained following the method described in the papers:
|
| 4 |
+
"DINOv2: Learning Robust Visual Features without Supervision"
|
| 5 |
+
and
|
| 6 |
+
"Vision Transformers Need Registers".
|
| 7 |
+
|
| 8 |
+
We provide 8 models:
|
| 9 |
+
- 1 ViT-g trained from scratch with 3 ViT-S/B/L models distilled from the ViT-g, without registers.
|
| 10 |
+
- 1 ViT-g trained from scratch with 3 ViT-S/B/L models distilled from the ViT-g, with registers.
|
| 11 |
+
|
| 12 |
+
## Model Details
|
| 13 |
+
The model takes an image as input and returns a class token and patch tokens, and optionally 4 register tokens.
|
| 14 |
+
|
| 15 |
+
The embedding dimension is:
|
| 16 |
+
- 384 for ViT-S.
|
| 17 |
+
- 768 for ViT-B.
|
| 18 |
+
- 1024 for ViT-L.
|
| 19 |
+
- 1536 for ViT-g.
|
| 20 |
+
|
| 21 |
+
The models follow a Transformer architecture, with a patch size of 14. In the case of registers, we add 4 register tokens, learned during training, to the input sequence after the patch embedding.
|
| 22 |
+
|
| 23 |
+
For a 224x224 image, this results in 1 class token + 256 patch tokens, and optionally 4 register tokens.
|
| 24 |
+
|
| 25 |
+
The models can accept larger images provided the image shapes are multiples of the patch size (14).
|
| 26 |
+
If this condition is not verified, the model will crop to the closest smaller multiple of the patch size.
|
| 27 |
+
|
| 28 |
+
### Model Description
|
| 29 |
+
|
| 30 |
+
- **Developed by:** Meta AI
|
| 31 |
+
- **Model type:** Vision Transformer
|
| 32 |
+
- **License:** Apache License 2.0
|
| 33 |
+
|
| 34 |
+
- **Repository:** https://github.com/facebookresearch/dinov2
|
| 35 |
+
- **Paper:** https://arxiv.org/abs/2304.07193
|
| 36 |
+
- **Demo:** https://dinov2.metademolab.com/
|
| 37 |
+
|
| 38 |
+
## Uses
|
| 39 |
+
|
| 40 |
+
The models are vision backbones providing multi-purpose features for downstream tasks.
|
| 41 |
+
|
| 42 |
+
### Direct Use
|
| 43 |
+
|
| 44 |
+
The models can be used without fine-tuning, with downstream classifiers as simple as linear layers, to obtain competitive results:
|
| 45 |
+
- on depth estimation, semantic segmentation, using linear layers.
|
| 46 |
+
- on image classification, using k-NN classifiers on the class token.
|
| 47 |
+
- on image classification, with logistic regression classifiers applied on the class token.
|
| 48 |
+
- on image classification, with a linear layer applied on the class token and the average of the patch tokens.
|
| 49 |
+
- on image retrieval using nearest neighbors.
|
| 50 |
+
|
| 51 |
+
### Downstream Use
|
| 52 |
+
|
| 53 |
+
It is technically possible to perform fine-tuning on the models, for small gains (we measured +2% on ImageNet-1k classification).
|
| 54 |
+
We recommend keeping this as a very last step and only when necessary, as the features already provide good performance out-of-the-box.
|
| 55 |
+
|
| 56 |
+
## Bias, Risks, and Limitations
|
| 57 |
+
|
| 58 |
+
Despite improvements thanks to the training method not using annotations, we still observe significant biases in our models toward rich households from Western countries.
|
| 59 |
+
|
| 60 |
+
### Recommendations
|
| 61 |
+
|
| 62 |
+
We expect fine-tuning will increase the biases in the features produced by the model as they will be tuned to the fine-tuning labels.
|
| 63 |
+
|
| 64 |
+
## How to Get Started with the Model
|
| 65 |
+
|
| 66 |
+
Use the code below to get started with the model.
|
| 67 |
+
|
| 68 |
+
```python
|
| 69 |
+
import torch
|
| 70 |
+
|
| 71 |
+
# DINOv2
|
| 72 |
+
dinov2_vits14 = torch.hub.load('facebookresearch/dinov2', 'dinov2_vits14')
|
| 73 |
+
dinov2_vitb14 = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitb14')
|
| 74 |
+
dinov2_vitl14 = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitl14')
|
| 75 |
+
dinov2_vitg14 = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitg14')
|
| 76 |
+
|
| 77 |
+
# DINOv2 with registers
|
| 78 |
+
dinov2_vits14_reg = torch.hub.load('facebookresearch/dinov2', 'dinov2_vits14_reg')
|
| 79 |
+
dinov2_vitb14_reg = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitb14_reg')
|
| 80 |
+
dinov2_vitl14_reg = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitl14_reg')
|
| 81 |
+
dinov2_vitg14_reg = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitg14_reg')
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
## Training Details
|
| 85 |
+
|
| 86 |
+
### Training Data
|
| 87 |
+
|
| 88 |
+
- **Training data:** LVD-142M (see paper)
|
| 89 |
+
- **Training regime:** fp16 using PyTorch-FSDP mixed-precision.
|
| 90 |
+
|
| 91 |
+
### Training Procedure
|
| 92 |
+
|
| 93 |
+
- **Training objective:**
|
| 94 |
+
- DINO self-distillation loss with multi-crop
|
| 95 |
+
- iBOT masked-image modeling loss
|
| 96 |
+
- KoLeo regularization on [CLS] tokens
|
| 97 |
+
- **Architectures:**
|
| 98 |
+
- ViT-S (21M params): Patch size 14, embedding dimension 384, 6 heads, MLP FFN
|
| 99 |
+
- ViT-B (86M params): Patch size 14, embedding dimension 768, 12 heads, MLP FFN
|
| 100 |
+
- ViT-L (0.3B params): Patch size 14, embedding dimension 1024, 16 heads, MLP FFN
|
| 101 |
+
- ViT-g (1.1B params): Patch size 14, embedding dimension 1536, 24 heads, SwiGLU FFN
|
| 102 |
+
- **Distillation:**
|
| 103 |
+
- Distillation follows the standard DINOv2 pretraining procedure, except the teacher is a pretrained ViT-g, frozen.
|
| 104 |
+
|
| 105 |
+
## Evaluation
|
| 106 |
+
|
| 107 |
+
We refer users to the associated papers for the evaluation protocols.
|
| 108 |
+
|
| 109 |
+
<table>
|
| 110 |
+
<tr>
|
| 111 |
+
<th colspan="2"></th>
|
| 112 |
+
<th colspan="3">ImageNet-1k</th>
|
| 113 |
+
<th>NYU-Depth v2</th>
|
| 114 |
+
<th>SUN-RGBD</th>
|
| 115 |
+
<th>ADE20k</th>
|
| 116 |
+
<th>iNaturalist 2018</th>
|
| 117 |
+
<th>Oxford-H</th>
|
| 118 |
+
</tr>
|
| 119 |
+
<tr>
|
| 120 |
+
<th rowspan="2">model</th>
|
| 121 |
+
<th rowspan="2">with <br /> registers</th>
|
| 122 |
+
<th>classif. (acc)</th>
|
| 123 |
+
<th>classif. (acc)</th>
|
| 124 |
+
<th>classif. V2 (acc)</th>
|
| 125 |
+
<th>depth (RMSE)</th>
|
| 126 |
+
<th>depth (RMSE)</th>
|
| 127 |
+
<th>segm. (mAP)</th>
|
| 128 |
+
<th>classif. (acc)</th>
|
| 129 |
+
<th>retrieval (mAP)</th>
|
| 130 |
+
</tr>
|
| 131 |
+
<tr>
|
| 132 |
+
<!-- <th>^</th> -->
|
| 133 |
+
<th>k-NN</th>
|
| 134 |
+
<th>linear</th>
|
| 135 |
+
<th>linear</th>
|
| 136 |
+
<th>linear<br />4 layers</th>
|
| 137 |
+
<th>NYU-D transfer</th>
|
| 138 |
+
<th>multiscale</th>
|
| 139 |
+
<th>linear</th>
|
| 140 |
+
<th>nearest neighbor</th>
|
| 141 |
+
</tr>
|
| 142 |
+
<tr>
|
| 143 |
+
<td>ViT-S/14</td>
|
| 144 |
+
<td align="center">:x:</td>
|
| 145 |
+
<td align="right">79.0%</td>
|
| 146 |
+
<td align="right">81.1%</td>
|
| 147 |
+
<td align="right">70.8%</td>
|
| 148 |
+
<td align="right">0.417</td>
|
| 149 |
+
<td align="right">0.431</td>
|
| 150 |
+
<td align="right">47.2</td>
|
| 151 |
+
<td align="right">69.5%</td>
|
| 152 |
+
<td align="right">43.2</td>
|
| 153 |
+
</tr>
|
| 154 |
+
<tr>
|
| 155 |
+
<td>ViT-S/14</td>
|
| 156 |
+
<td align="center">:white_check_mark:</td>
|
| 157 |
+
<td align="right">79.1%</td>
|
| 158 |
+
<td align="right">80.9%</td>
|
| 159 |
+
<td align="right">71.0%</td>
|
| 160 |
+
<td align="right">N/A</td>
|
| 161 |
+
<td align="right">N/A</td>
|
| 162 |
+
<td align="right">N/A</td>
|
| 163 |
+
<td align="right">67.6%</td>
|
| 164 |
+
<td align="right">39.5</td>
|
| 165 |
+
</tr>
|
| 166 |
+
<tr>
|
| 167 |
+
<td>ViT-B/14</td>
|
| 168 |
+
<td align="center">:x:</td>
|
| 169 |
+
<td align="right">82.1%</td>
|
| 170 |
+
<td align="right">84.5%</td>
|
| 171 |
+
<td align="right">74.9%</td>
|
| 172 |
+
<td align="right">0.362</td>
|
| 173 |
+
<td align="right">0.400</td>
|
| 174 |
+
<td align="right">51.3</td>
|
| 175 |
+
<td align="right">76.3%</td>
|
| 176 |
+
<td align="right">49.5</td>
|
| 177 |
+
</tr>
|
| 178 |
+
<td>ViT-B/14</td>
|
| 179 |
+
<td align="center">:white_check_mark:</td>
|
| 180 |
+
<td align="right">82.0%</td>
|
| 181 |
+
<td align="right">84.6%</td>
|
| 182 |
+
<td align="right">75.6%</td>
|
| 183 |
+
<td align="right">N/A</td>
|
| 184 |
+
<td align="right">N/A</td>
|
| 185 |
+
<td align="right">N/A</td>
|
| 186 |
+
<td align="right">73.8%</td>
|
| 187 |
+
<td align="right">51.0</td>
|
| 188 |
+
</tr>
|
| 189 |
+
<tr>
|
| 190 |
+
<td>ViT-L/14</td>
|
| 191 |
+
<td align="center">:x:</td>
|
| 192 |
+
<td align="right">83.5%</td>
|
| 193 |
+
<td align="right">86.3%</td>
|
| 194 |
+
<td align="right">77.6%</td>
|
| 195 |
+
<td align="right">0.333</td>
|
| 196 |
+
<td align="right">0.396</td>
|
| 197 |
+
<td align="right">53.1</td>
|
| 198 |
+
<td align="right">79.8%</td>
|
| 199 |
+
<td align="right">54.0</td>
|
| 200 |
+
</tr>
|
| 201 |
+
<tr>
|
| 202 |
+
<td>ViT-L/14</td>
|
| 203 |
+
<td align="center">:white_check_mark:</td>
|
| 204 |
+
<td align="right">83.8%</td>
|
| 205 |
+
<td align="right">86.7%</td>
|
| 206 |
+
<td align="right">78.5%</td>
|
| 207 |
+
<td align="right">N/A</td>
|
| 208 |
+
<td align="right">N/A</td>
|
| 209 |
+
<td align="right">N/A</td>
|
| 210 |
+
<td align="right">80.9%</td>
|
| 211 |
+
<td align="right">55.7</td>
|
| 212 |
+
</tr>
|
| 213 |
+
<tr>
|
| 214 |
+
<td>ViT-g/14</td>
|
| 215 |
+
<td align="center">:x:</td>
|
| 216 |
+
<td align="right">83.5%</td>
|
| 217 |
+
<td align="right">86.5%</td>
|
| 218 |
+
<td align="right">78.4%</td>
|
| 219 |
+
<td align="right">0.298</td>
|
| 220 |
+
<td align="right">0.362</td>
|
| 221 |
+
<td align="right">53.0</td>
|
| 222 |
+
<td align="right">81.6%</td>
|
| 223 |
+
<td align="right">52.3</td>
|
| 224 |
+
</tr>
|
| 225 |
+
<tr>
|
| 226 |
+
<tr>
|
| 227 |
+
<td>ViT-g/14</td>
|
| 228 |
+
<td align="center">:white_check_mark:</td>
|
| 229 |
+
<td align="right">83.7%</td>
|
| 230 |
+
<td align="right">87.1%</td>
|
| 231 |
+
<td align="right">78.8%</td>
|
| 232 |
+
<td align="right">N/A</td>
|
| 233 |
+
<td align="right">N/A</td>
|
| 234 |
+
<td align="right">N/A</td>
|
| 235 |
+
<td align="right">81.5%</td>
|
| 236 |
+
<td align="right">58.2</td>
|
| 237 |
+
</tr>
|
| 238 |
+
</table>
|
| 239 |
+
|
| 240 |
+
## Environmental Impact
|
| 241 |
+
|
| 242 |
+
- **Hardware Type:** Nvidia A100
|
| 243 |
+
- **Hours used:** 22,000 for ViT-g, 4,500 for ViT-S distillation, 5,300 for ViT-B distillation, 8,000 for ViT-L distillation
|
| 244 |
+
- **Cloud Provider:** Private infra
|
| 245 |
+
- **Compute Region:** USA
|
| 246 |
+
- **Carbon Emitted:** 7t CO2eq
|
| 247 |
+
|
| 248 |
+
#### Hardware
|
| 249 |
+
|
| 250 |
+
Nvidia A100 GPUs
|
| 251 |
+
|
| 252 |
+
#### Software
|
| 253 |
+
|
| 254 |
+
PyTorch 2.0,
|
| 255 |
+
xFormers 0.0.18
|
| 256 |
+
|
| 257 |
+
**BibTeX**
|
| 258 |
+
|
| 259 |
+
```
|
| 260 |
+
@misc{oquab2023dinov2,
|
| 261 |
+
title={DINOv2: Learning Robust Visual Features without Supervision},
|
| 262 |
+
author={Oquab, Maxime and Darcet, Timothée and Moutakanni, Theo and Vo, Huy and Szafraniec, Marc and Khalidov, Vasil and Fernandez, Pierre and Haziza, Daniel and Massa, Francisco and El-Nouby, Alaaeldin and Howes, Russell and Huang, Po-Yao and Xu, Hu and Sharma, Vasu and Li, Shang-Wen and Galuba, Wojciech and Rabbat, Mike and Assran, Mido and Ballas, Nicolas and Synnaeve, Gabriel and Misra, Ishan and Jegou, Herve and Mairal, Julien and Labatut, Patrick and Joulin, Armand and Bojanowski, Piotr},
|
| 263 |
+
journal={arXiv:2304.07193},
|
| 264 |
+
year={2023}
|
| 265 |
+
}
|
| 266 |
+
@misc{darcet2023vitneedreg,
|
| 267 |
+
title={Vision Transformers Need Registers},
|
| 268 |
+
author={Darcet, Timothée and Oquab, Maxime and Mairal, Julien and Bojanowski, Piotr},
|
| 269 |
+
journal={arXiv:2309.16588},
|
| 270 |
+
year={2023}
|
| 271 |
+
}
|
| 272 |
+
```
|
torch_cache/facebookresearch_dinov2_main/README.md
ADDED
|
@@ -0,0 +1,757 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
:new: [2025-12-18] *Added support for loading XRay-DINO backbone following [Advancing human-centric AI for robust X-ray analysis through holistic self-supervised learning](https://arxiv.org/pdf/2405.01469), more details are [here](#pretrained-backbone-xray-dino)*
|
| 2 |
+
|
| 3 |
+
:new: [2025-12-16] *Added Channel-Adaptive DINO code following [Scaling Channel-Adaptive Self-Supervised Learning](https://openreview.net/forum?id=pT8sgtRVAf), more details are [here](#dinov2-for-biology)*
|
| 4 |
+
|
| 5 |
+
:new: [2025-12-16] *Added Cell-DINO code following [Cell-DINO: Self-Supervised Image-based Embeddings for Cell Fluorescent Microscopy](to appear in Plos One Computational Biology), more details are [here](#dinov2-for-biology)*
|
| 6 |
+
|
| 7 |
+
[2025-08-14] *Please check out the more recent [DINOv3](https://github.com/facebookresearch/dinov3) effort continuing this line of work.*
|
| 8 |
+
|
| 9 |
+
[2025-06-11] *Added dino.txt inference code, following [DINOv2 Meets Text: A Unified Framework for Image- and Pixel-Level Vision-Language Alignment](https://arxiv.org/abs/2412.16334).*
|
| 10 |
+
|
| 11 |
+
[2023-10-26] *Added DINOv2 backbones with registers, following [Vision Transformers Need Registers](https://arxiv.org/abs/2309.16588).*
|
| 12 |
+
|
| 13 |
+
# DINOv2: Learning Robust Visual Features without Supervision
|
| 14 |
+
|
| 15 |
+
**[Meta AI Research, FAIR](https://ai.facebook.com/research/)**
|
| 16 |
+
|
| 17 |
+
Maxime Oquab,
|
| 18 |
+
Timothée Darcet,
|
| 19 |
+
Théo Moutakanni,
|
| 20 |
+
Huy V. Vo,
|
| 21 |
+
Marc Szafraniec,
|
| 22 |
+
Vasil Khalidov,
|
| 23 |
+
Patrick Labatut,
|
| 24 |
+
Armand Joulin,
|
| 25 |
+
Piotr Bojanowski
|
| 26 |
+
|
| 27 |
+
[[`Paper #1`](https://arxiv.org/abs/2304.07193)] [`Paper #2`](https://arxiv.org/abs/2309.16588)] [[`Blog`](https://ai.facebook.com/blog/dino-v2-computer-vision-self-supervised-learning/)] [[`Demo`](https://dinov2.metademolab.com)] [[`BibTeX`](#citing-dinov2)]
|
| 28 |
+
|
| 29 |
+
PyTorch implementation and pretrained models for DINOv2. For details, see the papers: **[DINOv2: Learning Robust Visual Features without Supervision](https://arxiv.org/abs/2304.07193)** and **[Vision Transformers Need Registers](https://arxiv.org/abs/2309.16588)**.
|
| 30 |
+
|
| 31 |
+
DINOv2 models produce high-performance visual features that can be directly employed with classifiers as simple as linear layers on a variety of computer vision tasks; these visual features are robust and perform well across domains without any requirement for fine-tuning. The models were pretrained on a dataset of 142 M images without using any labels or annotations.
|
| 32 |
+
|
| 33 |
+
https://github.com/facebookresearch/dinov2/assets/60359573/f168823e-7922-415a-b429-578badf5c356
|
| 34 |
+
|
| 35 |
+
<div align="center">
|
| 36 |
+
Visualization of the three first principal components of the patch features of all frames, mapped to RGB values.
|
| 37 |
+
</div>
|
| 38 |
+
|
| 39 |
+
## Pretrained models
|
| 40 |
+
|
| 41 |
+
<table style="margin: auto">
|
| 42 |
+
<thead>
|
| 43 |
+
<tr>
|
| 44 |
+
<th>model</th>
|
| 45 |
+
<th># of<br />params</th>
|
| 46 |
+
<th>with<br />registers</th>
|
| 47 |
+
<th>ImageNet<br />k-NN</th>
|
| 48 |
+
<th>ImageNet<br />linear</th>
|
| 49 |
+
<th>download</th>
|
| 50 |
+
</tr>
|
| 51 |
+
</thead>
|
| 52 |
+
<tbody>
|
| 53 |
+
<tr>
|
| 54 |
+
<td>ViT-S/14 distilled</td>
|
| 55 |
+
<td align="right">21 M</td>
|
| 56 |
+
<td align="center">:x:</td>
|
| 57 |
+
<td align="right">79.0%</td>
|
| 58 |
+
<td align="right">81.1%</td>
|
| 59 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_pretrain.pth">backbone only</a></td>
|
| 60 |
+
</tr>
|
| 61 |
+
<tr>
|
| 62 |
+
<td>ViT-S/14 distilled</td>
|
| 63 |
+
<td align="right">21 M</td>
|
| 64 |
+
<td align="center">:white_check_mark:</td>
|
| 65 |
+
<td align="right">79.1%</td>
|
| 66 |
+
<td align="right">80.9%</td>
|
| 67 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_reg4_pretrain.pth">backbone only</a></td>
|
| 68 |
+
</tr>
|
| 69 |
+
<tr>
|
| 70 |
+
<td>ViT-B/14 distilled</td>
|
| 71 |
+
<td align="right">86 M</td>
|
| 72 |
+
<td align="center">:x:</td>
|
| 73 |
+
<td align="right">82.1%</td>
|
| 74 |
+
<td align="right">84.5%</td>
|
| 75 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_pretrain.pth">backbone only</a></td>
|
| 76 |
+
</tr>
|
| 77 |
+
<tr>
|
| 78 |
+
<td>ViT-B/14 distilled</td>
|
| 79 |
+
<td align="right">86 M</td>
|
| 80 |
+
<td align="center">:white_check_mark:</td>
|
| 81 |
+
<td align="right">82.0%</td>
|
| 82 |
+
<td align="right">84.6%</td>
|
| 83 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_reg4_pretrain.pth">backbone only</a></td>
|
| 84 |
+
</tr>
|
| 85 |
+
<tr>
|
| 86 |
+
<td>ViT-L/14 distilled</td>
|
| 87 |
+
<td align="right">300 M</td>
|
| 88 |
+
<td align="center">:x:</td>
|
| 89 |
+
<td align="right">83.5%</td>
|
| 90 |
+
<td align="right">86.3%</td>
|
| 91 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_pretrain.pth">backbone only</a></td>
|
| 92 |
+
</tr>
|
| 93 |
+
<tr>
|
| 94 |
+
<td>ViT-L/14 distilled</td>
|
| 95 |
+
<td align="right">300 M</td>
|
| 96 |
+
<td align="center">:white_check_mark:</td>
|
| 97 |
+
<td align="right">83.8%</td>
|
| 98 |
+
<td align="right">86.7%</td>
|
| 99 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_reg4_pretrain.pth">backbone only</a></td>
|
| 100 |
+
</tr>
|
| 101 |
+
<tr>
|
| 102 |
+
<td>ViT-g/14</td>
|
| 103 |
+
<td align="right">1,100 M</td>
|
| 104 |
+
<td align="center">:x:</td>
|
| 105 |
+
<td align="right">83.5%</td>
|
| 106 |
+
<td align="right">86.5%</td>
|
| 107 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_pretrain.pth">backbone only</a></td>
|
| 108 |
+
</tr>
|
| 109 |
+
<tr>
|
| 110 |
+
<td>ViT-g/14</td>
|
| 111 |
+
<td align="right">1,100 M</td>
|
| 112 |
+
<td align="center">:white_check_mark:</td>
|
| 113 |
+
<td align="right">83.7%</td>
|
| 114 |
+
<td align="right">87.1%</td>
|
| 115 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_reg4_pretrain.pth">backbone only</a></td>
|
| 116 |
+
</tr>
|
| 117 |
+
</tbody>
|
| 118 |
+
</table>
|
| 119 |
+
|
| 120 |
+
### Pretrained backbones (via PyTorch Hub)
|
| 121 |
+
|
| 122 |
+
Please follow the instructions [here](https://pytorch.org/get-started/locally/) to install PyTorch (the only required dependency for loading the model). Installing PyTorch with CUDA support is strongly recommended.
|
| 123 |
+
|
| 124 |
+
A corresponding [model card](MODEL_CARD.md) is included in the repository.
|
| 125 |
+
|
| 126 |
+
```python
|
| 127 |
+
import torch
|
| 128 |
+
|
| 129 |
+
# DINOv2
|
| 130 |
+
dinov2_vits14 = torch.hub.load('facebookresearch/dinov2', 'dinov2_vits14')
|
| 131 |
+
dinov2_vitb14 = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitb14')
|
| 132 |
+
dinov2_vitl14 = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitl14')
|
| 133 |
+
dinov2_vitg14 = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitg14')
|
| 134 |
+
|
| 135 |
+
# DINOv2 with registers
|
| 136 |
+
dinov2_vits14_reg = torch.hub.load('facebookresearch/dinov2', 'dinov2_vits14_reg')
|
| 137 |
+
dinov2_vitb14_reg = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitb14_reg')
|
| 138 |
+
dinov2_vitl14_reg = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitl14_reg')
|
| 139 |
+
dinov2_vitg14_reg = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitg14_reg')
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
### Pretrained backbone: XRay-DINO
|
| 143 |
+
|
| 144 |
+
Request for downloading the model is here:
|
| 145 |
+
|
| 146 |
+
https://ai.meta.com/resources/models-and-libraries/raydino-downloads/
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
After filling the form, you will get an email with a temporary link. You can either download it using `wget` and indicate the checkpoint path in your local filesystem, or you can directly use the URL from the email in the following code:
|
| 150 |
+
|
| 151 |
+
```python
|
| 152 |
+
import torch
|
| 153 |
+
|
| 154 |
+
REPO_DIR = <PATH/TO/A/LOCAL/DIRECTORY/WHERE/THE/DINOV2/REPO/WAS/CLONED>
|
| 155 |
+
|
| 156 |
+
xray_dino_vitl16 = torch.hub.load(REPO_DIR, 'xray_dino_vitl16', source='local', weights=<CHECKPOINT/URL/OR/PATH>)
|
| 157 |
+
```
|
| 158 |
+
|
| 159 |
+
**License**
|
| 160 |
+
Model weights are released under the FAIR Noncommercial Research License. See LICENSE_XRAY_DINO_MODEL for additional details.
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
### Pretrained heads - Image classification
|
| 164 |
+
|
| 165 |
+
<table style="margin: auto">
|
| 166 |
+
<thead>
|
| 167 |
+
<tr>
|
| 168 |
+
<th rowspan="2">backbone</th>
|
| 169 |
+
<th rowspan="2">with<br />registers</th>
|
| 170 |
+
<th>download</th>
|
| 171 |
+
</tr>
|
| 172 |
+
<tr>
|
| 173 |
+
<th>ImageNet</th>
|
| 174 |
+
</tr>
|
| 175 |
+
</thead>
|
| 176 |
+
<tbody>
|
| 177 |
+
<tr>
|
| 178 |
+
<td>ViT-S/14 distilled</td>
|
| 179 |
+
<td align="center">:x:</td>
|
| 180 |
+
<td>
|
| 181 |
+
linear head (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_linear_head.pth">1 layer</a>,
|
| 182 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_linear4_head.pth">4 layers</a>)
|
| 183 |
+
</td>
|
| 184 |
+
</tr>
|
| 185 |
+
<tr>
|
| 186 |
+
<td>ViT-S/14 distilled</td>
|
| 187 |
+
<td align="center">:white_check_mark:</td>
|
| 188 |
+
<td>
|
| 189 |
+
linear head (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_reg4_linear_head.pth">1 layer</a>,
|
| 190 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_reg4_linear4_head.pth">4 layers</a>)
|
| 191 |
+
</td>
|
| 192 |
+
</tr>
|
| 193 |
+
<tr>
|
| 194 |
+
<td>ViT-B/14 distilled</td>
|
| 195 |
+
<td align="center">:x:</td>
|
| 196 |
+
<td>
|
| 197 |
+
linear head (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_linear_head.pth">1 layer</a>,
|
| 198 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_linear4_head.pth">4 layers</a>)
|
| 199 |
+
</tr>
|
| 200 |
+
<tr>
|
| 201 |
+
<td>ViT-B/14 distilled</td>
|
| 202 |
+
<td align="center">:white_check_mark:</td>
|
| 203 |
+
<td>
|
| 204 |
+
linear head (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_reg4_linear_head.pth">1 layer</a>,
|
| 205 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_reg4_linear4_head.pth">4 layers</a>)
|
| 206 |
+
</tr>
|
| 207 |
+
<tr>
|
| 208 |
+
<td>ViT-L/14 distilled</td>
|
| 209 |
+
<td align="center">:x:</td>
|
| 210 |
+
<td>
|
| 211 |
+
linear head (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_linear_head.pth">1 layer</a>,
|
| 212 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_linear4_head.pth">4 layers</a>)
|
| 213 |
+
</tr>
|
| 214 |
+
<tr>
|
| 215 |
+
<td>ViT-L/14 distilled</td>
|
| 216 |
+
<td align="center">:white_check_mark:</td>
|
| 217 |
+
<td>
|
| 218 |
+
linear head (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_reg4_linear_head.pth">1 layer</a>,
|
| 219 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_reg4_linear4_head.pth">4 layers</a>)
|
| 220 |
+
</tr>
|
| 221 |
+
<tr>
|
| 222 |
+
<td>ViT-g/14</td>
|
| 223 |
+
<td align="center">:x:</td>
|
| 224 |
+
<td>
|
| 225 |
+
linear head (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_linear_head.pth">1 layer</a>,
|
| 226 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_linear4_head.pth">4 layers</a>)
|
| 227 |
+
</tr>
|
| 228 |
+
<tr>
|
| 229 |
+
<td>ViT-g/14</td>
|
| 230 |
+
<td align="center">:white_check_mark:</td>
|
| 231 |
+
<td>
|
| 232 |
+
linear head (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_lreg4_inear_head.pth">1 layer</a>,
|
| 233 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_reg4_linear4_head.pth">4 layers</a>)
|
| 234 |
+
</tr>
|
| 235 |
+
</tbody>
|
| 236 |
+
</table>
|
| 237 |
+
|
| 238 |
+
The (full) classifier models can be loaded via PyTorch Hub:
|
| 239 |
+
|
| 240 |
+
```python
|
| 241 |
+
import torch
|
| 242 |
+
|
| 243 |
+
# DINOv2
|
| 244 |
+
dinov2_vits14_lc = torch.hub.load('facebookresearch/dinov2', 'dinov2_vits14_lc')
|
| 245 |
+
dinov2_vitb14_lc = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitb14_lc')
|
| 246 |
+
dinov2_vitl14_lc = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitl14_lc')
|
| 247 |
+
dinov2_vitg14_lc = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitg14_lc')
|
| 248 |
+
|
| 249 |
+
# DINOv2 with registers
|
| 250 |
+
dinov2_vits14_reg_lc = torch.hub.load('facebookresearch/dinov2', 'dinov2_vits14_reg_lc')
|
| 251 |
+
dinov2_vitb14_reg_lc = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitb14_reg_lc')
|
| 252 |
+
dinov2_vitl14_reg_lc = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitl14_reg_lc')
|
| 253 |
+
dinov2_vitg14_reg_lc = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitg14_reg_lc')
|
| 254 |
+
```
|
| 255 |
+
|
| 256 |
+
### Pretrained heads - Depth estimation
|
| 257 |
+
|
| 258 |
+
<table style="margin: auto">
|
| 259 |
+
<thead>
|
| 260 |
+
<tr>
|
| 261 |
+
<th rowspan="2">backbone</th>
|
| 262 |
+
<th colspan="2">download head</th>
|
| 263 |
+
</tr>
|
| 264 |
+
<tr>
|
| 265 |
+
<th>NYUd</th>
|
| 266 |
+
<th>KITTI</th>
|
| 267 |
+
</tr>
|
| 268 |
+
</thead>
|
| 269 |
+
<tbody>
|
| 270 |
+
<tr>
|
| 271 |
+
<td>ViT-S/14 distilled</td>
|
| 272 |
+
<td>
|
| 273 |
+
linear (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_nyu_linear_head.pth">1 layer</a>,
|
| 274 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_nyu_linear4_head.pth">4 layers</a>),
|
| 275 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_nyu_dpt_head.pth">DPT</a>
|
| 276 |
+
</td>
|
| 277 |
+
<td>
|
| 278 |
+
linear (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_kitti_linear_head.pth">1 layer</a>,
|
| 279 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_kitti_linear4_head.pth">4 layers</a>),
|
| 280 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_kitti_dpt_head.pth">DPT</a>
|
| 281 |
+
</td>
|
| 282 |
+
</tr>
|
| 283 |
+
<tr>
|
| 284 |
+
<td>ViT-B/14 distilled</td>
|
| 285 |
+
<td>
|
| 286 |
+
linear (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_linear_head.pth">1 layer</a>,
|
| 287 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_nyu_linear4_head.pth">4 layers</a>),
|
| 288 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_nyu_dpt_head.pth">DPT</a>
|
| 289 |
+
</td>
|
| 290 |
+
<td>
|
| 291 |
+
linear (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_kitti_linear_head.pth">1 layer</a>,
|
| 292 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_kitti_linear4_head.pth">4 layers</a>),
|
| 293 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_kitti_dpt_head.pth">DPT</a>
|
| 294 |
+
</td>
|
| 295 |
+
</tr>
|
| 296 |
+
<tr>
|
| 297 |
+
<td>ViT-L/14 distilled</td>
|
| 298 |
+
<td>
|
| 299 |
+
linear (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_linear_head.pth">1 layer</a>,
|
| 300 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_nyu_linear4_head.pth">4 layers</a>),
|
| 301 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_nyu_dpt_head.pth">DPT</a>
|
| 302 |
+
</td>
|
| 303 |
+
<td>
|
| 304 |
+
linear (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_kitti_linear_head.pth">1 layer</a>,
|
| 305 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_kitti_linear4_head.pth">4 layers</a>),
|
| 306 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_kitti_dpt_head.pth">DPT</a>
|
| 307 |
+
</td>
|
| 308 |
+
</tr>
|
| 309 |
+
<tr>
|
| 310 |
+
<td>ViT-g/14</td>
|
| 311 |
+
<td>
|
| 312 |
+
linear (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_linear_head.pth">1 layer</a>,
|
| 313 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_nyu_linear4_head.pth">4 layers</a>),
|
| 314 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_nyu_dpt_head.pth">DPT</a>
|
| 315 |
+
</td>
|
| 316 |
+
<td>
|
| 317 |
+
linear (<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_kitti_linear_head.pth">1 layer</a>,
|
| 318 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_kitti_linear4_head.pth">4 layers</a>),
|
| 319 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_kitti_dpt_head.pth">DPT</a>
|
| 320 |
+
</td>
|
| 321 |
+
</tr>
|
| 322 |
+
</tbody>
|
| 323 |
+
</table>
|
| 324 |
+
|
| 325 |
+
### Pretrained heads - Semantic segmentation
|
| 326 |
+
|
| 327 |
+
<table style="margin: auto">
|
| 328 |
+
<thead>
|
| 329 |
+
<tr>
|
| 330 |
+
<th rowspan="2">backbone</th>
|
| 331 |
+
<th>download model</th>
|
| 332 |
+
<th colspan="2">download head</th>
|
| 333 |
+
</tr>
|
| 334 |
+
<tr>
|
| 335 |
+
<th>ADE20K</th>
|
| 336 |
+
<th>ADE20K</th>
|
| 337 |
+
<th>VOC2012</th>
|
| 338 |
+
</tr>
|
| 339 |
+
</thead>
|
| 340 |
+
<tbody>
|
| 341 |
+
<tr>
|
| 342 |
+
<td>ViT-S/14 distilled</td>
|
| 343 |
+
<td></td>
|
| 344 |
+
<td>
|
| 345 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_ade20k_linear_head.pth">linear</a>,
|
| 346 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_ade20k_ms_head.pth">multi-scale</a>
|
| 347 |
+
</td>
|
| 348 |
+
<td>
|
| 349 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_voc2012_linear_head.pth">linear</a>,
|
| 350 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_voc2012_ms_head.pth">multi-scale</a>
|
| 351 |
+
</td>
|
| 352 |
+
</tr>
|
| 353 |
+
<tr>
|
| 354 |
+
<td>ViT-B/14 distilled</td>
|
| 355 |
+
<td></td>
|
| 356 |
+
<td>
|
| 357 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_ade20k_linear_head.pth">linear</a>,
|
| 358 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_ade20k_ms_head.pth">multi-scale</a>
|
| 359 |
+
</td>
|
| 360 |
+
<td>
|
| 361 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_voc2012_linear_head.pth">linear</a>,
|
| 362 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_voc2012_ms_head.pth">multi-scale</a>
|
| 363 |
+
</td>
|
| 364 |
+
</tr>
|
| 365 |
+
<tr>
|
| 366 |
+
<td>ViT-L/14 distilled</td>
|
| 367 |
+
<td></td>
|
| 368 |
+
<td>
|
| 369 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_ade20k_linear_head.pth">linear</a>,
|
| 370 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_ade20k_ms_head.pth">multi-scale</a>
|
| 371 |
+
</td>
|
| 372 |
+
<td>
|
| 373 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_voc2012_linear_head.pth">linear</a>,
|
| 374 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_voc2012_ms_head.pth">multi-scale</a>
|
| 375 |
+
</td>
|
| 376 |
+
</tr>
|
| 377 |
+
<tr>
|
| 378 |
+
<td>ViT-g/14</td>
|
| 379 |
+
<td>
|
| 380 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_ade20k_m2f.pth">Mask2Former</a>
|
| 381 |
+
</td>
|
| 382 |
+
<td>
|
| 383 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_ade20k_linear_head.pth">linear</a>,
|
| 384 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_ade20k_ms_head.pth">multi-scale</a>
|
| 385 |
+
</td>
|
| 386 |
+
<td>
|
| 387 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_voc2012_linear_head.pth">linear</a>,
|
| 388 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_voc2012_ms_head.pth">multi-scale</a>
|
| 389 |
+
</td>
|
| 390 |
+
</tr>
|
| 391 |
+
</tbody>
|
| 392 |
+
</table>
|
| 393 |
+
|
| 394 |
+
|
| 395 |
+
### Pretrained heads - Zero-shot tasks with dino.txt
|
| 396 |
+
|
| 397 |
+
<table style="margin: auto">
|
| 398 |
+
<thead>
|
| 399 |
+
<tr>
|
| 400 |
+
<th rowspan="2">backbone</th>
|
| 401 |
+
<th rowspan="2">with<br />registers</th>
|
| 402 |
+
<th>download</th>
|
| 403 |
+
</tr>
|
| 404 |
+
</thead>
|
| 405 |
+
<tbody>
|
| 406 |
+
<tr>
|
| 407 |
+
<td>ViT-L/14 distilled</td>
|
| 408 |
+
<td align="center">:white_check_mark:</td>
|
| 409 |
+
<td>
|
| 410 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_reg4_dinotxt_tet1280d20h24l_vision_head.pth">vision head</a>,
|
| 411 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_reg4_dinotxt_tet1280d20h24l_text_encoder.pth">text model</a>,
|
| 412 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/thirdparty/bpe_simple_vocab_16e6.txt.gz">vocabulary</a>,
|
| 413 |
+
<a href="https://dl.fbaipublicfiles.com/dinov2/thirdparty/LICENSE">vocabulary license</a>
|
| 414 |
+
</td>
|
| 415 |
+
</tr>
|
| 416 |
+
</tbody>
|
| 417 |
+
</table>
|
| 418 |
+
|
| 419 |
+
The (full) dino.txt model can be loaded via PyTorch Hub:
|
| 420 |
+
|
| 421 |
+
```python
|
| 422 |
+
import torch
|
| 423 |
+
|
| 424 |
+
# DINOv2
|
| 425 |
+
dinov2_vitl14_reg4_dinotxt_tet1280d20h24l = torch.hub.load('facebookresearch/dinov2', 'dinov2_vitl14_reg4_dinotxt_tet1280d20h24l')
|
| 426 |
+
```
|
| 427 |
+
|
| 428 |
+
|
| 429 |
+
## Installation
|
| 430 |
+
|
| 431 |
+
The training and evaluation code requires PyTorch 2.0 and [xFormers](https://github.com/facebookresearch/xformers) 0.0.18 as well as a number of other 3rd party packages. Note that the code has only been tested with the specified versions and also expects a Linux environment. To setup all the required dependencies for training and evaluation, please follow the instructions below:
|
| 432 |
+
|
| 433 |
+
*[conda](https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html)* **(Recommended)** - Clone the repository and then create and activate a `dinov2` conda environment using the provided environment definition:
|
| 434 |
+
|
| 435 |
+
```shell
|
| 436 |
+
conda env create -f conda.yaml
|
| 437 |
+
conda activate dinov2
|
| 438 |
+
```
|
| 439 |
+
|
| 440 |
+
*[pip](https://pip.pypa.io/en/stable/getting-started/)* - Clone the repository and then use the provided `requirements.txt` to install the dependencies:
|
| 441 |
+
|
| 442 |
+
```shell
|
| 443 |
+
pip install -r requirements.txt
|
| 444 |
+
```
|
| 445 |
+
|
| 446 |
+
For dense tasks (depth estimation and semantic segmentation), there are additional dependencies (specific versions of `mmcv` and `mmsegmentation`) which are captured in the `extras` dependency specifications:
|
| 447 |
+
|
| 448 |
+
*[conda](https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html)* **(Recommended)**:
|
| 449 |
+
|
| 450 |
+
```shell
|
| 451 |
+
conda env create -f conda-extras.yaml
|
| 452 |
+
conda activate dinov2-extras
|
| 453 |
+
```
|
| 454 |
+
|
| 455 |
+
*[pip](https://pip.pypa.io/en/stable/getting-started/)*:
|
| 456 |
+
|
| 457 |
+
```shell
|
| 458 |
+
pip install -r requirements.txt -r requirements-extras.txt
|
| 459 |
+
```
|
| 460 |
+
|
| 461 |
+
## Data preparation
|
| 462 |
+
|
| 463 |
+
### ImageNet-1k
|
| 464 |
+
|
| 465 |
+
The root directory of the dataset should hold the following contents:
|
| 466 |
+
|
| 467 |
+
- `<ROOT>/test/ILSVRC2012_test_00000001.JPEG`
|
| 468 |
+
- `<ROOT>/test/[..]`
|
| 469 |
+
- `<ROOT>/test/ILSVRC2012_test_00100000.JPEG`
|
| 470 |
+
- `<ROOT>/train/n01440764/n01440764_10026.JPEG`
|
| 471 |
+
- `<ROOT>/train/[...]`
|
| 472 |
+
- `<ROOT>/train/n15075141/n15075141_9993.JPEG`
|
| 473 |
+
- `<ROOT>/val/n01440764/ILSVRC2012_val_00000293.JPEG`
|
| 474 |
+
- `<ROOT>/val/[...]`
|
| 475 |
+
- `<ROOT>/val/n15075141/ILSVRC2012_val_00049174.JPEG`
|
| 476 |
+
- `<ROOT>/labels.txt`
|
| 477 |
+
|
| 478 |
+
The provided dataset implementation expects a few additional metadata files to be present under the extra directory:
|
| 479 |
+
|
| 480 |
+
- `<EXTRA>/class-ids-TRAIN.npy`
|
| 481 |
+
- `<EXTRA>/class-ids-VAL.npy`
|
| 482 |
+
- `<EXTRA>/class-names-TRAIN.npy`
|
| 483 |
+
- `<EXTRA>/class-names-VAL.npy`
|
| 484 |
+
- `<EXTRA>/entries-TEST.npy`
|
| 485 |
+
- `<EXTRA>/entries-TRAIN.npy`
|
| 486 |
+
- `<EXTRA>/entries-VAL.npy`
|
| 487 |
+
|
| 488 |
+
These metadata files can be generated (once) with the following lines of Python code:
|
| 489 |
+
|
| 490 |
+
```python
|
| 491 |
+
from dinov2.data.datasets import ImageNet
|
| 492 |
+
|
| 493 |
+
for split in ImageNet.Split:
|
| 494 |
+
dataset = ImageNet(split=split, root="<ROOT>", extra="<EXTRA>")
|
| 495 |
+
dataset.dump_extra()
|
| 496 |
+
```
|
| 497 |
+
|
| 498 |
+
Note that the root and extra directories do not have to be distinct directories.
|
| 499 |
+
|
| 500 |
+
### ImageNet-22k
|
| 501 |
+
|
| 502 |
+
Please adapt the [dataset class](dinov2/data/datasets/image_net_22k.py) to match your local setup.
|
| 503 |
+
|
| 504 |
+
<br />
|
| 505 |
+
|
| 506 |
+
:warning: To execute the commands provided in the next sections for training and evaluation, the `dinov2` package should be included in the Python module search path, i.e. simply prefix the command to run with `PYTHONPATH=.`.
|
| 507 |
+
|
| 508 |
+
## Training
|
| 509 |
+
|
| 510 |
+
### Fast setup: training DINOv2 ViT-L/16 on ImageNet-1k
|
| 511 |
+
|
| 512 |
+
Run DINOv2 training on 4 A100-80GB nodes (32 GPUs) in a SLURM cluster environment with submitit:
|
| 513 |
+
|
| 514 |
+
```shell
|
| 515 |
+
python dinov2/run/train/train.py \
|
| 516 |
+
--nodes 4 \
|
| 517 |
+
--config-file dinov2/configs/train/vitl16_short.yaml \
|
| 518 |
+
--output-dir <PATH/TO/OUTPUT/DIR> \
|
| 519 |
+
train.dataset_path=ImageNet:split=TRAIN:root=<PATH/TO/DATASET>:extra=<PATH/TO/DATASET>
|
| 520 |
+
```
|
| 521 |
+
|
| 522 |
+
Training time is approximately 1 day and the resulting checkpoint should reach 81.6% on k-NN eval and 82.9% on linear eval.
|
| 523 |
+
|
| 524 |
+
The training code saves the weights of the teacher in the `eval` folder every 12500 iterations for evaluation.
|
| 525 |
+
|
| 526 |
+
### Long setup: training DINOv2 ViT-L/14 on ImageNet-22k
|
| 527 |
+
|
| 528 |
+
Run DINOv2 training on 12 A100-80GB nodes (96 GPUs) in a SLURM cluster environment with submitit:
|
| 529 |
+
|
| 530 |
+
```shell
|
| 531 |
+
python dinov2/run/train/train.py \
|
| 532 |
+
--nodes 12 \
|
| 533 |
+
--config-file dinov2/configs/train/vitl14.yaml \
|
| 534 |
+
--output-dir <PATH/TO/OUTPUT/DIR> \
|
| 535 |
+
train.dataset_path=ImageNet22k:root=<PATH/TO/DATASET>:extra=<PATH/TO/DATASET>
|
| 536 |
+
```
|
| 537 |
+
|
| 538 |
+
Training time is approximately 3.3 days and the resulting checkpoint should reach 82.0% on k-NN eval and 84.5% on linear eval.
|
| 539 |
+
|
| 540 |
+
The training code saves the weights of the teacher in the `eval` folder every 12500 iterations for evaluation.
|
| 541 |
+
|
| 542 |
+
|
| 543 |
+
## Evaluation
|
| 544 |
+
|
| 545 |
+
The training code regularly saves the teacher weights. In order to evaluate the model, run the following evaluation on a single node:
|
| 546 |
+
|
| 547 |
+
### k-NN classification on ImageNet-1k
|
| 548 |
+
|
| 549 |
+
```shell
|
| 550 |
+
python dinov2/run/eval/knn.py \
|
| 551 |
+
--config-file <PATH/TO/OUTPUT/DIR>/config.yaml \
|
| 552 |
+
--pretrained-weights <PATH/TO/OUTPUT/DIR>/eval/training_24999/teacher_checkpoint.pth \
|
| 553 |
+
--output-dir <PATH/TO/OUTPUT/DIR>/eval/training_24999/knn \
|
| 554 |
+
--train-dataset ImageNet:split=TRAIN:root=<PATH/TO/DATASET>:extra=<PATH/TO/DATASET> \
|
| 555 |
+
--val-dataset ImageNet:split=VAL:root=<PATH/TO/DATASET>:extra=<PATH/TO/DATASET>
|
| 556 |
+
```
|
| 557 |
+
|
| 558 |
+
### Logistic regression classification on ImageNet-1k
|
| 559 |
+
|
| 560 |
+
```shell
|
| 561 |
+
python dinov2/run/eval/log_regression.py \
|
| 562 |
+
--config-file <PATH/TO/OUTPUT/DIR>/config.yaml \
|
| 563 |
+
--pretrained-weights <PATH/TO/OUTPUT/DIR>/eval/training_24999/teacher_checkpoint.pth \
|
| 564 |
+
--output-dir <PATH/TO/OUTPUT/DIR>/eval/training_24999/logreg \
|
| 565 |
+
--train-dataset ImageNet:split=TRAIN:root=<PATH/TO/DATASET>:extra=<PATH/TO/DATASET> \
|
| 566 |
+
--val-dataset ImageNet:split=VAL:root=<PATH/TO/DATASET>:extra=<PATH/TO/DATASET>
|
| 567 |
+
```
|
| 568 |
+
|
| 569 |
+
### Linear classification with data augmentation on ImageNet-1k
|
| 570 |
+
|
| 571 |
+
```shell
|
| 572 |
+
python dinov2/run/eval/linear.py \
|
| 573 |
+
--config-file <PATH/TO/OUTPUT/DIR>/config.yaml \
|
| 574 |
+
--pretrained-weights <PATH/TO/OUTPUT/DIR>/eval/training_24999/teacher_checkpoint.pth \
|
| 575 |
+
--output-dir <PATH/TO/OUTPUT/DIR>/eval/training_24999/linear \
|
| 576 |
+
--train-dataset ImageNet:split=TRAIN:root=<PATH/TO/DATASET>:extra=<PATH/TO/DATASET> \
|
| 577 |
+
--val-dataset ImageNet:split=VAL:root=<PATH/TO/DATASET>:extra=<PATH/TO/DATASET>
|
| 578 |
+
```
|
| 579 |
+
|
| 580 |
+
We release the weights from evaluating the different models:
|
| 581 |
+
|
| 582 |
+
<table style="margin: auto">
|
| 583 |
+
<tr>
|
| 584 |
+
<th>model</th>
|
| 585 |
+
<th>with<br />registers</th>
|
| 586 |
+
<th>ImageNet<br />top-1</th>
|
| 587 |
+
<th>linear evaluation</th>
|
| 588 |
+
</tr>
|
| 589 |
+
<tr>
|
| 590 |
+
<td>ViT-S/14 distilled</td>
|
| 591 |
+
<td align="center">:x:</td>
|
| 592 |
+
<td align="right">81.1%</td>
|
| 593 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_linear_head.pth">linear head weights</a></td>
|
| 594 |
+
</tr>
|
| 595 |
+
<tr>
|
| 596 |
+
<td>ViT-S/14 distilled</td>
|
| 597 |
+
<td align="center">:white_check_mark:</td>
|
| 598 |
+
<td align="right">80.8%</td>
|
| 599 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vits14/dinov2_vits14_reg4_linear_head.pth">linear head weights</a></td>
|
| 600 |
+
</tr>
|
| 601 |
+
<tr>
|
| 602 |
+
<td>ViT-B/14 distilled</td>
|
| 603 |
+
<td align="center">:x:</td>
|
| 604 |
+
<td align="right">84.5%</td>
|
| 605 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_linear_head.pth">linear head weights</a></td>
|
| 606 |
+
</tr>
|
| 607 |
+
<tr>
|
| 608 |
+
<td>ViT-B/14 distilled</td>
|
| 609 |
+
<td align="center">:white_check_mark:</td>
|
| 610 |
+
<td align="right">84.4%</td>
|
| 611 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitb14/dinov2_vitb14_reg4_linear_head.pth">linear head weights</a></td>
|
| 612 |
+
</tr>
|
| 613 |
+
<tr>
|
| 614 |
+
<td>ViT-L/14 distilled</td>
|
| 615 |
+
<td align="center">:x:</td>
|
| 616 |
+
<td align="right">86.3%</td>
|
| 617 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_linear_head.pth">linear head weights</a></td>
|
| 618 |
+
</tr>
|
| 619 |
+
<tr>
|
| 620 |
+
<td>ViT-L/14 distilled</td>
|
| 621 |
+
<td align="center">:white_check_mark:</td>
|
| 622 |
+
<td align="right">86.5%</td>
|
| 623 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitl14/dinov2_vitl14_reg4_linear_head.pth">linear head weights</a></td>
|
| 624 |
+
</tr>
|
| 625 |
+
<tr>
|
| 626 |
+
<td>ViT-g/14</td>
|
| 627 |
+
<td align="center">:x:</td>
|
| 628 |
+
<td align="right">86.5%</td>
|
| 629 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_linear_head.pth">linear head weights</a></td>
|
| 630 |
+
</tr>
|
| 631 |
+
<tr>
|
| 632 |
+
<td>ViT-g/14</td>
|
| 633 |
+
<td align="center">:white_check_mark:</td>
|
| 634 |
+
<td align="right">87.0%</td>
|
| 635 |
+
<td><a href="https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_reg4_linear_head.pth">linear head weights</a></td>
|
| 636 |
+
</tr>
|
| 637 |
+
</table>
|
| 638 |
+
|
| 639 |
+
The performance of the provided pretrained model weights can be evaluated as follows on ImageNet-1k:
|
| 640 |
+
|
| 641 |
+
```shell
|
| 642 |
+
python dinov2/run/eval/linear.py \
|
| 643 |
+
--config-file dinov2/configs/eval/vitg14_pretrain.yaml \
|
| 644 |
+
--pretrained-weights https://dl.fbaipublicfiles.com/dinov2/dinov2_vitg14/dinov2_vitg14_pretrain.pth \
|
| 645 |
+
--train-dataset ImageNet:split=TRAIN:root=<PATH/TO/DATASET>:extra=<PATH/TO/DATASET> \
|
| 646 |
+
--val-dataset ImageNet:split=VAL:root=<PATH/TO/DATASET>:extra=<PATH/TO/DATASET>
|
| 647 |
+
```
|
| 648 |
+
|
| 649 |
+
## Notebooks
|
| 650 |
+
|
| 651 |
+
A few notebooks are provided to help the community leverage the models and code:
|
| 652 |
+
|
| 653 |
+
<ul>
|
| 654 |
+
<li><a href="https://github.com/facebookresearch/dinov2/blob/main/notebooks/depth_estimation.ipynb">Depth estimation</a> - How to load and use the depth heads in combination with a matching backbone via mmcv</li>
|
| 655 |
+
<li><a href="https://github.com/facebookresearch/dinov2/blob/main/notebooks/semantic_segmentation.ipynb">Semantic segmentation</a> - How to load and use the segmentation heads in combination with a matching backbone via mmcv, and also how to load and use the Mask2Former-based segmentation model trained on ADE20K</li>
|
| 656 |
+
</ul>
|
| 657 |
+
|
| 658 |
+
## License
|
| 659 |
+
|
| 660 |
+
DINOv2 code and model weights are released under the Apache License 2.0. See [LICENSE](LICENSE) for additional details.
|
| 661 |
+
|
| 662 |
+
## Contributing
|
| 663 |
+
|
| 664 |
+
See [contributing](CONTRIBUTING.md) and the [code of conduct](CODE_OF_CONDUCT.md).
|
| 665 |
+
|
| 666 |
+
## Citing DINOv2
|
| 667 |
+
|
| 668 |
+
If you find this repository useful, please consider giving a star :star: and citation :t-rex::
|
| 669 |
+
|
| 670 |
+
```
|
| 671 |
+
@misc{oquab2023dinov2,
|
| 672 |
+
title={DINOv2: Learning Robust Visual Features without Supervision},
|
| 673 |
+
author={Oquab, Maxime and Darcet, Timothée and Moutakanni, Theo and Vo, Huy V. and Szafraniec, Marc and Khalidov, Vasil and Fernandez, Pierre and Haziza, Daniel and Massa, Francisco and El-Nouby, Alaaeldin and Howes, Russell and Huang, Po-Yao and Xu, Hu and Sharma, Vasu and Li, Shang-Wen and Galuba, Wojciech and Rabbat, Mike and Assran, Mido and Ballas, Nicolas and Synnaeve, Gabriel and Misra, Ishan and Jegou, Herve and Mairal, Julien and Labatut, Patrick and Joulin, Armand and Bojanowski, Piotr},
|
| 674 |
+
journal={arXiv:2304.07193},
|
| 675 |
+
year={2023}
|
| 676 |
+
}
|
| 677 |
+
```
|
| 678 |
+
|
| 679 |
+
```
|
| 680 |
+
@misc{darcet2023vitneedreg,
|
| 681 |
+
title={Vision Transformers Need Registers},
|
| 682 |
+
author={Darcet, Timothée and Oquab, Maxime and Mairal, Julien and Bojanowski, Piotr},
|
| 683 |
+
journal={arXiv:2309.16588},
|
| 684 |
+
year={2023}
|
| 685 |
+
}
|
| 686 |
+
```
|
| 687 |
+
|
| 688 |
+
```
|
| 689 |
+
@misc{jose2024dinov2meetstextunified,
|
| 690 |
+
title={DINOv2 Meets Text: A Unified Framework for Image- and Pixel-Level Vision-Language Alignment},
|
| 691 |
+
author={Cijo Jose and Théo Moutakanni and Dahyun Kang and Federico Baldassarre and Timothée Darcet and Hu Xu and Daniel Li and Marc Szafraniec and Michaël Ramamonjisoa and Maxime Oquab and Oriane Siméoni and Huy V. Vo and Patrick Labatut and Piotr Bojanowski},
|
| 692 |
+
journal={arXiv:2412.16334},
|
| 693 |
+
year={2024}
|
| 694 |
+
}
|
| 695 |
+
```
|
| 696 |
+
|
| 697 |
+
|
| 698 |
+
# DINOv2 for Biology
|
| 699 |
+
|
| 700 |
+
The contents of the source code contained in the cell_dino folders, including the code and model weights, are intended for research use only. It is not for use in medical procedures, including any diagnostics, treatment, or curative applications. Do not use this model for any clinical purpose or as a substitute for professional medical judgement.
|
| 701 |
+
|
| 702 |
+
|
| 703 |
+
## Scaling Channel-Adaptive Self-Supervised Learning (Channel-Adaptive DINO)
|
| 704 |
+
|
| 705 |
+
[[`Paper `](https://openreview.net/forum?id=pT8sgtRVAf))] [[`BibTeX`](#citing-channeladaptivedino-and-dinov2)]
|
| 706 |
+
|
| 707 |
+
Alice V. De Lorenci, Seungeun Yi, Théo Moutakanni, Piotr Bojanowski, Camille Couprie, Juan C. Caicedo, Wolfgang M. Pernice,
|
| 708 |
+
|
| 709 |
+
with special thanks to Elouan Gardes for his contributions to the codebase.
|
| 710 |
+
|
| 711 |
+
[README](https://github.com/facebookresearch/dinov2/blob/main/docs/README_CHANNEL_ADAPTIVE_DINO.md)
|
| 712 |
+
|
| 713 |
+
|
| 714 |
+
|
| 715 |
+
## Cell-DINO: Self-Supervised Image-based Embeddings for Cell Fluorescent Microscopy (Cell-DINO)
|
| 716 |
+
|
| 717 |
+
Théo Moutakanni, Camille Couprie, Seungeun Yi, Elouan Gardes, Piotr Bojanowski, Hugo Touvron, Michael Doron, Zitong S. Chen, Nikita Moshkov, Mathilde Caron, Armand Joulin, Wolfgang M. Pernice, Juan C. Caicedo
|
| 718 |
+
|
| 719 |
+
to appear soon.
|
| 720 |
+
|
| 721 |
+
[README](https://github.com/facebookresearch/dinov2/blob/main/docs/README_CELL_DINO.md)
|
| 722 |
+
|
| 723 |
+
|
| 724 |
+
## Pretrained models
|
| 725 |
+
|
| 726 |
+
ℹ️ Please follow the link provided below to get access to all the model weights: once accepted, an e-mail will be sent with the complete list of URLs pointing to all the available model weights. These URLs can then be used to either:
|
| 727 |
+
|
| 728 |
+
- download the model or adapter weights to a local filesystem and point `torch.hub.load()` to these local weights via the `pretrained_path` parameters, or
|
| 729 |
+
- directly invoke `torch.hub.load()` to download and load a backbone from its URL via also the `pretrained_url` parameter.
|
| 730 |
+
|
| 731 |
+
⚠️ Please use wget instead of a web browser to download the weights.
|
| 732 |
+
|
| 733 |
+
**Download link:**
|
| 734 |
+
https://ai.meta.com/resources/models-and-libraries/cell-dino-downloads/
|
| 735 |
+
|
| 736 |
+
```python
|
| 737 |
+
import torch
|
| 738 |
+
|
| 739 |
+
REPO_DIR = <PATH/TO/A/LOCAL/DIRECTORY/WHERE/THE/DINOV2/REPO/WAS/CLONED>
|
| 740 |
+
|
| 741 |
+
# You can either download the URL link first, then load:
|
| 742 |
+
cell_dino_vits8 = torch.hub.load(REPO_DIR, 'cell_dino_cp_vits8', source='local', pretrained_path=<CHECKPOINT/PATH>)
|
| 743 |
+
# Or directly download the URL while using `torch.hub.load`:
|
| 744 |
+
cell_dino_vits8 = torch.hub.load(REPO_DIR, 'cell_dino_cp_vits8', source='local', pretrained_url=<CHECKPOINT/URL>)
|
| 745 |
+
|
| 746 |
+
# Similarily for other models:
|
| 747 |
+
cell_dino_vitl16_hpa_sc = torch.hub.load(REPO_DIR, 'cell_dino_hpa_vitl16', source='local', pretrained_path=<CHECKPOINT/PATH>)
|
| 748 |
+
cell_dino_vitl16_hpa_fov = torch.hub.load(REPO_DIR, 'cell_dino_hpa_vitl16', source='local', pretrained_path=<CHECKPOINT/PATH>)
|
| 749 |
+
channel_adaptive_dino_vitl16 = torch.hub.load(REPO_DIR, 'channel_adaptive_dino_vitl16', source='local', pretrained_path=<CHECKPOINT/PATH>)
|
| 750 |
+
cell_dino_vitl14 = torch.hub.load(REPO_DIR, 'cell_dino_hpa_vitl14', source='local', pretrained_path=<CHECKPOINT/PATH>)
|
| 751 |
+
```
|
| 752 |
+
|
| 753 |
+
|
| 754 |
+
## Licenses
|
| 755 |
+
|
| 756 |
+
Code is released under the CC BY NC License. See [LICENSE_CELL_DINO_CODE](LICENSE_CELL_DINO_CODE) for additional details.
|
| 757 |
+
Model weights are released under the FAIR Noncommercial Research License. See [LICENSE_CELL_DINO_CODE_WEIGHTS](LICENSE_CELL_DINO_CODE_WEIGHTS) for additional details.
|
torch_cache/facebookresearch_dinov2_main/__pycache__/hubconf.cpython-310.pyc
ADDED
|
Binary file (1.38 kB). View file
|
|
|
torch_cache/facebookresearch_dinov2_main/conda-extras.yaml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: dinov2-extras
|
| 2 |
+
channels:
|
| 3 |
+
- defaults
|
| 4 |
+
- pytorch
|
| 5 |
+
- nvidia
|
| 6 |
+
- xformers
|
| 7 |
+
- conda-forge
|
| 8 |
+
dependencies:
|
| 9 |
+
- python=3.9
|
| 10 |
+
- pytorch::pytorch=2.0.0
|
| 11 |
+
- pytorch::pytorch-cuda=11.7.0
|
| 12 |
+
- pytorch::torchvision=0.15.0
|
| 13 |
+
- omegaconf
|
| 14 |
+
- torchmetrics=0.10.3
|
| 15 |
+
- fvcore
|
| 16 |
+
- iopath
|
| 17 |
+
- xformers::xformers=0.0.18
|
| 18 |
+
- pip
|
| 19 |
+
- pip:
|
| 20 |
+
- git+https://github.com/facebookincubator/submitit
|
| 21 |
+
- --extra-index-url https://pypi.nvidia.com
|
| 22 |
+
- cuml-cu11
|
| 23 |
+
- mmcv-full==1.5.0
|
| 24 |
+
- mmsegmentation==0.27.0
|
torch_cache/facebookresearch_dinov2_main/conda.yaml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: dinov2
|
| 2 |
+
channels:
|
| 3 |
+
- defaults
|
| 4 |
+
- pytorch
|
| 5 |
+
- nvidia
|
| 6 |
+
- xformers
|
| 7 |
+
- conda-forge
|
| 8 |
+
dependencies:
|
| 9 |
+
- python=3.9
|
| 10 |
+
- pytorch::pytorch=2.0.0
|
| 11 |
+
- pytorch::pytorch-cuda=11.7.0
|
| 12 |
+
- pytorch::torchvision=0.15.0
|
| 13 |
+
- omegaconf
|
| 14 |
+
- torchmetrics=0.10.3
|
| 15 |
+
- fvcore
|
| 16 |
+
- iopath
|
| 17 |
+
- xformers::xformers=0.0.18
|
| 18 |
+
- pip
|
| 19 |
+
- pip:
|
| 20 |
+
- git+https://github.com/facebookincubator/submitit
|
| 21 |
+
- --extra-index-url https://pypi.nvidia.com
|
| 22 |
+
- cuml-cu11
|
torch_cache/facebookresearch_dinov2_main/dinov2/__init__.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 2 |
+
#
|
| 3 |
+
# This source code is licensed under the Apache License, Version 2.0
|
| 4 |
+
# found in the LICENSE file in the root directory of this source tree.
|
| 5 |
+
|
| 6 |
+
__version__ = "0.0.1"
|
torch_cache/facebookresearch_dinov2_main/dinov2/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (256 Bytes). View file
|
|
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/__init__.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 2 |
+
#
|
| 3 |
+
# This source code is licensed under the Apache License, Version 2.0
|
| 4 |
+
# found in the LICENSE file in the root directory of this source tree.
|
| 5 |
+
|
| 6 |
+
import pathlib
|
| 7 |
+
|
| 8 |
+
from omegaconf import OmegaConf
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def load_config(config_name: str):
|
| 12 |
+
config_filename = config_name + ".yaml"
|
| 13 |
+
return OmegaConf.load(pathlib.Path(__file__).parent.resolve() / config_filename)
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
dinov2_default_config = load_config("ssl_default_config")
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def load_and_merge_config(config_name: str):
|
| 20 |
+
default_config = OmegaConf.create(dinov2_default_config)
|
| 21 |
+
loaded_config = load_config(config_name)
|
| 22 |
+
return OmegaConf.merge(default_config, loaded_config)
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/cell_dino/vitl16_channel_adaptive_pretrain.yaml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
train:
|
| 2 |
+
batch_size_per_gpu: 32
|
| 3 |
+
OFFICIAL_EPOCH_LENGTH: 450
|
| 4 |
+
cell_augmentation: true
|
| 5 |
+
channel_adaptive: true
|
| 6 |
+
student:
|
| 7 |
+
arch: vit_large
|
| 8 |
+
patch_size: 16
|
| 9 |
+
num_register_tokens: 0
|
| 10 |
+
interpolate_antialias: false
|
| 11 |
+
interpolate_offset: 0.1
|
| 12 |
+
drop_path_rate: 0.1
|
| 13 |
+
in_chans: 1
|
| 14 |
+
block_chunks: 4
|
| 15 |
+
channel_adaptive: true
|
| 16 |
+
teacher:
|
| 17 |
+
momentum_teacher: 0.996
|
| 18 |
+
warmup_teacher_temp_epochs: 20
|
| 19 |
+
in_chans: 1
|
| 20 |
+
channel_adaptive: true
|
| 21 |
+
crops:
|
| 22 |
+
global_crops_scale:
|
| 23 |
+
- 0.4
|
| 24 |
+
- 1.0
|
| 25 |
+
local_crops_number: 8
|
| 26 |
+
local_crops_scale:
|
| 27 |
+
- 0.005
|
| 28 |
+
- 0.4
|
| 29 |
+
global_crops_size: 224
|
| 30 |
+
local_crops_size: 96
|
| 31 |
+
optim:
|
| 32 |
+
weight_decay_end: 0.2
|
| 33 |
+
base_lr: 5.0e-4
|
| 34 |
+
warmup_epochs: 20
|
| 35 |
+
epochs: 400
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/cell_dino/vitl16_pretrain.yaml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
student:
|
| 2 |
+
arch: vit_large
|
| 3 |
+
patch_size: 16
|
| 4 |
+
num_register_tokens: 0
|
| 5 |
+
interpolate_antialias: false
|
| 6 |
+
interpolate_offset: 0.1
|
| 7 |
+
drop_path_rate: 0.1
|
| 8 |
+
in_chans: 4
|
| 9 |
+
block_chunks: 4
|
| 10 |
+
teacher:
|
| 11 |
+
in_chans: 4
|
| 12 |
+
crops:
|
| 13 |
+
global_crops_size: 224
|
| 14 |
+
local_crops_size: 96
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitb14_pretrain.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
student:
|
| 2 |
+
arch: vit_base
|
| 3 |
+
patch_size: 14
|
| 4 |
+
crops:
|
| 5 |
+
global_crops_size: 518 # this is to set up the position embeddings properly
|
| 6 |
+
local_crops_size: 98
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitb14_reg4_pretrain.yaml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
student:
|
| 2 |
+
arch: vit_base
|
| 3 |
+
patch_size: 14
|
| 4 |
+
num_register_tokens: 4
|
| 5 |
+
interpolate_antialias: true
|
| 6 |
+
interpolate_offset: 0.0
|
| 7 |
+
crops:
|
| 8 |
+
global_crops_size: 518 # this is to set up the position embeddings properly
|
| 9 |
+
local_crops_size: 98
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitg14_pretrain.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
student:
|
| 2 |
+
arch: vit_giant2
|
| 3 |
+
patch_size: 14
|
| 4 |
+
ffn_layer: swiglufused
|
| 5 |
+
crops:
|
| 6 |
+
global_crops_size: 518 # this is to set up the position embeddings properly
|
| 7 |
+
local_crops_size: 98
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitg14_reg4_pretrain.yaml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
student:
|
| 2 |
+
arch: vit_giant2
|
| 3 |
+
patch_size: 14
|
| 4 |
+
ffn_layer: swiglufused
|
| 5 |
+
num_register_tokens: 4
|
| 6 |
+
interpolate_antialias: true
|
| 7 |
+
interpolate_offset: 0.0
|
| 8 |
+
crops:
|
| 9 |
+
global_crops_size: 518 # this is to set up the position embeddings properly
|
| 10 |
+
local_crops_size: 98
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitl14_pretrain.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
student:
|
| 2 |
+
arch: vit_large
|
| 3 |
+
patch_size: 14
|
| 4 |
+
crops:
|
| 5 |
+
global_crops_size: 518 # this is to set up the position embeddings properly
|
| 6 |
+
local_crops_size: 98
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vitl14_reg4_pretrain.yaml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
student:
|
| 2 |
+
arch: vit_large
|
| 3 |
+
patch_size: 14
|
| 4 |
+
num_register_tokens: 4
|
| 5 |
+
interpolate_antialias: true
|
| 6 |
+
interpolate_offset: 0.0
|
| 7 |
+
crops:
|
| 8 |
+
global_crops_size: 518 # this is to set up the position embeddings properly
|
| 9 |
+
local_crops_size: 98
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vits14_pretrain.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
student:
|
| 2 |
+
arch: vit_small
|
| 3 |
+
patch_size: 14
|
| 4 |
+
crops:
|
| 5 |
+
global_crops_size: 518 # this is to set up the position embeddings properly
|
| 6 |
+
local_crops_size: 98
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/eval/vits14_reg4_pretrain.yaml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
student:
|
| 2 |
+
arch: vit_small
|
| 3 |
+
patch_size: 14
|
| 4 |
+
num_register_tokens: 4
|
| 5 |
+
interpolate_antialias: true
|
| 6 |
+
interpolate_offset: 0.0
|
| 7 |
+
crops:
|
| 8 |
+
global_crops_size: 518 # this is to set up the position embeddings properly
|
| 9 |
+
local_crops_size: 98
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/ssl_default_config.yaml
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MODEL:
|
| 2 |
+
WEIGHTS: ''
|
| 3 |
+
compute_precision:
|
| 4 |
+
grad_scaler: true
|
| 5 |
+
teacher:
|
| 6 |
+
backbone:
|
| 7 |
+
sharding_strategy: SHARD_GRAD_OP
|
| 8 |
+
mixed_precision:
|
| 9 |
+
param_dtype: fp16
|
| 10 |
+
reduce_dtype: fp16
|
| 11 |
+
buffer_dtype: fp32
|
| 12 |
+
dino_head:
|
| 13 |
+
sharding_strategy: SHARD_GRAD_OP
|
| 14 |
+
mixed_precision:
|
| 15 |
+
param_dtype: fp16
|
| 16 |
+
reduce_dtype: fp16
|
| 17 |
+
buffer_dtype: fp32
|
| 18 |
+
ibot_head:
|
| 19 |
+
sharding_strategy: SHARD_GRAD_OP
|
| 20 |
+
mixed_precision:
|
| 21 |
+
param_dtype: fp16
|
| 22 |
+
reduce_dtype: fp16
|
| 23 |
+
buffer_dtype: fp32
|
| 24 |
+
student:
|
| 25 |
+
backbone:
|
| 26 |
+
sharding_strategy: SHARD_GRAD_OP
|
| 27 |
+
mixed_precision:
|
| 28 |
+
param_dtype: fp16
|
| 29 |
+
reduce_dtype: fp16
|
| 30 |
+
buffer_dtype: fp32
|
| 31 |
+
dino_head:
|
| 32 |
+
sharding_strategy: SHARD_GRAD_OP
|
| 33 |
+
mixed_precision:
|
| 34 |
+
param_dtype: fp16
|
| 35 |
+
reduce_dtype: fp32
|
| 36 |
+
buffer_dtype: fp32
|
| 37 |
+
ibot_head:
|
| 38 |
+
sharding_strategy: SHARD_GRAD_OP
|
| 39 |
+
mixed_precision:
|
| 40 |
+
param_dtype: fp16
|
| 41 |
+
reduce_dtype: fp32
|
| 42 |
+
buffer_dtype: fp32
|
| 43 |
+
dino:
|
| 44 |
+
loss_weight: 1.0
|
| 45 |
+
head_n_prototypes: 65536
|
| 46 |
+
head_bottleneck_dim: 256
|
| 47 |
+
head_nlayers: 3
|
| 48 |
+
head_hidden_dim: 2048
|
| 49 |
+
koleo_loss_weight: 0.1
|
| 50 |
+
ibot:
|
| 51 |
+
loss_weight: 1.0
|
| 52 |
+
mask_sample_probability: 0.5
|
| 53 |
+
mask_ratio_min_max:
|
| 54 |
+
- 0.1
|
| 55 |
+
- 0.5
|
| 56 |
+
separate_head: false
|
| 57 |
+
head_n_prototypes: 65536
|
| 58 |
+
head_bottleneck_dim: 256
|
| 59 |
+
head_nlayers: 3
|
| 60 |
+
head_hidden_dim: 2048
|
| 61 |
+
train:
|
| 62 |
+
batch_size_per_gpu: 64
|
| 63 |
+
dataset_path: ImageNet:split=TRAIN
|
| 64 |
+
output_dir: .
|
| 65 |
+
saveckp_freq: 20
|
| 66 |
+
seed: 0
|
| 67 |
+
num_workers: 10
|
| 68 |
+
OFFICIAL_EPOCH_LENGTH: 1250
|
| 69 |
+
cache_dataset: true
|
| 70 |
+
centering: "centering" # or "sinkhorn_knopp"
|
| 71 |
+
cell_augmentation: false
|
| 72 |
+
student:
|
| 73 |
+
arch: vit_large
|
| 74 |
+
patch_size: 16
|
| 75 |
+
drop_path_rate: 0.3
|
| 76 |
+
layerscale: 1.0e-05
|
| 77 |
+
drop_path_uniform: true
|
| 78 |
+
pretrained_weights: ''
|
| 79 |
+
ffn_layer: "mlp"
|
| 80 |
+
block_chunks: 0
|
| 81 |
+
qkv_bias: true
|
| 82 |
+
proj_bias: true
|
| 83 |
+
ffn_bias: true
|
| 84 |
+
num_register_tokens: 0
|
| 85 |
+
interpolate_antialias: false
|
| 86 |
+
interpolate_offset: 0.1
|
| 87 |
+
in_chans: 3
|
| 88 |
+
channel_adaptive: false
|
| 89 |
+
teacher:
|
| 90 |
+
momentum_teacher: 0.992
|
| 91 |
+
final_momentum_teacher: 1
|
| 92 |
+
warmup_teacher_temp: 0.04
|
| 93 |
+
teacher_temp: 0.07
|
| 94 |
+
warmup_teacher_temp_epochs: 30
|
| 95 |
+
in_chans: 3
|
| 96 |
+
channel_adaptive: false
|
| 97 |
+
optim:
|
| 98 |
+
epochs: 100
|
| 99 |
+
weight_decay: 0.04
|
| 100 |
+
weight_decay_end: 0.4
|
| 101 |
+
base_lr: 0.004 # learning rate for a batch size of 1024
|
| 102 |
+
lr: 0. # will be set after applying scaling rule
|
| 103 |
+
warmup_epochs: 10
|
| 104 |
+
min_lr: 1.0e-06
|
| 105 |
+
clip_grad: 3.0
|
| 106 |
+
freeze_last_layer_epochs: 1
|
| 107 |
+
scaling_rule: sqrt_wrt_1024
|
| 108 |
+
patch_embed_lr_mult: 0.2
|
| 109 |
+
layerwise_decay: 0.9
|
| 110 |
+
adamw_beta1: 0.9
|
| 111 |
+
adamw_beta2: 0.999
|
| 112 |
+
crops:
|
| 113 |
+
global_crops_scale:
|
| 114 |
+
- 0.32
|
| 115 |
+
- 1.0
|
| 116 |
+
local_crops_number: 8
|
| 117 |
+
local_crops_scale:
|
| 118 |
+
- 0.05
|
| 119 |
+
- 0.32
|
| 120 |
+
global_crops_size: 224
|
| 121 |
+
local_crops_size: 96
|
| 122 |
+
evaluation:
|
| 123 |
+
eval_period_iterations: 12500
|
torch_cache/facebookresearch_dinov2_main/dinov2/configs/train/cell_dino/vitl16_boc_hpafov.yaml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
train:
|
| 2 |
+
batch_size_per_gpu: 16
|
| 3 |
+
OFFICIAL_EPOCH_LENGTH: 450
|
| 4 |
+
cell_augmentation: true
|
| 5 |
+
channel_adaptive: true
|
| 6 |
+
student:
|
| 7 |
+
arch: vit_large
|
| 8 |
+
patch_size: 16
|
| 9 |
+
in_chans: 1
|
| 10 |
+
drop_path_rate: 0.1
|
| 11 |
+
block_chunks: 4
|
| 12 |
+
teacher:
|
| 13 |
+
momentum_teacher: 0.996
|
| 14 |
+
warmup_teacher_temp_epochs: 20
|
| 15 |
+
in_chans: 1
|
| 16 |
+
crops:
|
| 17 |
+
global_crops_scale:
|
| 18 |
+
- 0.4
|
| 19 |
+
- 1.0
|
| 20 |
+
local_crops_number: 8
|
| 21 |
+
local_crops_scale:
|
| 22 |
+
- 0.005
|
| 23 |
+
- 0.4
|
| 24 |
+
global_crops_size: 224
|
| 25 |
+
local_crops_size: 96
|
| 26 |
+
optim:
|
| 27 |
+
weight_decay_end: 0.2
|
| 28 |
+
base_lr: 5.0e-4
|
| 29 |
+
warmup_epochs: 20
|
| 30 |
+
epochs: 400
|
| 31 |
+
|