Hello,
i am currently trying to get a OpenMV firmware from edge impulse on a Nicla vision to work.
I followed all instructions from the following tutotial under the point “Deploying your impulse as an OpenMV firmware”
After flashing the new firmware (the .bin file from edge impulse) on the nicla vision the blue LED is blinking.
But when I try to run the included micropython-skript from edge impulse the following error occurs:
Exeption: Could not find the file and line 19 from the code is highlighted.
I hope you can help me with this error, because I really dont know what I did wrong. Thank you.
This is the .py skript included in edge impulse:
# Edge Impulse - OpenMV Image Classification Example
import sensor, image, time, os, tf, uos, gc
sensor.reset() # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # 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 = None
#labels = None
try:
# Load built in model
labels, net = tf.load_builtin_model('trained')
found = False
except Exception as e:
raise Exception(e) <-- Highlighted line 19
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 net.classify(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())
# This combines the labels and confidence values into a list of tuples
predictions_list = list(zip(labels, obj.output()))
for i in range(len(predictions_list)):
print("%s = %f" % (predictions_list[i][0], predictions_list[i][1]))
print(clock.fps(), "fps")