roboflow / homepage-demo

Build an in-browser model experience like the one on the Roboflow homepage.
https://roboflow.github.io/homepage-demo/
36 stars 16 forks source link

Error when using private roboflow model #4

Open gilcohen67 opened 3 months ago

gilcohen67 commented 3 months ago

When trying to use my own private model, I change current_model_name, version, API_KEY, and DETECT_API_KEY. I have also tried a version where I replace Microsoft COCO with the new model in available_models, and changing all if checks so that the new model completely replaces the Mircosoft COCO model. I can see in the network tab, that the model is retrieved successfully and saved as the current_model (and in available_models object).

I get the error:

graph_executor.js:131 Uncaught (in promise) Error: This execution contains the node 'StatefulPartitionedCall/assert_equal_1/Assert/AssertGuard/branch_executed/_139', which has the dynamic op 'Merge'. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [Identity]
    at Le.compile (graph_executor.js:131:19)
    at Le.execute (graph_executor.js:172:33)
    at Pe.execute (graph_model.js:311:38)
    at e.<anonymous> (index.ts:175:41)
    at roboflow.js:2:1249565
    at Object.next (roboflow.js:2:1249670)
    at roboflow.js:2:1248582
    at new Promise (<anonymous>)
    at r (roboflow.js:2:1248327)
    at e.infer (roboflow.js:2:1251050)
compile @ graph_executor.js:131
execute @ graph_executor.js:172
execute @ graph_model.js:311
(anonymous) @ index.ts:175
(anonymous) @ roboflow.js:2
(anonymous) @ roboflow.js:2
(anonymous) @ roboflow.js:2
r @ roboflow.js:2
e.infer @ roboflow.js:2
(anonymous) @ index.ts:495
(anonymous) @ roboflow.js:2
(anonymous) @ roboflow.js:2
(anonymous) @ roboflow.js:2
r @ roboflow.js:2
e.detect @ roboflow.js:2
detect @ main.js:371
(anonymous) @ script.js:402
Promise.then (async)
(anonymous) @ script.js:402
Promise.then (async)
(anonymous) @ script.js:401
setInterval (async)
(anonymous) @ script.js:399
MadeWithStone commented 1 month ago

@gilcohen67 Do you mind linking to the model in roboflow? we've also released a new js library called inferencejs which might resolve this issue. https://www.npmjs.com/package/inferencejs