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

Error with code in readme for pretrained model #2

Open
intergalaticSpaceDog opened this issue Aug 11, 2020 · 2 comments
Open

Error with code in readme for pretrained model #2

intergalaticSpaceDog opened this issue Aug 11, 2020 · 2 comments

Comments

@intergalaticSpaceDog
Copy link

Hello, I tried your pretrained model with the code in the readme file but I get the below error. If I only pass in 'img' to preprocess it works but results aren't that great. Is there something I'm doing wrong? Thanks!

img = preprocess(img.to(device))
AttributeError: 'numpy.ndarray' object has no attribute 'to'

@tamerthamoqa
Copy link
Owner

Hi intergalacticSpaceDog,

Yeah my bad. The '.to()' method is a Torch Tensor method but the img was not preprocessed to be turned into a Torch Tensor yet. I have fixed the README example. Please tell me if other issues arise.

Also keep in mind the pre-trained model would not perform that well for more than a small-scale scope (would say 10 stored human identities and less). And also keep in mind this is still work in progress, I have added a disclaimer in the README.

@intergalaticSpaceDog
Copy link
Author

Thanks! I appreciate your hard work and sharing with community.

tamerthamoqa pushed a commit that referenced this issue Jan 18, 2021
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

No branches or pull requests

2 participants