Things are going good.
Anyone know how to directly take a video webcam element and convert it to shape 1, 224, 224, 3
I can do it with a canvas but wonder if there is an easier way.
I am testing this

       const input_tensor = await tf.browser.fromPixels(video).toFloat().sub(255 / 2).div(255 / 2).reshape([1, 224, 224, 3]);

…
…
ooooooo  I see the issue I need to crop the video. Can that be done using the video element or do I have to convert it to a canvas. Also does anyone know the code to grab the middle pixels. Presently the webcam is 640 x 480 and I will need the middle 224 x 224.
…
Ok, getting there

       const input_tensor = await tf.data.webcam(video, {resizeWidth: 224, resizeHeight: 224, centerCrop : true,  });
       console.log('input_tensor')
       console.log(input_tensor)
       const myInputImage = await input_tensor.capture().

seems to give me tensors, now I just have to add a dimension.
The tensor is: 224,224,3
and I need 1,224,224,3
.expandDims(0); does not seem to work.