Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/package #4

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

rachmadaniHaryono
Copy link

@rachmadaniHaryono rachmadaniHaryono commented Nov 17, 2018

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 Provide demonstration script for producing images cropped to the face #1 can be added to another subcommand like crop

@nagadomi
Copy link
Owner

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)

@rachmadaniHaryono
Copy link
Author

rachmadaniHaryono commented Nov 23, 2018

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants