Custom create kmodel file not loading

I get tine yolo v3 .h5 file from here -

After I get I followed this Train, Convert, Run MobileNet on Sipeed MaixPy and MaixDuino ! article steps and I created kmodel file.

Then I use the following code:

import sensor,image,lcd,time
import KPU as kpu

clock = time.clock()

classes = ['person',  'bicycle',  'car', 'motorcycle', 'airplane', 'bus', 'train',  'truck',  'boat',  'traffic light',  'fire hydrant', 'stop_sign', 'parking meter',   'bench',   'bird',   'cat',   'dog',   'horse',   'sheep',   'cow',   'elephant',   'bear',   'zebra', 'giraffe',   'backpack',   'umbrella',   'handbag',   'tie',   'suitcase',   'frisbee',   'skis',   'snowboard', 'sports ball',  'kite',   'baseball bat',   'baseball glove',   'skateboard',   'surfboard',   'tennis racket', 'bottle',   'wine glass',   'cup',   'fork',   'knife',   'spoon',   'bowl',   'banana',   'apple',   'sandwich',   'orange', 'broccoli',   'carrot',   'hot dog',   'pizza',   'donot',   'cake',   'chair',   'couch',   'potted plant',   'bed', 'dining table',   'toilet',   'tv',   'laptop',   'mouse',   'remote',   'keyboard',   'cell phone',   'microwave',   'oven', 'toaster',   'sink',   'refrigerator',   'book',   'clock',   'vase',   'scissors',   'teddy bear',   'hair dryer',   'toothbrush']
task = kpu.load("/sd/yolot.kmodel")
anchor = (1.08, 1.19, 3.42, 4.41, 6.63, 11.38, 9.42, 5.11, 16.62, 10.52)
a = kpu.init_yolo2(task, 0.5, 0.3, 5, anchor)
    img = sensor.snapshot()
    code = kpu.run_yolo2(task, img)
    if code:
        for i in code:
            a = lcd.display(img)
            for i in code:
                lcd.draw_string(i.x(), i.y(), classes[i.classid()], lcd.RED, lcd.WHITE)
                lcd.draw_string(i.x(), i.y()+12, '%f1.3'%i.value(), lcd.RED, lcd.WHITE)
        a = lcd.display(img)
a = kpu.deinit(task)

when I run the code it says

Traceback (most recent call last):
File “”, line 13, in
ValueError: b>>>

The error message also aspire


What is the problem with it? Is it a problem with .h5 file?

Also, above mentioned Train, Convert, Run MobileNet on Sipeed MaixPy and MaixDuino ! article kmodel also not working for me. Some other yolo 20 class, yolo face detection, MNIST kmodels are working for me.

What is the problem?

can you run demo code correctly? it seems camera not init ok

Hi, please try changing the path from “/sd/yolot.kmodel” to “yolot.kmodel”. This seemed to work for me