How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-classification", model="hungdang1610/gender")
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("hungdang1610/gender")
model = AutoModelForImageClassification.from_pretrained("hungdang1610/gender", device_map="auto")
Quick Links

tags:

  • image-classification
  • pytorch metrics:
  • accuracy

model-index: - name: gender-classification results: - task: name: Image Classification type: image-classification metrics: - name: Accuracy type: accuracy value: 0.970833

gender-classification

Evaluate set: 240 unseen images, from 27/05-29/05 from ShotX, no duplicate, clean, 120 male and 120 female. Loss function is CrossEntropy. Model finetuning on 1827 images from 15/05-21/05 from ShotX, base on rizvandwiki/gender-classification. . Using AdamW optimizer, weight_decay=0.05, CosineAnnealingLR scheduler, learning rate 5e-6, 20 epochs.

    accuracy    loss

    0.970833    0.102212   

Example Images

female

female

male

male

Downloads last month
229
Safetensors
Model size
85.8M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support