lbpcascade_animeface
lbpcascade_animeface copied to clipboard
Feature/package
with this pr lbpcascade_animeface can be uploaded to pypi and can be used on other program as package
- it also include change to detect.py to make it more modular so other program can use it as library
- no license here yet, i recommend @nagadomi choose one. if you don't know try this https://choosealicense.com/
- i include the xml data in this. packager have to put it on root dir, so it can be included on package
- related above, there should be a better way to include xml data and use it in program. this temporarily fixed by adding parameter for cascade file
- maybe organize a subcommand. this current command can be moved to
detect
subcommand and other example like on #1 can be added to another subcommand likecrop
The license is described in the XML file. It is MIT license.
I do not consider examples/detect.py
as a cli tool. I think that it probably will not be used.
However it may be useful to be able to get the XML path from a module.
like:
import lbpcascade_animeface
cascade = cv2.CascadeClassifier(lbpcascade_animeface.XML_PATH)
i just made it as you ask, the constant can be used as above (from lbpcascade_animeface import XML_PATH
).
as example if you install on virtual env, virtualenv root = /home/q/envs
, virtualenv name = temp
it will be
'/home/<username>/envs/temp/lib/python3.6/site-packages/lbpcascade_animeface/lbpcascade_animeface.xml'
to try it:
- create distribution file from this pr (
python setup.py sdist
) - create virtualenv on empty file
-
pip install
from distribution file - open python console
-
import lbpcascade_animeface as la; print(la.XML_PATH)