đ font-identifier
This model is a fine - tuned version of microsoft/resnet - 18 on the imagefolder dataset, aiming to identify the font used in an image.
This model can identify the font used in an image. The result shows a Loss of 0.1172 and an Accuracy of 0.9633. You can try it with any screenshot of a font or any of the examples in the 'samples' subfolder of this repo.
đ Quick Start
This model is a fine - tuned version of microsoft/resnet-18 on the imagefolder dataset. The result is Loss: 0.1172; Accuracy: 0.9633.
You can test the model with any screenshot of a font or any of the examples in the 'samples' subfolder of this repo.
⨠Features
Model Description
This model can identify the font used in an image. It is a visual classifier based on ResNet18. The project was built in 1 day, and there is a minute - by - minute journal on Twitter/X, on Pebble.social, and on Threads.net.
Intended Uses & Limitations
It can identify any of 48 standard fonts from the training data.
đ Documentation
Training and Evaluation Data
The model was trained and evaluated on the gaborcselle/font - examples dataset with an 80/20 split.
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: Adam with betas=(0.9,0.999) and epsilon = 1e - 08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 50
Training Results
Training Loss |
Epoch |
Step |
Validation Loss |
Accuracy |
4.0243 |
0.98 |
30 |
3.9884 |
0.0204 |
0.8309 |
10.99 |
338 |
0.5536 |
0.8551 |
0.3917 |
20.0 |
615 |
0.2353 |
0.9388 |
0.2298 |
30.99 |
953 |
0.1326 |
0.9633 |
0.1804 |
40.0 |
1230 |
0.1421 |
0.9571 |
0.1987 |
46.99 |
1445 |
0.1250 |
0.9673 |
0.1728 |
48.0 |
1476 |
0.1293 |
0.9633 |
0.1337 |
48.78 |
1500 |
0.1172 |
0.9633 |
Confusion Matrix
The confusion matrix on test data is shown below:

Framework Versions
- Transformers 4.36.0.dev0
- Pytorch 2.0.0
- Datasets 2.12.0
- Tokenizers 0.14.1
đ License
This model is released under the MIT license.
đĻ Model Information
Property |
Details |
Model Type |
font-identifier |
Base Model |
microsoft/resnet-18 |
Training Data |
gaborcselle/font-examples |
Metrics |
accuracy |
Results |
Loss: 0.1172; Accuracy: 0.9633 |