Instructions to use nguyenkhoa/dinov2_Liveness_detection_v2.2.3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nguyenkhoa/dinov2_Liveness_detection_v2.2.3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="nguyenkhoa/dinov2_Liveness_detection_v2.2.3") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("nguyenkhoa/dinov2_Liveness_detection_v2.2.3") model = AutoModelForImageClassification.from_pretrained("nguyenkhoa/dinov2_Liveness_detection_v2.2.3") - Notebooks
- Google Colab
- Kaggle
Training in progress, step 64
Browse files
config.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "nguyenkhoa/dinov2_Liveness_detection_v2.2.2",
|
| 3 |
+
"apply_layernorm": true,
|
| 4 |
+
"architectures": [
|
| 5 |
+
"Dinov2ForImageClassification"
|
| 6 |
+
],
|
| 7 |
+
"attention_probs_dropout_prob": 0.0,
|
| 8 |
+
"drop_path_rate": 0.0,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.0,
|
| 11 |
+
"hidden_size": 384,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "live",
|
| 14 |
+
"1": "spoof"
|
| 15 |
+
},
|
| 16 |
+
"image_size": 518,
|
| 17 |
+
"initializer_range": 0.02,
|
| 18 |
+
"label2id": {
|
| 19 |
+
"live": 0,
|
| 20 |
+
"spoof": 1
|
| 21 |
+
},
|
| 22 |
+
"layer_norm_eps": 1e-06,
|
| 23 |
+
"layerscale_value": 1.0,
|
| 24 |
+
"mlp_ratio": 4,
|
| 25 |
+
"model_type": "dinov2",
|
| 26 |
+
"num_attention_heads": 6,
|
| 27 |
+
"num_channels": 3,
|
| 28 |
+
"num_hidden_layers": 12,
|
| 29 |
+
"out_features": [
|
| 30 |
+
"stage12"
|
| 31 |
+
],
|
| 32 |
+
"out_indices": [
|
| 33 |
+
12
|
| 34 |
+
],
|
| 35 |
+
"patch_size": 14,
|
| 36 |
+
"problem_type": "single_label_classification",
|
| 37 |
+
"qkv_bias": true,
|
| 38 |
+
"reshape_hidden_states": true,
|
| 39 |
+
"stage_names": [
|
| 40 |
+
"stem",
|
| 41 |
+
"stage1",
|
| 42 |
+
"stage2",
|
| 43 |
+
"stage3",
|
| 44 |
+
"stage4",
|
| 45 |
+
"stage5",
|
| 46 |
+
"stage6",
|
| 47 |
+
"stage7",
|
| 48 |
+
"stage8",
|
| 49 |
+
"stage9",
|
| 50 |
+
"stage10",
|
| 51 |
+
"stage11",
|
| 52 |
+
"stage12"
|
| 53 |
+
],
|
| 54 |
+
"torch_dtype": "float32",
|
| 55 |
+
"transformers_version": "4.47.0",
|
| 56 |
+
"use_swiglu_ffn": false
|
| 57 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b76bc7511f749607db65aa11c1d2f9402525efad39ed21a9e159f8eb9c07d982
|
| 3 |
+
size 88257824
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_size": {
|
| 3 |
+
"height": 112,
|
| 4 |
+
"width": 112
|
| 5 |
+
},
|
| 6 |
+
"do_center_crop": true,
|
| 7 |
+
"do_convert_rgb": true,
|
| 8 |
+
"do_normalize": true,
|
| 9 |
+
"do_rescale": true,
|
| 10 |
+
"do_resize": true,
|
| 11 |
+
"image_mean": [
|
| 12 |
+
0.485,
|
| 13 |
+
0.456,
|
| 14 |
+
0.406
|
| 15 |
+
],
|
| 16 |
+
"image_processor_type": "BitImageProcessor",
|
| 17 |
+
"image_std": [
|
| 18 |
+
0.229,
|
| 19 |
+
0.224,
|
| 20 |
+
0.225
|
| 21 |
+
],
|
| 22 |
+
"resample": 3,
|
| 23 |
+
"rescale_factor": 0.00392156862745098,
|
| 24 |
+
"size": {
|
| 25 |
+
"shortest_edge": 112
|
| 26 |
+
}
|
| 27 |
+
}
|
runs/Jan23_07-23-59_e157cb7906f9/events.out.tfevents.1737617046.e157cb7906f9.18.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f0462ff53fb620cc89a466ee9b530ede23c11e10a8a19130091f1708016d5b3
|
| 3 |
+
size 6244
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4d5004cc5a618215840a424b0fa3f745b1654433d7970fb1f2f8cbe5aa2436b
|
| 3 |
+
size 5368
|