Anime Character Segmentation with DINOv2
Project description
AnimeSeg
Anime Character Segmentation using DINOv2 + U-Net++ with LoRA fine-tuning.
Installation
pip install -e .
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.1.tar.gz
(5.6 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
File details
Details for the file anime_seg-0.1.1.tar.gz.
File metadata
- Download URL: anime_seg-0.1.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d962f3968a726316893e5ca33241092b1a3351d21b89398942a9f3287e09fdbb
|
|
| MD5 |
bbc8ceeb9f322740d3f2cf7fe02d551e
|
|
| BLAKE2b-256 |
32f141a9d75850b7b60198b94f4057e14e6a430efce4f480239cf8bc6bb4fd69
|
File details
Details for the file anime_seg-0.1.1-py3-none-any.whl.
File metadata
- Download URL: anime_seg-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.2 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 |
b0f87a3e666a4d19e1741b818e50eaf367c204ad2f2c148d733d42c7256799f0
|
|
| MD5 |
e2bc126216601c27ed0fe0cc6a20b664
|
|
| BLAKE2b-256 |
97f07f675237230c88004374fcd68485b062c5adff158d7ebf15eb24968fa014
|