edgetpu header file not found
sharoseali opened this issue · 3 comments
HI @iwatake2222 . Thanks for your awsome work.
I want to test different detection models on google corel edge TPU attached wit rasberry PI 4. First I download all the libraries by runing download_prebuilt_libraries.sh. ( This install many un necessory libraries for GPU and windows as well ) but any ways .
Then I build temp_pj_tflite_edgetpuapi_cls_mobilenet_v2 demo but it give error that no edgetpu.h found while making. THen i download edgetpu_runtime library from the link given here at the end. i run the install.sh, it runs succesfully and i copied theedgetpu header file to the demo and again tried to build but it again return me with some problems. Can you suggest what exactely the issue is going on here. Where is the correct edgetpu header file that we can use. ? THanks
Output is here:
$ cmake .. -DINFERENCE_HELPER_ENABLE_TFLITE_DELEGATE_EDGETPU=on -DINFERENCE_HELPER_ENABLE_TFLITE_DELEGATE_GPU=off -DINFERENCE_HELPER_ENABLE_TFLITE_DELEGATE_XNNPACK=off
[main] CMAKE_SYSTEM_PROCESSOR = armv7l, BUILD_SYSTEM = armv7
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/play_with_tflite/temp_pj_tflite_edgetpuapi_cls_mobilenet_v2/build
After make i got this
ubuntu@UDENTIFY:~/play_with_tflite/temp_pj_tflite_edgetpuapi_cls_mobilenet_v2/build $ make
[ 33%] Building CXX object CMakeFiles/main.dir/Main.cpp.o
In file included from /home/ubuntu/play_with_tflite/temp_pj_tflite_edgetpuapi_cls_mobilenet_v2/Main.cpp:19:
/home/ubuntu/play_with_tflite/temp_pj_tflite_edgetpuapi_cls_mobilenet_v2/model_utils.h:19:5: error: ‘edgetpu’ has not been declared
edgetpu::EdgeTpuContext* edgetpu_context);
^~~~~~~
/home/ubuntu/play_with_tflite/temp_pj_tflite_edgetpuapi_cls_mobilenet_v2/model_utils.h:19:28: error: expected ‘,’ or ‘...’ before ‘*’ token
edgetpu::EdgeTpuContext* edgetpu_context);
^
/home/ubuntu/play_with_tflite/temp_pj_tflite_edgetpuapi_cls_mobilenet_v2/Main.cpp: In function ‘int main()’:
/home/ubuntu/play_with_tflite/temp_pj_tflite_edgetpuapi_cls_mobilenet_v2/Main.cpp:55:18: error: ‘edgetpu’ was not declared in this scope
std::shared_ptr<edgetpu::EdgeTpuContext> edgetpu_context = edgetpu::EdgeTpuManager::GetSingleton()->OpenDevice();
^~~~~~~
/home/ubuntu/play_with_tflite/temp_pj_tflite_edgetpuapi_cls_mobilenet_v2/Main.cpp:55:18: note: suggested alternative: ‘getpt’
std::shared_ptr<edgetpu::EdgeTpuContext> edgetpu_context = edgetpu::EdgeTpuManager::GetSingleton()->OpenDevice();
^~~~~~~
getpt
/home/ubuntu/play_with_tflite/temp_pj_tflite_edgetpuapi_cls_mobilenet_v2/Main.cpp:55:41: error: template argument 1 is invalid
std::shared_ptr<edgetpu::EdgeTpuContext> edgetpu_context = edgetpu::EdgeTpuManager::GetSingleton()->OpenDevice();
^
/home/ubuntu/play_with_tflite/temp_pj_tflite_edgetpuapi_cls_mobilenet_v2/Main.cpp:55:61: error: ‘edgetpu’ is not a class, namespace, or enumeration
std::shared_ptr<edgetpu::EdgeTpuContext> edgetpu_context = edgetpu::EdgeTpuManager::GetSingleton()->OpenDevice();
^~~~~~~
/home/ubuntu/play_with_tflite/temp_pj_tflite_edgetpuapi_cls_mobilenet_v2/Main.cpp:56:108: error: request for member ‘get’ in ‘edgetpu_context’, which is of non-class type ‘int’
std::unique_ptr<tflite::Interpreter> interpreter = coral::BuildEdgeTpuInterpreter(*model, edgetpu_context.get());
^~~
make[2]: *** [CMakeFiles/main.dir/build.make:63: CMakeFiles/main.dir/Main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/main.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
"temp_" projects are old and not supported. Please don't use them.
"temp_" projects are old and not supported. Please don't use them.
was looking to test detection models: YOLOv5 on edge TPU with c++. which project I can use ?
pj_tflite_det_yolov5,but code modification is needed and I'm not sure it work with EdgeTPU. Also, you need to convert a model for EdgeTPU.