Regression model with 2D vector as inputs

Hello,
Is it possible for a regression model to set the label to a 2D vector instead of a scalar?
Thanks

Hi @Keja, good question… Not really at the moment, as the tooling around this expects scalar values. What’s the usecase here? Would be happy to consider other types of labels in general.

Hello @janjongboom,
The use case is simple : I have a mechanical crackmeter (see https://images.app.goo.gl/4nUXFEFkVJFK63YM6 for example) and I want to train my vision Sheild with a regression model to report the x and y deplacement on the 2d plane.
It works for déplacements on one axis but wanted to extend to 2d.
Hope it makes sense
Thanks

udpate : when I said that the model worked with scalars it is when doing inference on the edgeimpulse platform.
It seems OpenMV doesn’t support regression with tf. The only value I’m getting once the model is deployed on the mcu is the confidence values.

Hi @Keja, thanks for the update, and makes sense. I’ll add it for review to the ML teams backlog.

It seems OpenMV doesn’t support regression with tf. The only value I’m getting once the model is deployed on the mcu is the confidence values.

This is interesting though, the final output should be the same on OpenMV as in Edge Impulse. You should get a single value out of the network that is the output of the regression. What do you mean with ‘the confidence values’ here?

Hi @janjongboom, thanks for the feedback.
On edgeimpulse I get a single value which is indeed the output of the regression ( a value between -20 and +20 in my example) whereas on OpenMV I get a value between 0 and 1, similar to a confidence score for a classification model.

@Keja, weird… I’ll ping OpenMV.

edit: Which of your projects does this refer to?

@janjongboom , it s project “Crackmeter”
Tbh I have pinged them already and they told me I had to multiply the value I was getting by 255 but it still doesn’t do it. I was not able to identify a linear relationship between the value I m getting on openmv and the value on edgeimpulse yet.
Maybe you ll have more luck :wink:

My guess is that the quantization parameters are not used properly (different quantization scheme for regression than for normal image models) - have pinged Kwabena.

thanks ! well appreciated

1 Like