Add missing submodules and data to setup.py #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
Thanks for making this package. I want to apply this in my own project and I tried to install this as a git dependency using Poetry, because I'd prefer to use Poetry for all my dependency management.
Installation passed, but when I tried to import modules, it failed because submodules were missing. After looking at the setuptools documentation, I modified the
setup.py
configuration for finding packages and data files. Additionally, since there are git LFS files in this repo, I added agit lfs pull
call to thesetup.py
script by adapting the code shown in this stackoverflow answer. The call assumes user has git LFS installed, otherwise it will fail and complain about missing git LFS.I've tested that the proposed changes work by adding my local copy as a path dependency. The package gets installed to a Poetry-managed virtual environment with all the submodules and weight files. And running
RetinaFacePredictor(threshold=0.8, device='cuda:0', model=RetinaFacePredictor.get_model('resnet50'))
loaded the model without problems.In the third commit I just fixed a small typo in
requirements.txt
while I was at it.I'll make a similar pull request for the
face_alignment
package.