nya3jp / python-animeface Goto Github PK
View Code? Open in Web Editor NEWA library to detect anime faces in images.
License: Apache License 2.0
A library to detect anime faces in images.
License: Apache License 2.0
I tried to compile it but got:
I was attempting to set up a new python environment for animeface, but installation using pip install animeface
fails with the following error:
animeface/_nvxs.c:21:10: fatal error: nv_core.h: No such file or directory
#include "nv_core.h"
^~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
I am running Manjaro Linux 18.0.0 (a derivative of Arch Linux) and I am running Python 3.7.1. Are there any additional packages I must install?
i am using this within a flask backend and it works well , but i get base64 encode face image quiet slow. Theres is at least 2s delay.
def detect2(file):
ret = []
img = Image.open(file)
faces = animeface.detect(img)
for it in faces:
fp = it.face.pos
# print(fp)
buffer = BytesIO()
crop = img.crop((fp.x, fp.y, fp.x + fp.width, fp.y + fp.height))
crop.save(buffer, format='png')
byte_data = buffer.getvalue()
image_str = base64.b64encode(byte_data).decode()
ret.append({"face": image_str})
return ret
I'm implementing python-animeface
as part of a larger project involving anime characters' faces. Insofar, python-animeface
's algorithm has worked fairly well, but some images haven't worked as well. (e.g. this photo) It might very well be something wrong with my implementation of anime-face
, but any chance you know of ways to optimize python-animeface
?
Just updating the lines 180 and 181 with rigt_eye in animeface/_nvxs.c fix the problem.
It would be nice to get wheel for Python 3.11 (and possibly 3.12), as currently only 3.10 and prior are available
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.