I am trying to implement the EAST Model for text detection in images for tfjs-node. I downloaded the original frozen model, converted it using tensorflowjs_converter and then loaded the model with following code:
import * as tf from '@tensorflow/tfjs-node'
import fs from 'fs'
const handler = tf.io.fileSystem('/path/to/model')
const model await tf.loadGraphModel(handler)
const imageBuffer = fs.readFileSync('/path/to/image')
const tensor = tf.node.decodeImage(imageBuffer, 3)
.expandDims(0)
.toFloat()
const output = await model.executeAsnyc(tensor)
For some reasong the execution of the model fails, I get the following error: Error: Error in concat4D: Shape of tensors[1] (1,45,80,512) does not match the shape of the rest (1,46,80,2048) along the non-concatenated axis 1.
What am I doing wrong? 😭