Run this model with HF Jobs
Run dima806/faces_age_detection on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/dima806/faces_age_detection. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/dima806/faces_age_detection on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use dima806/faces_age_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dima806/faces_age_detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="dima806/faces_age_detection") 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("dima806/faces_age_detection") model = AutoModelForImageClassification.from_pretrained("dima806/faces_age_detection", device_map="auto") - Notebooks
- Google Colab
- Kaggle
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("dima806/faces_age_detection")
model = AutoModelForImageClassification.from_pretrained("dima806/faces_age_detection", device_map="auto")Quick Links
Returns age group with about 91% accuracy based on facial image.
See https://www.kaggle.com/code/dima806/age-group-image-detection-vit for more details.
Classification report:
precision recall f1-score support
MIDDLE 0.8316 0.9278 0.8771 4321
YOUNG 0.9598 0.8563 0.9051 4322
OLD 0.9552 0.9477 0.9515 4322
accuracy 0.9106 12965
macro avg 0.9155 0.9106 0.9112 12965
weighted avg 0.9155 0.9106 0.9112 12965
- Downloads last month
- 134
Model tree for dima806/faces_age_detection
Base model
google/vit-base-patch16-224-in21k
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="dima806/faces_age_detection") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")