MimiLens-Models / README.md
Minthy's picture
Upload folder using huggingface_hub
cd0d9ec verified
|
Raw
History Blame Contribute Delete
4.05 kB
---
tags:
- watermark-detection
- image-embedding
- yolo
- dinov2
- computer-vision
- pytorch
license: mit
pipeline_tag: object-detection
---
<p align="center">
<img src="assets/logo.webp" width="320" alt="MimiLens logo">
</p>
# MimiLens-Models
This repository contains models for **[MimiLens](https://github.com/MinthyBasis/mimilens)** β€” a toolkit for automatic detection of consistent artifacts and watermarks in image datasets.
High-quality training data is essential for generative models, because persistent artifacts, watermarks and repeated visual patterns in training images tend to leak into generated outputs. Manual inspection of large datasets is expensive and impractical, and even large multimodal models are costly and imperfect β€” especially when modern generators can produce text, speech bubbles and other objects that must be preserved.
MimiLens solves this by looking for **consistency** across images instead of matching fixed templates. The pipeline runs in two stages:
1. A fast YOLO-based detector proposes candidate regions across all images.
2. A custom DINO-based embedder vectorizes these regions, and HDBSCAN clustering finds groups of visually similar detections.
This separates repeating artifacts, watermarks, logos, and signatures from irregular, one-off objects.
The models are lightweight and work on CPU, while a GPU significantly speeds up large-scale processing.
# Models
| File | Size | Format | Purpose |
| --- | --- | --- | --- |
| `models/detect_y26l_v1.2.pt` | ~50.7 MB | Ultralytics/PyTorch checkpoint | Detector |
| `models/embedder_v3.0.safetensors` | ~84.7 MB | `safetensors` | Region embedder |
## Detection
The detection model is based on **YOLOv26** (`YOLO26l`). It was chosen as a recent architecture that offers a good balance between accuracy and inference speed.
The training dataset combined real labeled images (the main part) with procedurally generated samples. The detector recognizes 5 classes:
1. Signatures
2. Watermarks
3. Regular text
4. Speech bubbles
5. Comic / manga effects
## Embeddings
The embedder is built on top of **DINOv2-Small**. Its output embedding size was reduced to 128 dimensions for efficient clustering, and additional output layers perform the required transformations.
The off-the-shelf DINOv2 is not directly suitable for this task because it focuses on foreground/background semantics rather than fine object-level shapes. To obtain the required behavior, this model was modified and trained on a combined dataset (50% procedural generation from templates, 50% real data) using supervised-contrastive loss with cross-batch memory. This achieved high accuracy on the embedding task while keeping the model small.
# Test data
`mock_pictures/` contains stock photos and generated images with synthetic watermarks and signatures. They can be used to check how MimiLens behaves on typical cases.
# Download
Download the files manually and copy them into the `./models` folder of the MimiLens application, or use the Hugging Face CLI:
```bash
huggingface-cli download Minthy/MimiLens-Models --local-dir .
```
# Intended use
These models are designed to be used through the MimiLens application and its pipeline (detection β†’ embedding β†’ clustering β†’ review). For installation, GUI/CLI usage and configuration, please refer to the [MimiLens repository](https://github.com/MinthyBasis/mimilens).
# Feedback
Join the [Discord server](https://discord.gg/ZXHENAhqE9).
Your examples can help the project improve.
# Acknowledgments
Drac, NeuroSenko, Sv1.
# Donations
BTC: `bc1qwv83ggq8rvv07uk6dv4njs0j3yygj3aax4wg6c`
ETH/USDT(e): `0x04C8a749F49aE8a56CB84cF0C99CD9E92eDB17db`
XMR: `47F7JAyKP8tMBtzwxpoZsUVB8wzg2VrbtDKBice9FAS1FikbHEXXPof4PAb42CQ5ch8p8Hs4RvJuzPHDtaVSdQzD6ZbA5TZ`
# License
The MimiLens project code, documentation and the `embedder_v3.0.safetensors` model are licensed under the **MIT License**.
The `detect_y26l_v1.2.pt` detection model is based on YOLOv26 and is therefore licensed under **AGPL-3.0**.