Problems to use webcam with my Publishable API Key and model

Hi I trained and published the model for gender classification but I’m not able to use it with a webcam. Why is that?

Hey @Ryan_Seiyu

We haven’t yet implemented the webcam in the Universe visualization tab for classification models. You can still take images and upload them to see how they perform.

Hi @leo ,

I’ve also tried using roboflow.js but no success. It returned me code 401, so no authorization, is there any way to circumvate this?

401 codes mean, as you mentioned, a authorization issue.

Double-check that you are 1) using the roboflow.auth() function and 2) that you are using your publishable_key not your API key.

Please see the docs page for more info: Web Browser | Roboflow Docs

Hi @leo thanks for answering me, I’m using roboflow.auth() but I’m having this error message on the Chrome inspector’s console:

index.html:1 Uncaught (in promise)

1. {error: {…}}

  1. error: {message: 'No trained model was found for this model version.', type: 'GraphMethodException', hint: 'You must train a model on this version with Roboflow Train before you can use inference.', e: Array(2)}
  2. [[Prototype]]: Object

Even though I do have my trained model. The error I’m getting now is 404

Model name: gender-classification-yisqx
Version: 2

Well I’ve tried using python too, but no good, I guess my trained model just doesn’t work with videos.

Hey @Ryan_Seiyu

Could you share the Universe link of the project you’re working with? It’s possible you used a version number that doesn’t have a trained model.

Hi @leo
I’ve solved the problem, the project type was for Classification, which I believe doesn’t provide the necessary authorization to use inference with a webcam.

But if I create a project type of Object Detection, it will work.

Thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.