Anime Character Segmentation with DINOv2
Project description
AnimeSeg
Anime Character Segmentation using DINOv2 + U-Net++ with LoRA fine-tuning.
Installation
pip install anime_seg
Usage
from anime_seg import AnimeSegPipeline
# Initialize pipeline (auto-downloads latest model from Hugging Face)
pipe = AnimeSegPipeline()
# Run segmentation
mask = pipe("path/to/image.jpg")
# Save result
mask.save("output.png")
Advanced Usage
# Specify custom repo or filename
pipe = AnimeSegPipeline(
repo_id="suzukimain/AnimeSeg",
filename="models/anime_seg_dinov2_large_v1.safetensors",
device="cuda" # or "cpu"
)
# Use PIL Image
from PIL import Image
img = Image.open("image.jpg")
mask = pipe(img)
Model Files
Models should follow the naming convention:
models/anime_seg_{architecture}_{size}_v{version}.safetensors
Example:
models/anime_seg_dinov2_large_v1.safetensorsmodels/anime_seg_dinov2_base_v2.safetensors
Segmentation Classes
- Background
- Skin
- Face
- Hair (main)
- Hair (thin)
- Eyes (left/right)
- Eyebrows (left/right)
- Nose
- Mouth
- Clothes
- Unknown
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
anime_seg-0.1.2.tar.gz
(10.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
anime_seg-0.1.2-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file anime_seg-0.1.2.tar.gz.
File metadata
- Download URL: anime_seg-0.1.2.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
440e725e2bbf01b2fbcca991c2d5eb5c289a9b17c77a5de239883481c8149f60
|
|
| MD5 |
56c1b39d09adfccf3414085e0023d8a5
|
|
| BLAKE2b-256 |
3ccaa6c9fdba06254f4d5a21815e0c554a90af541c3f6a3c78740b25030cbae9
|
File details
Details for the file anime_seg-0.1.2-py3-none-any.whl.
File metadata
- Download URL: anime_seg-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d2c3389c8d2c4aea3e6bd660075499b64a2d920ada44ce8ab9a33390c51e33f
|
|
| MD5 |
97c7251963cfb3d79493337e257e6975
|
|
| BLAKE2b-256 |
1c6d3d35e27a72fec2f18fe6ae2f88c212f2276feeba395dc6290807d2d4f406
|