/ Модель

Характеристики

Лицензия
MIT
Архитектура
resnet · dense
Базовая модель
resnet-18
Библиотека
transformers
Опубликована
18 дек 2024

comic-sans-detector

Классификация изображенийИзображение → label

Дообученная ResNet-18 классифицирует изображения по наличию шрифта Comic Sans.

153скачиваний за 30 дней1лайквеса обновлены26 дек 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Comic Sans Detector — дообученная модель ResNet-18 для классификации изображений по наличию шрифта Comic Sans. Она различает изображения с Comic Sans и изображения без него, относя их к одному из двух классов: comic или not-comic. Модель основана на ранее дообученной модели классификации шрифтов и обучена на пользовательском наборе данных.

Модель предназначена для автоматической проверки изображений, например при поиске или фильтрации изображений с Comic Sans. Для работы с ней в карточке приведён пример использования через Hugging Face Inference API. Репозиторий содержит веса в формате safetensors и распространяется по лицензии MIT.

Сценарии применения

  • Определение Comic Sans на изображении
  • Фильтрация изображений с Comic Sans
  • Проверка макетов на использование Comic Sans

Ограничения

Модель обучена на пользовательском наборе данных из двух классов; её точность на других типах изображений и шрифтов в карточке не описана.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Comic Sans Detector

This 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.

Features

  • Distinguishes between Comic Sans and non-Comic Sans images.
  • Built using a custom dataset with two classes: comic and not-comic.

Usage

To use this model with the Hugging Face Inference API:

from transformers import pipeline

classifier = pipeline("image-classification", model="shoni/comic-sans-detector")
result = classifier("path/to/image.jpg")
print(result)


# Comic Sans Detector

This 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.

## Repository Contents

- **`comic-detector.ipynb`**: A notebook that demonstrates the training and evaluation process for the Comic Sans detector using the fine-tuned ResNet-18 model.
- **`image-format-generalizer.ipynb`**: A utility notebook for preparing and normalizing image datasets, ensuring consistent formatting across `/data` folders.

## Dataset Structure (Not Included)

The dataset used for training and evaluation should follow this structure:

/data ├── comic/ │ ├── image1.jpg │ ├── image2.png │ └── ... ├── not-comic/ │ ├── image1.jpg │ ├── image2.png │ └── ...

- **`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

2. Prepare the Dataset

Ensure your dataset is properly structured under a /data directory with comic/ and not-comic/ folders.

3. Run the Training Notebook

Open comic-detector.ipynb in Jupyter Notebook or an equivalent environment to retrain the model or evaluate it.

4. Format Images (Optional)

If your dataset images are not in a consistent format, use image-format-generalizer.ipynb to preprocess them.

Model Usage

The fine-tuned model can be deployed directly via the Hugging Face Inference API. Once uploaded, the model can be used to classify whether an image contains Comic Sans font.

Example API usage (replace shoni/comic-sans-detector with your repository name):

from transformers import pipeline

classifier = pipeline("image-classification", model="shoni/comic-sans-detector")
result = classifier("path/to/image.jpg")
print(result)

Fine-Tuning Process

This model was fine-tuned on a previously fine-tuned font classification model, which itself was based on the ResNet-18 foundation model. The fine-tuning process was conducted using a custom dataset with two classes: comic and not-comic.

Acknowledgments

This project is based on the original font identifier repository by gaborcselle.

License

Include your preferred license here (e.g., MIT, Apache 2.0, etc.).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · image-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
ResNetForImageClassification
Ревизия весов
1c5f81a

0 моделей