Tensorflow regression model

Hello,

Is it possible to run a tensorflow regression model on openmv?
I’ve created a regression model with edgeimpulse but when I run the inference on the MCU I only get the confidence value (as I have no labels).
Thanks

You can run a classification model. What do you mean by a regression model? What are you trying to do?

I have a mechanical crackmeter (see example ) and have trained a regression model with edge impulse to predict the x axis deplacement. The live classification gives me a scalar value on edgeimpulse platform but when I deploy on my vision Sheild
I 'm not able to get the scalar value, only the confidence score.

This is the same isn’t it though? The confidence score is a value between 0->1 or 0->255?

It s a value between 0 & 1

Can you post your code and the output?

the code :

Edge Impulse - OpenMV Image Classification Example

import sensor, image, time, os, tf

sensor.reset()                         # Reset and initialize the sensor.
sensor.set_pixformat(sensor.GRAYSCALE)    # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)      # Set frame size to QVGA (320x240)
sensor.set_windowing((240, 240))       # Set 240x240 window.
sensor.skip_frames(time=2000)          # Let the camera adjust.

net = "trained.tflite"


clock = time.clock()
while(True):
    clock.tick()

    img = sensor.snapshot()

    # default settings just do one detection... change them to search the image...
    for obj in tf.classify(net, img, min_scale=1.0, scale_mul=0.8, x_overlap=0.5, y_overlap=0.5):
        print("**********\nPredictions at [x=%d,y=%d,w=%d,h=%d]" % obj.rect())
        img.draw_rectangle(obj.rect())
        predictions =obj.output()
        for pred in predictions:
            print(pred)


    print(clock.fps(), "fps")

as per the serial output :

Predictions at [x=0,y=0,w=240,h=240]

0.372549

6.19775 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.341176

6.19779 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.313725

6.19783 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.262745

6.19786 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.215686

6.19779 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.235294

6.19783 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.278431

6.19787 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.184314

6.1979 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.0705882

6.19794 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.278431

6.19797 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.376471

6.1979 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.262745

6.19794 fps

**********

Predictions at [x=0,y=0,w=240,h=240]

0.490196

6.19798 fps

**********

thanks

Just multiply 0.313725 * 255

The 0.313725 is just the output you see in Edge Impulse divided by 255.