logo

LED灯运行程序后频闪

2021-08-04 21:25
C
_5hpe

运行示例:采集摄像头图片程序时正常,但运行EI训练完的ei_image_classification.py程序时,LED白光频闪,请问应该检查代码部分的什么问题。

import sensor, image, time, os, tf

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 = "trained.tflite"
labels = [line.rstrip('\n') for line in open("labels.txt")]

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())
        # 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")
2021-08-05 13:26
I
网红小智智 星瞳科技

IDE中具体的报错提示是什么?

2021-08-05 15:19
C
_5hpe

IDE不可操作,实时图像无刷新,点任何按钮都报“忙碌”,连×按钮点了都没用,只能拔线

2021-08-05 15:40
C
_5hpe

对了,还有就是我的EDGE impulse和教程也不太一样:

1、我的数据是在网页里上传的,通过IDE上传输入账号密码报“SSL”错误,关了防火墙也一样;

ccbaf624-49bd-45ed-8837-966b19476999.png
9c7c640d-e5d2-4608-9ec5-895e933d4c9c.png
2021-08-06 19:33
C
_5hpe

@kidswong999 IDE不可操作,实时图像无刷新,点任何按钮都报“忙碌”,连×按钮点了都没用,只能拔线。

对了,还有就是我的EDGE impulse和教程也不太一样:

1、我的数据是在网页里上传的,通过IDE上传输入账号密码报“SSL”错误,关了防火墙也一样;

2、我完成version以后,deploy your impulse的时候,教程里openmv按钮是在create library,而我的是在build firmware里。是不是我的网页有什么问题(图片)↓

9c7c640d-e5d2-4608-9ec5-895e933d4c9c.png
2021-08-12 16:27
I
网红小智智 星瞳科技

和edge impulse上下载固件的位置没关系。

I
网红小智智 星瞳科技

具体的固件版本是什么?是最新的吗?硬件版本是什么?