Run this model with HF Jobs
Run gitfreder/image_classification 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/gitfreder/image_classification. 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/gitfreder/image_classification 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 gitfreder/image_classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gitfreder/image_classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="gitfreder/image_classification") 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("gitfreder/image_classification") model = AutoModelForImageClassification.from_pretrained("gitfreder/image_classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Training in progress, epoch 1
Browse filesFiles changed (4)
- config.jsonAdded+44
- model.safetensorsAdded+3
- preprocessor_config.jsonAdded+36
- training_args.binAdded+3
1234567891011121314151617181920212223242526272829303132333435363738394041424344{
"_name_or_path": "google/vit-base-patch16-224-in21k",
"architectures": [
"ViTForImageClassification"
],
"attention_probs_dropout_prob": 0.0,
"encoder_stride": 16,
"hidden_act": "gelu",
"hidden_dropout_prob": 0.0,
"hidden_size": 768,
"id2label": {
"0": "anger",
"1": "contempt",
"2": "disgust",
"3": "fear",
"4": "happy",
"5": "neutral",
"6": "sad",
"7": "surprise"
},
"image_size": 224,
"initializer_range": 0.02,
"intermediate_size": 3072,
"label2id": {
"anger": "0",
"contempt": "1",
"disgust": "2",
"fear": "3",
"happy": "4",
"neutral": "5",
"sad": "6",
"surprise": "7"
},
"layer_norm_eps": 1e-12,
"model_type": "vit",
"num_attention_heads": 12,
"num_channels": 3,
"num_hidden_layers": 12,
"patch_size": 16,
"problem_type": "single_label_classification",
"qkv_bias": true,
"torch_dtype": "float32",
"transformers_version": "4.41.2"
}123version https://git-lfs.github.com/spec/v1oid sha256:31d9fb580fc714f1714e1c4120839b7932a2ecbe075456aaab3d30169001f1e0size 343242432123456789101112131415161718192021222324252627282930313233343536{
"_valid_processor_keys": [
"images",
"do_resize",
"size",
"resample",
"do_rescale",
"rescale_factor",
"do_normalize",
"image_mean",
"image_std",
"return_tensors",
"data_format",
"input_data_format"
],
"do_normalize": true,
"do_rescale": true,
"do_resize": true,
"image_mean": [
0.5,
0.5,
0.5
],
"image_processor_type": "ViTImageProcessor",
"image_std": [
0.5,
0.5,
0.5
],
"resample": 2,
"rescale_factor": 0.00392156862745098,
"size": {
"height": 224,
"width": 224
}
}123version https://git-lfs.github.com/spec/v1oid sha256:4bb86f5b4b00ad16f979a1db3084f948bd9f2ceb48cad1872db83f4603bc5855size 5112config.jsonAdded+44
model.safetensorsAdded+3
preprocessor_config.jsonAdded+36
training_args.binAdded+3