Downloads · 30 days
0
deepghs/ml-danbooru-onnx
ml-danbooru-onnx is a image classification model from deepghs. Use it when you need a label for an image. The card lists the license as mit.
This repository provides ONNX-optimized implementations of the ML-Danbooru image tagging models, originally developed by 7eu7d7. ML-Danbooru is a sophisticated deep learning system specifically designed for automated…
Downloads · 30 days
0
Access
Public
Updated Nov 17, 2025
Repo size
4.3 GB
Likes
11
Public
Click a slice to open those files.
.onnx1.8 GB · 100%
From the Hugging Face model README
This repository provides ONNX-optimized implementations of the ML-Danbooru image tagging models, originally developed by 7eu7d7. ML-Danbooru is a sophisticated deep learning system specifically designed for automated tagging of anime-style images, leveraging modern transformer architectures to achieve high-precision classification across thousands of Danbooru-style tags. The models in this repository have been converted to ONNX format for improved inference performance and cross-platform compatibility.
The core architecture employs Caformer (Convolution-Augmented Transformer) models, which combine the global receptive field of transformers with the local feature extraction capabilities of convolutional networks. This hybrid approach enables the models to effectively capture both fine-grained details and global contextual information in anime artwork. The repository includes multiple model variants trained with different configurations and epochs, providing users with options ranging from faster inference to higher accuracy depending on their specific requirements.
Performance-wise, these models demonstrate exceptional accuracy in recognizing common anime character attributes, clothing items, accessories, backgrounds, and compositional elements. They can reliably identify tags such as hair colors, eye colors, clothing types, character poses, and scene settings with confidence scores typically exceeding 0.7-0.9 for relevant features. The models support batch processing and can handle images of various aspect ratios through intelligent resizing strategies that preserve important visual information while maintaining computational efficiency.
The models in this repository are designed to be used with the dghs-imgutils library, which provides a comprehensive interface for image tagging tasks.
pip install dghs-imgutils
from imgutils.tagging import get_mldanbooru_tags
# Tag an image with default settings
tags = get_mldanbooru_tags('your_image.jpg')
print(tags)
# Tag with custom threshold and settings
tags_custom = get_mldanbooru_tags(
'your_image.jpg',
threshold=0.5,
size=448,
keep_ratio=True,
drop_overlap=True,
use_real_name=False
)
print(tags_custom)
This repository contains multiple ML-Danbooru model variants:
The repository includes comprehensive tag information:
The ML-Danbooru models utilize modern transformer-based architectures:
@misc{deepghs_ml_danbooru_onnx,
title = {{ML-Danbooru ONNX Models: Optimized Anime Image Tagging}},
author = {7eu7d7 and DeepGHS Contributors},
howpublished = {\url{https://huggingface.co/deepghs/ml-danbooru-onnx}},
year = {2023},
note = {ONNX-optimized implementations of ML-Danbooru models for efficient anime image tagging with transformer-based architectures},
abstract = {This repository provides ONNX-optimized implementations of the ML-Danbooru image tagging models, originally developed by 7eu7d7. ML-Danbooru is a sophisticated deep learning system specifically designed for automated tagging of anime-style images, leveraging modern transformer architectures to achieve high-precision classification across thousands of Danbooru-style tags. The models employ Caformer (Convolution-Augmented Transformer) architectures that combine the global receptive field of transformers with local feature extraction capabilities of convolutional networks, enabling effective capture of both fine-grained details and global contextual information in anime artwork.},
keywords = {image-classification, anime, tagging, danbooru, transformer, onnx}
}