i'm making a face recognition using Tensorflow JS and webcam , i saved my model , and then load it. The problem is my imaget data shape is always changed because of the face position
this is my code :
imgData = context.getImageData(from_left, from_top, potrait_height, potrait_height, 0, 0, potrait_height , potrait_height);
inputTensor = tf.browser.fromPixels(imgData);
my imageData always square because width or height are defined same as "potrait_height"
the problem is my model need 350,350,3 input shape , but my image data is always changed 250.250,3 or 300,300,3 or 400,400,3 depend on face position
how to resize imgData ?