Instructions to use Maria-pro/emotions_classif_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Maria-pro/emotions_classif_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Maria-pro/emotions_classif_model") 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("Maria-pro/emotions_classif_model") model = AutoModelForImageClassification.from_pretrained("Maria-pro/emotions_classif_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
End of training
Browse filesFiles changed (6)
- README.mdAdded+81
- config.jsonAdded+35
- model.safetensorsAdded+3
- preprocessor_config.jsonAdded+23
- trainer_state.jsonAdded+70
- training_args.binAdded+3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081---library_name: transformerslicense: apache-2.0base_model: google/vit-base-patch16-224-in21ktags:- generated_from_trainerdatasets:- imagefoldermetrics:- accuracymodel-index:- name: emotions_classif_model results: - task: name: Image Classification type: image-classification dataset: name: imagefolder type: imagefolder config: default split: train args: default metrics: - name: Accuracy type: accuracy value: 0.53125---
<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. -->
# emotions_classif_model
This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the imagefolder dataset.It achieves the following results on the evaluation set:- Loss: 1.0759- Accuracy: 0.5312
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:- learning_rate: 5e-05- train_batch_size: 16- eval_batch_size: 16- seed: 42- gradient_accumulation_steps: 4- total_train_batch_size: 64- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments- lr_scheduler_type: linear- lr_scheduler_warmup_ratio: 0.1- num_epochs: 3
### Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy ||:-------------:|:-----:|:----:|:---------------:|:--------:|| No log | 1.0 | 2 | 1.1015 | 0.2812 || No log | 2.0 | 4 | 1.1003 | 0.375 || No log | 3.0 | 6 | 1.0759 | 0.5312 |
### Framework versions
- Transformers 4.56.1- Pytorch 2.8.0+cu126- Datasets 4.0.0- Tokenizers 0.22.01234567891011121314151617181920212223242526272829303132333435{ "architectures": [ "ViTForImageClassification" ], "attention_probs_dropout_prob": 0.0, "dtype": "float32", "encoder_stride": 16, "hidden_act": "gelu", "hidden_dropout_prob": 0.0, "hidden_size": 768, "id2label": { "0": "happy", "1": "neutral", "2": "sad" }, "image_size": 224, "initializer_range": 0.02, "intermediate_size": 3072, "label2id": { "happy": "0", "neutral": "1", "sad": "2" }, "layer_norm_eps": 1e-12, "model_type": "vit", "num_attention_heads": 12, "num_channels": 3, "num_hidden_layers": 12, "patch_size": 16, "pooler_act": "tanh", "pooler_output_size": 768, "problem_type": "single_label_classification", "qkv_bias": true, "transformers_version": "4.56.1"}123version https://git-lfs.github.com/spec/v1oid sha256:8b71bebb38ca22451b716c12fd3fcf12d3ec5065f5248e8268cce2779b86f10asize 3432270521234567891011121314151617181920212223{ "do_convert_rgb": null, "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 }}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970{ "best_global_step": 6, "best_metric": 0.53125, "best_model_checkpoint": "emotions_classif_model/checkpoint-6", "epoch": 3.0, "eval_steps": 500, "global_step": 6, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 1.0, "eval_accuracy": 0.28125, "eval_loss": 1.101482629776001, "eval_runtime": 27.1427, "eval_samples_per_second": 1.179, "eval_steps_per_second": 0.074, "step": 2 }, { "epoch": 2.0, "eval_accuracy": 0.375, "eval_loss": 1.10026216506958, "eval_runtime": 23.9862, "eval_samples_per_second": 1.334, "eval_steps_per_second": 0.083, "step": 4 }, { "epoch": 3.0, "eval_accuracy": 0.53125, "eval_loss": 1.0758609771728516, "eval_runtime": 32.6408, "eval_samples_per_second": 0.98, "eval_steps_per_second": 0.061, "step": 6 }, { "epoch": 3.0, "step": 6, "total_flos": 2.9059756556544e+16, "train_loss": 1.0899391174316406, "train_runtime": 1151.6246, "train_samples_per_second": 0.326, "train_steps_per_second": 0.005 } ], "logging_steps": 10, "max_steps": 6, "num_input_tokens_seen": 0, "num_train_epochs": 3, "save_steps": 500, "stateful_callbacks": { "TrainerControl": { "args": { "should_epoch_stop": false, "should_evaluate": false, "should_log": false, "should_save": true, "should_training_stop": true }, "attributes": {} } }, "total_flos": 2.9059756556544e+16, "train_batch_size": 16, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:67740279915d5d73c21ab41b4b6b49e97b78613d701ea32a3019e2f32612b196size 5777README.mdAdded+81
config.jsonAdded+35
model.safetensorsAdded+3
preprocessor_config.jsonAdded+23
trainer_state.jsonAdded+70
training_args.binAdded+3