D-X-Y / landmark-detection

Four landmark detection algorithms, implemented in PyTorch.
https://xuanyidong.com/assets/projects/TPAMI-2020-SRT.html
MIT License
925 stars 180 forks source link

SAN init_path using #55

Closed v-goncharenko closed 4 years ago

v-goncharenko commented 4 years ago

Which project are you using?

SAN

Issue description

I'm trying to evaluate your models through san_eval.py file and I'm converting evaluate function to kind of API endpoint to be able to use it as a client.

I wonder why do you use sys.path patching instead of simply importing modules in from lib import models fashion? For me this is an issue cause it affects my runtime if I use your code. Could you (or me in PR) fix imports to preserve sys.path untouched?

By the way I could provide PR for an API I've wrote if you are interested in it.

D-X-Y commented 4 years ago

Hi, it is because from lib import models require a python file being in the same dir as lib. Without sys.path it is fine in SAN. While my other projects use sys.path, so I'm used to using it. You are welcome to create a PR for API. Thanks a lot for your effort.