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: Based on the provided shape, [1,1,16,32], and dtype float32, the tensor should have 512 values but has 93 #131
Comments
Not sure why the code snippet shown above should make any difference in production. Looking at the error message your issue most likely resides in loading a model. Check that the model files are served correctly in your production environment. |
Thanks! That solved it! |
@psiservices-azubizarreta Can you tell me how to solve? I have a same error. Thank you ! |
@psiservices-azubizarreta Hello ! I hava a same problem as you met, and it's very peremptorily, so。。Can you tell us the way to solve this situation plz ? my very thanks! |
a bit stuck here too how did you solve it on production? |
For me, this problem caused by the uploading process. I'm using filezilla and it's solved by change the transfer type to binary. Sorry for commenting on closed issue. |
@atmosuwiryo this helped! |
I managed to solve it serving model files from a cdn |
That address seems invalid... |
@aryehrein , well it tends to hibernate occasionally. You have to wake it up by pasting the link to |
It was actually a different problem - the json files managed to get loaded, but the non extension files (e.g. "age_gender_model-shard1") weren't. So what I did - I used my downloaded "weights" folder (and not the cdn), and for each model I :
For example:
Pay attention that some manifest.json files have 2 paths |
@aryehrein It tried that (adding extension in non-extension files) and also changing the name in .json files but it is still not working !! |
@aryehrein i am getting this => Error: Based on the provided shape, [1,1,128,256], the tensor should have 32768 values but has 12137 (i am using the face_landmark_68_model). |
Please help |
This solution worked for me. Thanks! |
Maybe it will help somebody: The error occurred when I started my local server with --spa, when removed it error gone |
@aryehrein Changing the file names worked for me! (adding an extension to -shard1 files). Thanks for the tip!! I hope it will help more people. I would say that in my case I was developing an Ionic 5 (angular) app with face-api. It worked with ionic when testing with "ionic serve" in Chrome browser. It failed (and I need to apply this fix) when I created the app and tested in a real android device. |
Added .bin file extension to tiny_face_detector tfjs model. Else the file is not being served in production mode. Changed the file |
Thanks! that's the solution |
Hello all, |
My webserver does not allow paths to be accessed by the browser so I get 404 errors even though the models directory exists. Is there another way that I can load these net jsons? |
My first thought is to host them on some site for free and lots them from there but you might be able to do something else with the updated version of this project => https://github.com/vladmandic/face-api |
Hi! I'm having trouble making the library work on production. Everything works perfect locally.
Using angular 4. Here is the code:
const detections: Array<any> = await faceapi.detectAllFaces(this.video, new faceapi.TinyFaceDetectorOptions({ inputSize: 128, scoreThreshold: 0.4 }));
Also the video is 351x360 pixels
The text was updated successfully, but these errors were encountered: