Views
No views yet
comic and not-comic.1from transformers import pipeline
2
3classifier = pipeline("image-classification", model="shoni/comic-sans-detector")
4result = classifier("path/to/image.jpg")
5print(result)
6
7
8# Comic Sans Detector
9
10This repository contains a fine-tuned ResNet-18 model, specifically trained to detect whether an image contains Comic Sans font. It is a fine-tuning of a previously fine-tuned font classification model, based on the ResNet-18 foundation model.
11
12## Repository Contents
13
14- **`comic-detector.ipynb`**: A notebook that demonstrates the training and evaluation process for the Comic Sans detector using the fine-tuned ResNet-18 model.
15- **`image-format-generalizer.ipynb`**: A utility notebook for preparing and normalizing image datasets, ensuring consistent formatting across `/data` folders.
16
17## Dataset Structure (Not Included)
18
19The dataset used for training and evaluation should follow this structure:- **`comic/`**: Contains images labeled as featuring Comic Sans font.
- **`not-comic/`**: Contains images labeled as not featuring Comic Sans font.
⚠️ The dataset itself is not included in this repository. You must prepare and structure your dataset as described.
## How to Use
### 1. Clone the Repository
```bash
git clone https://huggingface.co/shoni/comic-sans-detector
cd comic-sans-detector/data directory with comic/ and not-comic/ folders.comic-detector.ipynb in Jupyter Notebook or an equivalent environment to retrain the model or evaluate it.image-format-generalizer.ipynb to preprocess them.shoni/comic-sans-detector with your repository name):1from transformers import pipeline
2
3classifier = pipeline("image-classification", model="shoni/comic-sans-detector")
4result = classifier("path/to/image.jpg")
5print(result)comic and not-comic.