Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 750 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 750 Bytes

AnimeIDF

Toolkit for Distinguishing Anime Images from Real Images With Lightweight Dependency.

PyPI PyPI - Downloads

Usage

pip install anime-identify
from anime_identify import AnimeIDF


def test_anime():
    with open("anime.jpg", "rb") as f:
        f.seek(0)  # IMPORTANT!!!
        poss = (AnimeIDF().predict_image(content=f))
    print(poss)
    assert poss > 50, f"anime poss: {poss}"


def test_real():
    poss = AnimeIDF().predict_image("real.jpg")
    print(poss)
    assert poss < 50, f"real poss: {poss}"