--- license: apache-2.0 base_model: google/vit-base-patch16-224-in21k tags: - generated_from_trainer datasets: - imagefolder metrics: - accuracy - precision - f1 model-index: - name: emotion_classification 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.63125 - name: Precision type: precision value: 0.6580684399341683 - name: F1 type: f1 value: 0.6375321878900636 --- # emotion_classification 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.1145 - Accuracy: 0.6312 - Precision: 0.6581 - F1: 0.6375 ## 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: 3e-05 - train_batch_size: 64 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: cosine_with_restarts - lr_scheduler_warmup_steps: 150 - num_epochs: 300 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | F1 | |:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:| | 2.0848 | 1.0 | 10 | 2.0806 | 0.1625 | 0.1527 | 0.1483 | | 2.0824 | 2.0 | 20 | 2.0784 | 0.1688 | 0.1556 | 0.1538 | | 2.0785 | 3.0 | 30 | 2.0748 | 0.175 | 0.1612 | 0.1606 | | 2.0709 | 4.0 | 40 | 2.0698 | 0.1812 | 0.1684 | 0.1661 | | 2.067 | 5.0 | 50 | 2.0635 | 0.1812 | 0.1787 | 0.1697 | | 2.0554 | 6.0 | 60 | 2.0553 | 0.2 | 0.1958 | 0.1893 | | 2.0461 | 7.0 | 70 | 2.0438 | 0.2313 | 0.2434 | 0.2272 | | 2.0263 | 8.0 | 80 | 2.0260 | 0.2437 | 0.2763 | 0.2472 | | 1.9963 | 9.0 | 90 | 1.9959 | 0.275 | 0.3073 | 0.2780 | | 1.9512 | 10.0 | 100 | 1.9435 | 0.3312 | 0.3481 | 0.3307 | | 1.8885 | 11.0 | 110 | 1.8610 | 0.4313 | 0.4426 | 0.4138 | | 1.7908 | 12.0 | 120 | 1.7604 | 0.4688 | 0.4485 | 0.4243 | | 1.6944 | 13.0 | 130 | 1.6677 | 0.4813 | 0.4369 | 0.4349 | | 1.6245 | 14.0 | 140 | 1.6105 | 0.4625 | 0.4071 | 0.4124 | | 1.5745 | 15.0 | 150 | 1.5671 | 0.5062 | 0.4551 | 0.4690 | | 1.5132 | 16.0 | 160 | 1.5169 | 0.4688 | 0.4481 | 0.4201 | | 1.471 | 17.0 | 170 | 1.4772 | 0.4813 | 0.4203 | 0.4404 | | 1.4272 | 18.0 | 180 | 1.4426 | 0.4938 | 0.4453 | 0.4496 | | 1.3896 | 19.0 | 190 | 1.4153 | 0.4813 | 0.4409 | 0.4370 | | 1.3347 | 20.0 | 200 | 1.3976 | 0.5062 | 0.4694 | 0.4662 | | 1.3145 | 21.0 | 210 | 1.3840 | 0.4813 | 0.4459 | 0.4366 | | 1.3319 | 22.0 | 220 | 1.3511 | 0.5062 | 0.4867 | 0.4655 | | 1.2438 | 23.0 | 230 | 1.3186 | 0.5312 | 0.5804 | 0.4945 | | 1.2202 | 24.0 | 240 | 1.3012 | 0.5375 | 0.5342 | 0.5023 | | 1.1838 | 25.0 | 250 | 1.2879 | 0.5563 | 0.6162 | 0.5295 | | 1.1448 | 26.0 | 260 | 1.2534 | 0.5687 | 0.5631 | 0.5456 | | 1.113 | 27.0 | 270 | 1.2398 | 0.55 | 0.5645 | 0.5359 | | 1.0862 | 28.0 | 280 | 1.2357 | 0.5437 | 0.6075 | 0.5143 | | 1.0837 | 29.0 | 290 | 1.2095 | 0.5687 | 0.5653 | 0.5471 | | 1.0609 | 30.0 | 300 | 1.2095 | 0.5437 | 0.5729 | 0.5393 | | 1.0112 | 31.0 | 310 | 1.1859 | 0.575 | 0.5989 | 0.5490 | | 0.9584 | 32.0 | 320 | 1.1683 | 0.5875 | 0.6019 | 0.5777 | | 0.941 | 33.0 | 330 | 1.1649 | 0.5938 | 0.6083 | 0.5875 | | 0.904 | 34.0 | 340 | 1.1896 | 0.5875 | 0.6078 | 0.5720 | | 0.921 | 35.0 | 350 | 1.1662 | 0.6062 | 0.6352 | 0.5975 | | 0.9026 | 36.0 | 360 | 1.1441 | 0.5875 | 0.5981 | 0.5841 | | 0.8217 | 37.0 | 370 | 1.1602 | 0.5813 | 0.6098 | 0.5779 | | 0.8292 | 38.0 | 380 | 1.2140 | 0.5437 | 0.5588 | 0.5258 | | 0.8017 | 39.0 | 390 | 1.1545 | 0.5563 | 0.5459 | 0.5294 | | 0.7787 | 40.0 | 400 | 1.1358 | 0.6062 | 0.6300 | 0.5948 | | 0.7473 | 41.0 | 410 | 1.1285 | 0.5813 | 0.5996 | 0.5779 | | 0.6941 | 42.0 | 420 | 1.1311 | 0.575 | 0.5982 | 0.5757 | | 0.7009 | 43.0 | 430 | 1.1296 | 0.6125 | 0.6371 | 0.6076 | | 0.6537 | 44.0 | 440 | 1.0996 | 0.5813 | 0.5866 | 0.5684 | | 0.6524 | 45.0 | 450 | 1.1477 | 0.5875 | 0.6077 | 0.5813 | | 0.674 | 46.0 | 460 | 1.1063 | 0.6188 | 0.6322 | 0.6127 | | 0.5999 | 47.0 | 470 | 1.1077 | 0.6 | 0.6035 | 0.5951 | | 0.6194 | 48.0 | 480 | 1.1249 | 0.5813 | 0.5936 | 0.5805 | | 0.595 | 49.0 | 490 | 1.1331 | 0.6 | 0.5955 | 0.5876 | | 0.5403 | 50.0 | 500 | 1.1577 | 0.5875 | 0.6010 | 0.5781 | | 0.5932 | 51.0 | 510 | 1.1352 | 0.5938 | 0.6214 | 0.5851 | | 0.621 | 52.0 | 520 | 1.0893 | 0.6062 | 0.6044 | 0.6007 | | 0.5157 | 53.0 | 530 | 1.1382 | 0.6125 | 0.6173 | 0.6075 | | 0.5318 | 54.0 | 540 | 1.1402 | 0.6 | 0.6158 | 0.5970 | | 0.4757 | 55.0 | 550 | 1.1668 | 0.5938 | 0.6096 | 0.5930 | | 0.4826 | 56.0 | 560 | 1.1506 | 0.6062 | 0.6367 | 0.6051 | | 0.5058 | 57.0 | 570 | 1.1857 | 0.5875 | 0.5873 | 0.5767 | | 0.4791 | 58.0 | 580 | 1.1618 | 0.5813 | 0.5670 | 0.5587 | | 0.4322 | 59.0 | 590 | 1.2007 | 0.5625 | 0.5628 | 0.5532 | | 0.442 | 60.0 | 600 | 1.1862 | 0.5875 | 0.5681 | 0.5560 | | 0.431 | 61.0 | 610 | 1.1145 | 0.6312 | 0.6581 | 0.6375 | | 0.4131 | 62.0 | 620 | 1.2081 | 0.575 | 0.5912 | 0.5705 | | 0.3911 | 63.0 | 630 | 1.1380 | 0.6062 | 0.6043 | 0.5988 | | 0.4281 | 64.0 | 640 | 1.1189 | 0.6188 | 0.6157 | 0.6138 | | 0.385 | 65.0 | 650 | 1.2177 | 0.5625 | 0.5888 | 0.5615 | | 0.398 | 66.0 | 660 | 1.2204 | 0.6 | 0.6321 | 0.6008 | | 0.4821 | 67.0 | 670 | 1.2037 | 0.5938 | 0.6065 | 0.5804 | | 0.4127 | 68.0 | 680 | 1.1473 | 0.6 | 0.6193 | 0.5996 | | 0.4062 | 69.0 | 690 | 1.2160 | 0.5938 | 0.5950 | 0.5806 | | 0.3906 | 70.0 | 700 | 1.1763 | 0.5938 | 0.6421 | 0.6034 | | 0.352 | 71.0 | 710 | 1.2355 | 0.5687 | 0.5836 | 0.5613 | | 0.3801 | 72.0 | 720 | 1.1623 | 0.5813 | 0.5800 | 0.5789 | | 0.333 | 73.0 | 730 | 1.1770 | 0.5875 | 0.5920 | 0.5851 | | 0.3562 | 74.0 | 740 | 1.2140 | 0.5875 | 0.6367 | 0.5917 | | 0.3403 | 75.0 | 750 | 1.1679 | 0.6 | 0.6209 | 0.6044 | | 0.3456 | 76.0 | 760 | 1.2496 | 0.5625 | 0.5465 | 0.5409 | | 0.3331 | 77.0 | 770 | 1.1975 | 0.575 | 0.6042 | 0.5759 | | 0.3408 | 78.0 | 780 | 1.2381 | 0.575 | 0.5606 | 0.5565 | | 0.2964 | 79.0 | 790 | 1.1792 | 0.6 | 0.6204 | 0.6009 | | 0.2833 | 80.0 | 800 | 1.1840 | 0.6 | 0.6059 | 0.5933 | | 0.2875 | 81.0 | 810 | 1.2024 | 0.5875 | 0.5920 | 0.5841 | | 0.327 | 82.0 | 820 | 1.2190 | 0.5813 | 0.5799 | 0.5728 | | 0.3027 | 83.0 | 830 | 1.2520 | 0.5813 | 0.5682 | 0.5704 | | 0.2731 | 84.0 | 840 | 1.2167 | 0.5875 | 0.6021 | 0.5847 | | 0.2821 | 85.0 | 850 | 1.2805 | 0.575 | 0.5659 | 0.5527 | | 0.3192 | 86.0 | 860 | 1.2453 | 0.5625 | 0.5585 | 0.5575 | ### Framework versions - Transformers 4.33.1 - Pytorch 2.0.0 - Datasets 2.14.5 - Tokenizers 0.13.3