I'm trying to use COCO-SSD and discord.js to create an "Object classifying bot".
I'm using tfjs and I ran into an issue where "tf.node.decodeImage()", The main function that converts my image into a tensor can only return an int32 type array "For now".
Does that mean I'm just gonna have to wait until tfjs will add that feature? or is there some way to convert the int32 array to int8 (I'm pretty sure I have to use int8, not 100% certain).
My code:
let img_buffer = fs.readFileSync(filepath)
const img = tf.node.decodePng(
img_buffer, channels=0, dtype=Uint32Array,expand_animations=false)
P.S: It doesn't matter if I change the dtype to uint8, It still outputs the exact same error. P.S2: I'm new to js so sorry if this is a rookie mistake.