facenet-pytorch-glint360k
facenet-pytorch-glint360k copied to clipboard
Error with code in readme for pretrained model
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'
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.
Thanks! I appreciate your hard work and sharing with community.