0

我试图使用他们官方网站上提供的“detect_image.py”示例运行训练后 int8 量化检测模型(通过 tflite 和珊瑚 edgetpu 编译器生成)。

python3 examples/detect_image.py   --model test_data/int8_model_edgetpu.tflite   --labels test_data/tflite_label_map.txt   --input test_data/parrot.jpg   --output ${HOME}/parrot.jpg

但这会导致以下错误。

Traceback (most recent call last):
  File "examples/detect_image.py", line 109, in <module>
    main()
  File "examples/detect_image.py", line 88, in main
    objs = detect.get_objects(interpreter, args.threshold, scale)
  File "/home/mha/miniconda3/envs/tensorflow2/lib/python3.6/site-packages/pycoral/adapters/detect.py", line 237, in get_objects
    return [make(i) for i in range(count) if scores[i] >= score_threshold]
  File "/home/mha/miniconda3/envs/tensorflow2/lib/python3.6/site-packages/pycoral/adapters/detect.py", line 237, in <listcomp>
    return [make(i) for i in range(count) if scores[i] >= score_threshold]
IndexError: index 10 is out of bounds for axis 0 with size 10
4

0 回答 0