Skip to content

Tensor must have a shape comprised of positive integers but got shape [1917,] #29

Description

@mingsoohea

I followed cloud.annotations.ai to train a custom model for tensorflow.js.
After cloning this project and copy the model_web to the public folder, I run npm install then npm run start.

The local page is showed with an error when detectFromVideoFrame:
Error: Tensor must have a shape comprised of positive integers but got shape [1917,]. at g (index.esm.js:17) at index.esm.js:17 at Array.forEach (<anonymous>) at Q (index.esm.js:17) at kn (index.esm.js:17) at Object.Dn [as tensor2d] (index.esm.js:17) at index.esm.js:500 at index.esm.js:17 at t.scopedRun (index.esm.js:17) at t.tidy (index.esm.js:17) at Object.Ke [as tidy] (index.esm.js:17) at runObjectDetectionPrediction (index.esm.js:499) at async Object.detect (index.esm.js:556)

After digging a bit into the source code, I found this strange:
Untitled

Untitled1

Untitled2

Untitled3

As you see, the scores and boxes have been swapped together. Is it intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions