Skip to content

Issue when I serve the models from my local server #169

Answered by vladmandic
jhayush0502 asked this question in Q&A
Discussion options

You must be logged in to vote

load method takes uri of a folder containing model json, not json itself.

  const modelPath = 'http://localhost:3001/models'
  await faceapi.nets.tinyFaceDetector.load(modelPath);
  await faceapi.nets.ssdMobilenetv1.load(modelPath);
  await faceapi.nets.ageGenderNet.load(modelPath);
  await faceapi.nets.faceLandmark68Net.load(modelPath);
  await faceapi.nets.faceRecognitionNet.load(modelPath);
  await faceapi.nets.faceExpressionNet.load(modelPath);

and if you're using faceapi on the SAME express server, then why specify FQDN to start with, its much better to use relative path

  const modelPath = '/models'

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@jhayush0502
Comment options

@vladmandic
Comment options

@jhayush0502
Comment options

Answer selected by jhayush0502
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants