Image Classification
Transformers
TensorBoard
Safetensors
dinov2
Generated from Trainer
Eval Results (legacy)
Instructions to use LuGot16/spermatogenesis-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LuGot16/spermatogenesis-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="LuGot16/spermatogenesis-classifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("LuGot16/spermatogenesis-classifier") model = AutoModelForImageClassification.from_pretrained("LuGot16/spermatogenesis-classifier") - Notebooks
- Google Colab
- Kaggle
| library_name: transformers | |
| license: apache-2.0 | |
| base_model: facebook/dinov2-base | |
| tags: | |
| - generated_from_trainer | |
| datasets: | |
| - imagefolder | |
| metrics: | |
| - accuracy | |
| - f1 | |
| model-index: | |
| - name: spermatogenesis-classifier | |
| 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.8910256410256411 | |
| - name: F1 | |
| type: f1 | |
| value: 0.8896300082346593 | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # spermatogenesis-classifier | |
| This model is a fine-tuned version of [facebook/dinov2-base](https://huggingface.co/facebook/dinov2-base) on the imagefolder dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.3150 | |
| - Accuracy: 0.8910 | |
| - F1: 0.8896 | |
| - Acc I-iv: 0.8710 | |
| - Acc Ix-x: 0.9048 | |
| - Acc V-vi: 0.8511 | |
| - Acc Vii-vii: 0.9714 | |
| - Acc Xi- xii: 0.8636 | |
| ## 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: 2e-05 | |
| - train_batch_size: 16 | |
| - eval_batch_size: 16 | |
| - seed: 42 | |
| - gradient_accumulation_steps: 2 | |
| - total_train_batch_size: 32 | |
| - 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: cosine | |
| - lr_scheduler_warmup_steps: 50 | |
| - num_epochs: 30 | |
| - mixed_precision_training: Native AMP | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Acc I-iv | Acc Ix-x | Acc V-vi | Acc Vii-vii | Acc Xi- xii | | |
| |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:--------:|:--------:|:--------:|:-----------:|:-----------:| | |
| | 2.7787 | 1.0 | 20 | 1.2571 | 0.4295 | 0.3860 | 0.0 | 0.4762 | 0.5532 | 0.3143 | 0.9091 | | |
| | 1.6595 | 2.0 | 40 | 1.5081 | 0.3590 | 0.3372 | 0.0323 | 0.5238 | 0.0426 | 0.5714 | 1.0 | | |
| | 1.5573 | 3.0 | 60 | 0.8242 | 0.5513 | 0.5636 | 0.3871 | 0.5238 | 0.3830 | 0.6571 | 1.0 | | |
| | 1.2868 | 4.0 | 80 | 0.7303 | 0.7885 | 0.7570 | 0.5484 | 0.4762 | 0.8723 | 0.9429 | 1.0 | | |
| | 0.9034 | 5.0 | 100 | 0.4915 | 0.8077 | 0.8036 | 0.7097 | 0.8095 | 0.7660 | 0.8857 | 0.9091 | | |
| | 1.2132 | 6.0 | 120 | 0.5243 | 0.8013 | 0.7923 | 0.6452 | 0.8095 | 0.9574 | 0.6571 | 0.9091 | | |
| | 0.8576 | 7.0 | 140 | 0.7115 | 0.7692 | 0.7224 | 0.5806 | 0.2857 | 0.8298 | 1.0 | 1.0 | | |
| | 0.8557 | 8.0 | 160 | 0.5277 | 0.7692 | 0.7716 | 0.8710 | 0.6667 | 0.5106 | 1.0 | 0.9091 | | |
| | 0.7294 | 9.0 | 180 | 0.4170 | 0.8333 | 0.8306 | 0.6129 | 0.9048 | 0.8511 | 0.9143 | 0.9091 | | |
| | 0.6713 | 10.0 | 200 | 0.4585 | 0.8141 | 0.8070 | 0.9032 | 0.9048 | 0.7234 | 0.8571 | 0.7273 | | |
| | 0.7973 | 11.0 | 220 | 0.4767 | 0.8397 | 0.8241 | 0.7097 | 0.6667 | 0.8936 | 0.8857 | 1.0 | | |
| | 0.6637 | 12.0 | 240 | 0.4327 | 0.8013 | 0.8057 | 0.9032 | 0.7619 | 0.6170 | 0.9143 | 0.9091 | | |
| | 0.6284 | 13.0 | 260 | 0.3897 | 0.8462 | 0.8331 | 0.5484 | 0.8571 | 0.9149 | 1.0 | 0.8636 | | |
| | 0.7981 | 14.0 | 280 | 0.3915 | 0.8654 | 0.8512 | 0.6774 | 0.9524 | 0.9362 | 0.9429 | 0.7727 | | |
| | 0.5017 | 15.0 | 300 | 0.3150 | 0.8910 | 0.8896 | 0.8710 | 0.9048 | 0.8511 | 0.9714 | 0.8636 | | |
| | 0.5893 | 16.0 | 320 | 0.3640 | 0.8526 | 0.8485 | 0.8065 | 0.9048 | 0.8298 | 0.9429 | 0.7727 | | |
| | 0.6591 | 17.0 | 340 | 0.3563 | 0.8718 | 0.8684 | 0.7742 | 0.8571 | 0.8723 | 0.9429 | 0.9091 | | |
| | 0.4976 | 18.0 | 360 | 0.3648 | 0.8397 | 0.8393 | 0.9355 | 0.8095 | 0.7447 | 0.8857 | 0.8636 | | |
| | 0.5034 | 19.0 | 380 | 0.3839 | 0.8462 | 0.8389 | 0.6452 | 0.7619 | 0.9149 | 0.9429 | 0.9091 | | |
| | 0.4612 | 20.0 | 400 | 0.3724 | 0.8654 | 0.8636 | 0.9032 | 0.8571 | 0.8723 | 0.8286 | 0.8636 | | |
| ### Framework versions | |
| - Transformers 5.6.2 | |
| - Pytorch 2.11.0+cu130 | |
| - Datasets 4.8.4 | |
| - Tokenizers 0.22.2 | |