Image Feature Extraction
sapiens2
Safetensors
sapiens
Transformers
feature-extraction
vision-transformer
human-centric
pretrained-backbone
Instructions to use facebook/sapiens2-pretrain-0.8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sapiens2
How to use facebook/sapiens2-pretrain-0.8b with sapiens2:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- sapiens
How to use facebook/sapiens2-pretrain-0.8b with sapiens:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Transformers
How to use facebook/sapiens2-pretrain-0.8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="facebook/sapiens2-pretrain-0.8b")# Load model directly from transformers import AutoImageProcessor, AutoModel processor = AutoImageProcessor.from_pretrained("facebook/sapiens2-pretrain-0.8b") model = AutoModel.from_pretrained("facebook/sapiens2-pretrain-0.8b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
fd1847f
1
Parent(s): bca95d5
Add HF-compatible model.safetensors, config.json, and preprocessor_config.json (#1)
Browse files- Add HF-compatible model.safetensors, config.json, and preprocessor_config.json (79ffb93cbb7df21dc438ae65d44a17eee5572b94)
- Remove 'pos_embed_dtype' from config.json (36bdd797f88b943ae172c605d54b81e902c5d488)
- Update config.json and preprocessor_config.json (bf434fec1bd22de78ff7c4a709dcb5a290dcb492)
- Update config.json and preprocessor_config.json (9120dd1a05a7f30756501b7af274a0b42b95bd9d)
Co-authored-by: guarin <guarin@users.noreply.huggingface.co>
- config.json +121 -0
- model.safetensors +3 -0
- preprocessor_config.json +29 -0
config.json
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"apply_layernorm": true,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Sapiens2Model"
|
| 5 |
+
],
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"drop_path_rate": 0.0,
|
| 8 |
+
"flip_pairs": null,
|
| 9 |
+
"head_config": null,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 1280,
|
| 12 |
+
"image_size": [
|
| 13 |
+
1024,
|
| 14 |
+
768
|
| 15 |
+
],
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 5120,
|
| 18 |
+
"key_bias": true,
|
| 19 |
+
"layer_norm_eps": 1e-05,
|
| 20 |
+
"layerscale_value": 1.0,
|
| 21 |
+
"mlp_bias": true,
|
| 22 |
+
"model_type": "sapiens2",
|
| 23 |
+
"normalize_backbone_outputs": true,
|
| 24 |
+
"num_attention_heads": 16,
|
| 25 |
+
"num_channels": 3,
|
| 26 |
+
"num_first_full_attention_layers": 8,
|
| 27 |
+
"num_hidden_layers": 32,
|
| 28 |
+
"num_key_value_attention_heads": 8,
|
| 29 |
+
"num_key_value_heads_per_layer": [
|
| 30 |
+
16,
|
| 31 |
+
16,
|
| 32 |
+
16,
|
| 33 |
+
16,
|
| 34 |
+
16,
|
| 35 |
+
16,
|
| 36 |
+
16,
|
| 37 |
+
16,
|
| 38 |
+
8,
|
| 39 |
+
8,
|
| 40 |
+
8,
|
| 41 |
+
8,
|
| 42 |
+
8,
|
| 43 |
+
8,
|
| 44 |
+
8,
|
| 45 |
+
8,
|
| 46 |
+
8,
|
| 47 |
+
8,
|
| 48 |
+
8,
|
| 49 |
+
8,
|
| 50 |
+
8,
|
| 51 |
+
8,
|
| 52 |
+
8,
|
| 53 |
+
8,
|
| 54 |
+
16,
|
| 55 |
+
16,
|
| 56 |
+
16,
|
| 57 |
+
16,
|
| 58 |
+
16,
|
| 59 |
+
16,
|
| 60 |
+
16,
|
| 61 |
+
16
|
| 62 |
+
],
|
| 63 |
+
"num_last_full_attention_layers": 8,
|
| 64 |
+
"num_register_tokens": 8,
|
| 65 |
+
"out_features": [
|
| 66 |
+
"stage32"
|
| 67 |
+
],
|
| 68 |
+
"out_indices": [
|
| 69 |
+
32
|
| 70 |
+
],
|
| 71 |
+
"patch_size": 16,
|
| 72 |
+
"pos_embed_jitter": null,
|
| 73 |
+
"pos_embed_rescale": 2.0,
|
| 74 |
+
"pos_embed_shift": null,
|
| 75 |
+
"proj_bias": true,
|
| 76 |
+
"query_bias": true,
|
| 77 |
+
"reshape_hidden_states": true,
|
| 78 |
+
"rms_norm_eps": 1e-06,
|
| 79 |
+
"rope_theta": 100.0,
|
| 80 |
+
"semantic_loss_ignore_index": 255,
|
| 81 |
+
"stage_names": [
|
| 82 |
+
"stem",
|
| 83 |
+
"stage1",
|
| 84 |
+
"stage2",
|
| 85 |
+
"stage3",
|
| 86 |
+
"stage4",
|
| 87 |
+
"stage5",
|
| 88 |
+
"stage6",
|
| 89 |
+
"stage7",
|
| 90 |
+
"stage8",
|
| 91 |
+
"stage9",
|
| 92 |
+
"stage10",
|
| 93 |
+
"stage11",
|
| 94 |
+
"stage12",
|
| 95 |
+
"stage13",
|
| 96 |
+
"stage14",
|
| 97 |
+
"stage15",
|
| 98 |
+
"stage16",
|
| 99 |
+
"stage17",
|
| 100 |
+
"stage18",
|
| 101 |
+
"stage19",
|
| 102 |
+
"stage20",
|
| 103 |
+
"stage21",
|
| 104 |
+
"stage22",
|
| 105 |
+
"stage23",
|
| 106 |
+
"stage24",
|
| 107 |
+
"stage25",
|
| 108 |
+
"stage26",
|
| 109 |
+
"stage27",
|
| 110 |
+
"stage28",
|
| 111 |
+
"stage29",
|
| 112 |
+
"stage30",
|
| 113 |
+
"stage31",
|
| 114 |
+
"stage32"
|
| 115 |
+
],
|
| 116 |
+
"transformers_version": "5.10.0.dev0",
|
| 117 |
+
"use_gated_mlp": true,
|
| 118 |
+
"use_mask_token": false,
|
| 119 |
+
"use_qk_norm": true,
|
| 120 |
+
"value_bias": true
|
| 121 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a628d3e56aec159ceb95892bc6a594bd890fd703b2184b49dd404566286ea8cc
|
| 3 |
+
size 3257187528
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_size": {
|
| 3 |
+
"height": 224,
|
| 4 |
+
"width": 224
|
| 5 |
+
},
|
| 6 |
+
"do_center_crop": false,
|
| 7 |
+
"do_normalize": true,
|
| 8 |
+
"do_pad": false,
|
| 9 |
+
"do_reduce_labels": false,
|
| 10 |
+
"do_rescale": true,
|
| 11 |
+
"do_resize": true,
|
| 12 |
+
"image_mean": [
|
| 13 |
+
0.485,
|
| 14 |
+
0.456,
|
| 15 |
+
0.406
|
| 16 |
+
],
|
| 17 |
+
"image_processor_type": "Sapiens2ImageProcessor",
|
| 18 |
+
"image_std": [
|
| 19 |
+
0.229,
|
| 20 |
+
0.224,
|
| 21 |
+
0.225
|
| 22 |
+
],
|
| 23 |
+
"resample": 2,
|
| 24 |
+
"rescale_factor": 0.00392156862745098,
|
| 25 |
+
"size": {
|
| 26 |
+
"height": 1024,
|
| 27 |
+
"width": 768
|
| 28 |
+
}
|
| 29 |
+
}
|