Open swapanil opened 4 years ago
I saw the same error in a situation where I wasn't even using the Yolo model, which was confusing.
In the end it was because I had made a coding error, and the models I did want to use weren't actually loaded. Perhaps there is something in the FaceApiJs code where it throws a wrong error for a missing model, and ends up outputting the last name in the list of nets.
Hi @swapanil , I am faced with same issue. We have same code block. Have you solve your problem?
Hey @swapanil , FYI, I solved my problem. I couldn't load models correctly. Can u check your models location? It should be under the public folder as follows; public/models
I made it sure my all models are loading correctly infact my TinyYolov2 json and shard file loading correctly but still it showing me same issue, I replace it with SsdMobilenetv1Options it is working for now. I think this should be a bug.
I added this and issue resolved
faceapi.nets.tinyFaceDetector.loadFromUri(this.MODEL_URL),
This is probably due to failure to load the models you can try loading them like this instead
load from url
export async function loadModels() { const MODEL_URL = process.env.PUBLIC_URL + '/models' await faceapi.nets.loadTinyFaceDetectorModel.loadFromUri(MODEL_URL) await faceapi.nets.loadFaceLandmarkTinyModel.loadFromUri(MODEL_URL) await faceapi.nets.loadFaceRecognitionModel.loadFromUri(MODEL_URL) }
you can also load them from the disk
await faceapi.nets.loadTinyFaceDetectorModel.loadFromDisk('./models')
יש לי שגיאה דומה await faceapi.nets.tinyYolov2.loadFromUri('./model'); await faceapi.nets.tinyFaceDetector.loadFromUri('./model'); await faceapi.nets.faceLandmark68Net.loadFromUri('./model'); await faceapi.nets.faceRecognitionNet.loadFromUri('./model'); הוא בכלל לא מצליח להטען וכשאני מנסה להטעין מהאינטרנט עושה לי שגיאה await faceapi.nets.tinyYolov2.loadFromUri('https://example.com/models/tiny_yolov2_model'); await faceapi.nets.tinyFaceDetector.loadFromUri('https://example.com/models/tiny_yolov2_model'); await faceapi.nets.faceLandmark68Net.loadFromUri('https://example.com/models/tiny_yolov2_model'); await faceapi.nets.faceRecognitionNet.loadFromUri('https://example.com/models/tiny_yolov2_model'); אשמח לתשובה דחוף אני הרבה זמן עם זה
I had the same problem. I fixed the problem. here. I used this method and it worked for me :)
I am getting this error in production build in React Js and working fine when use npm start.
Please help me on this.