Estoy tratando de implementar el modelo EAST para la detección de texto en imágenes para tfjs-node. Descargué el modelo congelado original, lo convertí usando tensorflowjs_converter y luego cargué el modelo con el siguiente código:
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) Por algún motivo falla la ejecución del modelo, me sale el siguiente 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.
¿Qué estoy haciendo mal? 😭