Hello,
I have a descent model that recognizes images, socks and chair legs. I’m happy enough with the accuracy that I wanted to try running it on my Portenta H7 with Vision Shield to start incorporating it into our larger project.
I went to Deployment on the Edge Impulse site and I chose the Arduino Library option. I got the zip library into the Arduino IDE and I opened the auto-generated example, “portent_h7_camera”. However, when I try to upload the code to the Portenta I get the following compile error:
Arduino: 1.8.16 (Mac OS X), Board: "Arduino Portenta H7 (M7 core), 1.5MB M7 + 0.5MB M4"
In file included from /Users/iang/Documents/Arduino/libraries/Socker_inferencing/src/Socker_inferencing.h:55:0,
from /Users/iang/Documents/Arduino/libraries/Socker_inferencing/examples/portenta_h7_camera/portenta_h7_camera.ino:24:
/Users/iang/Documents/Arduino/libraries/Socker_inferencing/src/edge-impulse-sdk/classifier/ei_run_classifier.h: In function 'EI_IMPULSE_ERROR {anonymous}::inference_tflite_run(uint64_t, TfLiteTensor*, TfLiteTensor*, TfLiteTensor*, uint8_t*, ei_impulse_result_t*, bool)':
/Users/iang/Documents/Arduino/libraries/Socker_inferencing/src/edge-impulse-sdk/classifier/ei_run_classifier.h:591:44: error: 'post_process_boxes' is not a member of 'tflite'
fill_result_struct_f32(result, tflite::post_process_boxes, tflite::post_process_scores, tflite::post_process_classes, debug);
^~~~~~~~~~~~~~~~~~
/Users/iang/Documents/Arduino/libraries/Socker_inferencing/src/edge-impulse-sdk/classifier/ei_run_classifier.h:591:72: error: 'post_process_scores' is not a member of 'tflite'
fill_result_struct_f32(result, tflite::post_process_boxes, tflite::post_process_scores, tflite::post_process_classes, debug);
^~~~~~~~~~~~~~~~~~~
/Users/iang/Documents/Arduino/libraries/Socker_inferencing/src/edge-impulse-sdk/classifier/ei_run_classifier.h:591:101: error: 'post_process_classes' is not a member of 'tflite'
fill_result_struct_f32(result, tflite::post_process_boxes, tflite::post_process_scores, tflite::post_process_classes, debug);
^~~~~~~~~~~~~~~~~~~~
/Users/iang/Documents/Arduino/libraries/Socker_inferencing/src/edge-impulse-sdk/classifier/ei_run_classifier.h: In function 'EI_IMPULSE_ERROR {anonymous}::run_inference(ei::matrix_t*, ei_impulse_result_t*, bool)':
/Users/iang/Documents/Arduino/libraries/Socker_inferencing/src/edge-impulse-sdk/classifier/ei_run_classifier.h:668:69: warning: division by zero [-Wdiv-by-zero]
input->data.uint8[ix] = static_cast<uint8_t>((pixel / EI_CLASSIFIER_TFLITE_INPUT_SCALE) + EI_CLASSIFIER_TFLITE_INPUT_ZEROPOINT);
/Users/iang/Documents/Arduino/libraries/Socker_inferencing/examples/portenta_h7_camera/portenta_h7_camera.ino: In function 'void loop()':
portenta_h7_camera:191:44: error: 'struct ei_impulse_result_t' has no member named 'classification'
ei_printf(" %s: %.5f\n", result.classification[ix].label, result.classification[ix].value);
^~~~~~~~~~~~~~
portenta_h7_camera:191:77: error: 'struct ei_impulse_result_t' has no member named 'classification'
ei_printf(" %s: %.5f\n", result.classification[ix].label, result.classification[ix].value);
^~~~~~~~~~~~~~
/Users/iang/Documents/Arduino/libraries/Socker_inferencing/examples/portenta_h7_camera/portenta_h7_camera.ino: In function 'int calculate_resize_dimensions(uint32_t, uint32_t, uint32_t*, uint32_t*, bool*)':
/Users/iang/Documents/Arduino/libraries/Socker_inferencing/examples/portenta_h7_camera/portenta_h7_camera.ino:398:56: warning: variable length array 'list' is used [-Wvla]
const ei_device_resize_resolutions_t list[list_size] = {
^
exit status 1
'struct ei_impulse_result_t' has no member named 'classification'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
And here is the line of code where the error is from IDE:
for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) {
ei_printf(" %s: %.5f\n", result.classification[ix].label, result.classification[ix].value);
}
Anyone have any ideas on how to fix this?