Instructions to use facebook/sapiens2-normal-5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sapiens2
How to use facebook/sapiens2-normal-5b 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-normal-5b 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-normal-5b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("depth-estimation", model="facebook/sapiens2-normal-5b")# Load model directly from transformers import AutoImageProcessor, Sapiens2ForNormalEstimation processor = AutoImageProcessor.from_pretrained("facebook/sapiens2-normal-5b") model = Sapiens2ForNormalEstimation.from_pretrained("facebook/sapiens2-normal-5b") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "Sapiens2ForNormalEstimation" | |
| ], | |
| "attention_dropout": 0.0, | |
| "drop_path_rate": 0.0, | |
| "flip_pairs": null, | |
| "head_config": { | |
| "_name_or_path": "", | |
| "architectures": null, | |
| "chunk_size_feed_forward": 0, | |
| "conv_kernel_size": 1, | |
| "conv_kernel_sizes": [ | |
| 3, | |
| 3, | |
| 3 | |
| ], | |
| "conv_out_channels": [ | |
| 128, | |
| 64, | |
| 32 | |
| ], | |
| "dtype": null, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "model_type": "sapiens2_head", | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "problem_type": null, | |
| "return_dict": true, | |
| "scale_conv_kernel_size": 1, | |
| "scale_conv_kernel_sizes": null, | |
| "scale_conv_out_channels": null, | |
| "scale_final_hidden_sizes": null, | |
| "scale_final_input_size": null, | |
| "upsample_kernel_size": 4, | |
| "upsample_kernel_sizes": [ | |
| 3, | |
| 3, | |
| 3, | |
| 3 | |
| ], | |
| "upsample_out_channels": [ | |
| 1536, | |
| 768, | |
| 512, | |
| 256 | |
| ], | |
| "use_pixel_shuffle": true | |
| }, | |
| "hidden_act": "silu", | |
| "hidden_size": 2432, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1", | |
| "2": "LABEL_2" | |
| }, | |
| "image_size": [ | |
| 1024, | |
| 768 | |
| ], | |
| "initializer_range": 0.02, | |
| "intermediate_size": 9728, | |
| "key_bias": true, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1, | |
| "LABEL_2": 2 | |
| }, | |
| "layerscale_value": 1.0, | |
| "mlp_bias": true, | |
| "model_type": "sapiens2", | |
| "normalize_backbone_outputs": true, | |
| "num_attention_heads": 32, | |
| "num_channels": 3, | |
| "num_first_full_attention_layers": 8, | |
| "num_hidden_layers": 56, | |
| "num_key_value_attention_heads": 16, | |
| "num_key_value_heads_per_layer": [ | |
| 32, | |
| 32, | |
| 32, | |
| 32, | |
| 32, | |
| 32, | |
| 32, | |
| 32, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 16, | |
| 32, | |
| 32, | |
| 32, | |
| 32, | |
| 32, | |
| 32, | |
| 32, | |
| 32 | |
| ], | |
| "num_last_full_attention_layers": 8, | |
| "num_register_tokens": 8, | |
| "out_features": [ | |
| "stage56" | |
| ], | |
| "out_indices": [ | |
| 56 | |
| ], | |
| "patch_size": 16, | |
| "pos_embed_jitter": null, | |
| "pos_embed_rescale": 2.0, | |
| "pos_embed_shift": null, | |
| "proj_bias": true, | |
| "query_bias": true, | |
| "reshape_hidden_states": true, | |
| "rms_norm_eps": 1e-06, | |
| "rope_theta": 100.0, | |
| "semantic_loss_ignore_index": 255, | |
| "stage_names": [ | |
| "stem", | |
| "stage1", | |
| "stage2", | |
| "stage3", | |
| "stage4", | |
| "stage5", | |
| "stage6", | |
| "stage7", | |
| "stage8", | |
| "stage9", | |
| "stage10", | |
| "stage11", | |
| "stage12", | |
| "stage13", | |
| "stage14", | |
| "stage15", | |
| "stage16", | |
| "stage17", | |
| "stage18", | |
| "stage19", | |
| "stage20", | |
| "stage21", | |
| "stage22", | |
| "stage23", | |
| "stage24", | |
| "stage25", | |
| "stage26", | |
| "stage27", | |
| "stage28", | |
| "stage29", | |
| "stage30", | |
| "stage31", | |
| "stage32", | |
| "stage33", | |
| "stage34", | |
| "stage35", | |
| "stage36", | |
| "stage37", | |
| "stage38", | |
| "stage39", | |
| "stage40", | |
| "stage41", | |
| "stage42", | |
| "stage43", | |
| "stage44", | |
| "stage45", | |
| "stage46", | |
| "stage47", | |
| "stage48", | |
| "stage49", | |
| "stage50", | |
| "stage51", | |
| "stage52", | |
| "stage53", | |
| "stage54", | |
| "stage55", | |
| "stage56" | |
| ], | |
| "transformers_version": "5.10.0.dev0", | |
| "use_gated_mlp": true, | |
| "use_mask_token": false, | |
| "use_qk_norm": true, | |
| "value_bias": true | |
| } | |