Toolkit for Distinguishing Anime Images from Real Images With Lightweight Dependency.
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}"