Image Classification
Transformers
PyTorch
TensorBoard
Safetensors
vit
huggingpics
Eval Results (legacy)
Instructions to use sgdkn/gender-classification-hp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sgdkn/gender-classification-hp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="sgdkn/gender-classification-hp") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("sgdkn/gender-classification-hp") model = AutoModelForImageClassification.from_pretrained("sgdkn/gender-classification-hp", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload 4 files
Browse files- config.json +30 -32
- model.safetensors +2 -2
- preprocessor_config.json +36 -36
config.json
CHANGED
|
@@ -1,32 +1,30 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_name_or_path": "google/vit-base-patch16-224-in21k",
|
| 3 |
-
"architectures": [
|
| 4 |
-
"ViTForImageClassification"
|
| 5 |
-
],
|
| 6 |
-
"attention_probs_dropout_prob": 0.0,
|
| 7 |
-
"encoder_stride": 16,
|
| 8 |
-
"hidden_act": "gelu",
|
| 9 |
-
"hidden_dropout_prob": 0.0,
|
| 10 |
-
"hidden_size": 768,
|
| 11 |
-
"id2label": {
|
| 12 |
-
"0": "
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
"
|
| 16 |
-
"
|
| 17 |
-
"
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"
|
| 26 |
-
"
|
| 27 |
-
"
|
| 28 |
-
"
|
| 29 |
-
"
|
| 30 |
-
|
| 31 |
-
"transformers_version": "4.41.2"
|
| 32 |
-
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "google/vit-base-patch16-224-in21k",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"ViTForImageClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.0,
|
| 7 |
+
"encoder_stride": 16,
|
| 8 |
+
"hidden_act": "gelu",
|
| 9 |
+
"hidden_dropout_prob": 0.0,
|
| 10 |
+
"hidden_size": 768,
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "adult"
|
| 13 |
+
},
|
| 14 |
+
"image_size": 224,
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"intermediate_size": 3072,
|
| 17 |
+
"label2id": {
|
| 18 |
+
"adult": "0"
|
| 19 |
+
},
|
| 20 |
+
"layer_norm_eps": 1e-12,
|
| 21 |
+
"model_type": "vit",
|
| 22 |
+
"num_attention_heads": 12,
|
| 23 |
+
"num_channels": 3,
|
| 24 |
+
"num_hidden_layers": 12,
|
| 25 |
+
"patch_size": 16,
|
| 26 |
+
"problem_type": "regression",
|
| 27 |
+
"qkv_bias": true,
|
| 28 |
+
"torch_dtype": "float32",
|
| 29 |
+
"transformers_version": "4.41.2"
|
| 30 |
+
}
|
|
|
|
|
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:13c9625ed0ca285e2081f2c15acffb9488d86c4f6633cd672f07f7b51c032d21
|
| 3 |
+
size 343220892
|
preprocessor_config.json
CHANGED
|
@@ -1,36 +1,36 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_valid_processor_keys": [
|
| 3 |
-
"images",
|
| 4 |
-
"do_resize",
|
| 5 |
-
"size",
|
| 6 |
-
"resample",
|
| 7 |
-
"do_rescale",
|
| 8 |
-
"rescale_factor",
|
| 9 |
-
"do_normalize",
|
| 10 |
-
"image_mean",
|
| 11 |
-
"image_std",
|
| 12 |
-
"return_tensors",
|
| 13 |
-
"data_format",
|
| 14 |
-
"input_data_format"
|
| 15 |
-
],
|
| 16 |
-
"do_normalize": true,
|
| 17 |
-
"do_rescale": true,
|
| 18 |
-
"do_resize": true,
|
| 19 |
-
"image_mean": [
|
| 20 |
-
0.5,
|
| 21 |
-
0.5,
|
| 22 |
-
0.5
|
| 23 |
-
],
|
| 24 |
-
"image_processor_type": "ViTFeatureExtractor",
|
| 25 |
-
"image_std": [
|
| 26 |
-
0.5,
|
| 27 |
-
0.5,
|
| 28 |
-
0.5
|
| 29 |
-
],
|
| 30 |
-
"resample": 2,
|
| 31 |
-
"rescale_factor": 0.00392156862745098,
|
| 32 |
-
"size": {
|
| 33 |
-
"height": 224,
|
| 34 |
-
"width": 224
|
| 35 |
-
}
|
| 36 |
-
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_valid_processor_keys": [
|
| 3 |
+
"images",
|
| 4 |
+
"do_resize",
|
| 5 |
+
"size",
|
| 6 |
+
"resample",
|
| 7 |
+
"do_rescale",
|
| 8 |
+
"rescale_factor",
|
| 9 |
+
"do_normalize",
|
| 10 |
+
"image_mean",
|
| 11 |
+
"image_std",
|
| 12 |
+
"return_tensors",
|
| 13 |
+
"data_format",
|
| 14 |
+
"input_data_format"
|
| 15 |
+
],
|
| 16 |
+
"do_normalize": true,
|
| 17 |
+
"do_rescale": true,
|
| 18 |
+
"do_resize": true,
|
| 19 |
+
"image_mean": [
|
| 20 |
+
0.5,
|
| 21 |
+
0.5,
|
| 22 |
+
0.5
|
| 23 |
+
],
|
| 24 |
+
"image_processor_type": "ViTFeatureExtractor",
|
| 25 |
+
"image_std": [
|
| 26 |
+
0.5,
|
| 27 |
+
0.5,
|
| 28 |
+
0.5
|
| 29 |
+
],
|
| 30 |
+
"resample": 2,
|
| 31 |
+
"rescale_factor": 0.00392156862745098,
|
| 32 |
+
"size": {
|
| 33 |
+
"height": 224,
|
| 34 |
+
"width": 224
|
| 35 |
+
}
|
| 36 |
+
}
|