VIM3 NPU demo for SSD MobileNet

@Akkisony Maybe you should use caffe SSD model

@Frank Thank you for letting me know, but is there any reason, why does this not work? Why only caffe model? Can you please shed some inputs?

@Frank @alcohol I have converted the mobilenet.caffemodel to .tmfile(uint8) format.
Now, how do I convert them to .o format, which can be run on Khadas VIM3?

For Yolov3, git clone https://gitlab.com/khadas/tengine_khadas_app.git this repo helped me to do it, is there a similar one for caffe models? @numbqq
CAN YOU PLEASE HELP ME BY REPLYING?
Thank you!

Hey @Frank, is the person detect demo for the latest NN API will be out soon?

I have been waiting for over a month. Thanks in advance.

1 Like

Sorry for waiting such a long time.
an example is:Tengine/tm_mobilenet_ssd_uint8.cpp at tengine-lite · OAID/Tengine · GitHub
The diff between
Tengine/tm_classification.c at tengine-lite · OAID/Tengine · GitHub
and
Tengine/tm_classification_timvx.c at tengine-lite · OAID/Tengine · GitHub
shows how to use Tengine TIM-VX backend on VIM3.

1 Like

@alcohol Thank you for the information and clarity. After converting the model to tengine format(uint8), I used Tengine/tm_mobilenet_ssd_uint8.cpp at tengine-lite · OAID/Tengine · GitHub this for post processing and inference. But, I am gettting several errors with a huge log file. Please look at some of the errors.

  1. Isnt this file using Opencv to import images? If not, then what is it using (which library)?

tm_mobilenet_ssd_uint8.cpp: In function ‘void get_input_uint_data_ssd(const char*, uint8_t*, int, int, float, int)’:
tm_mobilenet_ssd_uint8.cpp:57:5: error: ‘image’ was not declared in this scope
57 | image img = imread_process(image_file, img_w, img_h, mean, scales);
| ^~~~~
tm_mobilenet_ssd_uint8.cpp:59:35: error: ‘img’ was not declared in this scope; did you mean ‘img_h’?
59 | float* image_data = ( float* )img.data;
| ^~~
| img_h
tm_mobilenet_ssd_uint8.cpp:65:13: error: ‘married’ was not declared in this scope
65 | married = 255 ;
| ^~~~~~~
tm_mobilenet_ssd_uint8.cpp:67:13: error: ‘married’ was not declared in this scope
67 | married = 0 ;
| ^~~~~~~
tm_mobilenet_ssd_uint8.cpp:72:5: error: ‘free_image’ was not declared in this scope
72 | free_image(img);

Please can you tell me what am I missing? Your input matters alot for me to debug the problem.
Please note the pretrained model I am using is taken from GitHub - chuanqi305/MobileNet-SSD: Caffe implementation of Google MobileNet SSD detection network, with pretrained weights on VOC0712 and mAP=0.727.. So i believe there is no much chnages required to Tengine/tm_mobilenet_ssd_uint8.cpp at tengine-lite · OAID/Tengine · GitHub this file.
@Frank @alcohol Any inputs? :slight_smile:

@Frank

Is there any particular reason for this?
Can MobileNet-SSD work with NPU using Tengine SDK?
Please let me know your inputs :slight_smile: Thank you!