未验证 提交 e4130964 编写于 作者: C cc 提交者: GitHub

[CI][Demo] Add shufflenetv2 in test_libs demo (#3499) (#3501)

*  Add shufflenetv2 in test_libs demo, test=develop
上级 238424f6
**测试PaddleLite C++预测库**
1、编译full_publish预测库,需要打开build_extra,比如 `./lite/tools/build.sh --arm_os=android --arm_abi=armv8 --arm_lang=gcc --android_stl=c++_static --build_extra=ON full_publish`
2、进入编译产出的目录,比如 `build.lite.android.armv8.gcc/inference_lite_lib.android.armv8/demo/cxx/test_libs`,执行 `sh prepare.sh`,得到所有测试文件在 `test_lite_lib_files` 文件中
3、将 `test_lite_lib_files` 文件push到手机上,进入手机端 `test_lite_lib_files` 目录,执行 `sh run.sh`,查看log信息统计测试结果,其中涵盖测试light库、full库、动态库和静态库。
export LD_LIBRARY_PATH=$PWD/lite/lib/:${LD_LIBRARY_PATH}
# mobilenetv1
model_name="mobilenetv1"
input_params="--img_txt_path=models_imgs/images/classification.jpg.txt \
--out_max_value=0.936887 \
--out_max_value_index=65"
echo "Test ${model_name}: light_shared, light_static, full_shared, full_static."
./classification_light_shared \
--optimized_model_path=models_imgs/models/mobilenetv1.nb \
--img_txt_path=models_imgs/images/classification.jpg.txt \
--out_max_value=0.936887 \
--out_max_value_index=65
./classification_light_static \
--optimized_model_path=models_imgs/models/mobilenetv1.nb \
--img_txt_path=models_imgs/images/classification.jpg.txt \
--out_max_value=0.936887 \
--out_max_value_index=65
./classification_full_static \
--model_dir=models_imgs/models/mobilenetv1 \
--img_txt_path=models_imgs/images/classification.jpg.txt \
--out_max_value=0.936887 \
--out_max_value_index=65
./classification_full_shared \
--model_dir=models_imgs/models/mobilenetv1 \
--img_txt_path=models_imgs/images/classification.jpg.txt \
--out_max_value=0.936887 \
--out_max_value_index=65
./classification_light_shared ${input_params} \
--optimized_model_path=models_imgs/models/mobilenetv1.nb
./classification_light_static ${input_params} \
--optimized_model_path=models_imgs/models/mobilenetv1.nb
./classification_full_shared ${input_params} \
--model_dir=models_imgs/models/mobilenetv1
./classification_full_static ${input_params} \
--model_dir=models_imgs/models/mobilenetv1
# mobilenetv2
model_name="mobilenetv2"
input_params="--img_txt_path=models_imgs/images/classification.jpg.txt \
--out_max_value=0.868888 \
--out_max_value_index=65"
echo "Test ${model_name}: light_shared, light_static, full_shared, full_static."
./classification_light_shared ${input_params} \
--optimized_model_path=models_imgs/models/mobilenetv2.nb
./classification_light_static ${input_params} \
--optimized_model_path=models_imgs/models/mobilenetv2.nb
./classification_full_shared ${input_params} \
--model_dir=models_imgs/models/mobilenetv2
./classification_full_static ${input_params} \
--model_dir=models_imgs/models/mobilenetv2
./classification_light_shared \
--optimized_model_path=models_imgs/models/mobilenetv2.nb \
--img_txt_path=models_imgs/images/classification.jpg.txt \
--out_max_value=0.868888 \
--out_max_value_index=65
./classification_light_static \
--optimized_model_path=models_imgs/models/mobilenetv2.nb \
--img_txt_path=models_imgs/images/classification.jpg.txt \
--out_max_value=0.868888 \
--out_max_value_index=65
./classification_full_static \
--model_dir=models_imgs/models/mobilenetv2 \
--img_txt_path=models_imgs/images/classification.jpg.txt \
--out_max_value=0.868888 \
--out_max_value_index=65
./classification_full_shared \
--model_dir=models_imgs/models/mobilenetv2 \
--img_txt_path=models_imgs/images/classification.jpg.txt \
--out_max_value=0.868888 \
--out_max_value_index=65
# shufflenetv2
model_name="shufflenetv2"
input_params="--img_txt_path=models_imgs/images/classification.jpg.txt \
--out_max_value=0.776729 \
--out_max_value_index=65"
echo "Test ${model_name}: light_shared, light_static, full_shared, full_static."
./classification_light_shared ${input_params} \
--optimized_model_path=models_imgs/models/shufflenetv2.nb
./classification_light_static ${input_params} \
--optimized_model_path=models_imgs/models/shufflenetv2.nb
./classification_full_shared ${input_params} \
--model_dir=models_imgs/models/shufflenetv2
./classification_full_static ${input_params} \
--model_dir=models_imgs/models/shufflenetv2
# yolov3
model_name="yolov3"
input_params="--img_txt_path=models_imgs/images/yolov3.jpg.txt \
--out_values=0,0.153605,174.494,199.729,562.075,604.014"
echo "Test ${model_name}: light_shared, light_static, full_shared, full_static."
./yolov3_light_shared ${input_params} \
--optimized_model_path=models_imgs/models/yolov3_mobilenetv1.nb
./yolov3_light_static ${input_params} \
--optimized_model_path=models_imgs/models/yolov3_mobilenetv1.nb
./yolov3_full_shared ${input_params} \
--model_dir=models_imgs/models/yolov3_mobilenetv1
./yolov3_light_shared \
--optimized_model_path=models_imgs/models/yolov3_mobilenetv1.nb \
--img_txt_path=models_imgs/images/yolov3.jpg.txt \
--out_values=0,0.153605,174.494,199.729,562.075,604.014
./yolov3_light_static \
--optimized_model_path=models_imgs/models/yolov3_mobilenetv1.nb \
--img_txt_path=models_imgs/images/yolov3.jpg.txt \
--out_values=0,0.153605,174.494,199.729,562.075,604.014
./yolov3_full_static \
--model_dir=models_imgs/models/yolov3_mobilenetv1 \
--img_txt_path=models_imgs/images/yolov3.jpg.txt \
--out_values=0,0.153605,174.494,199.729,562.075,604.014
./yolov3_full_shared \
--model_dir=models_imgs/models/yolov3_mobilenetv1 \
--img_txt_path=models_imgs/images/yolov3.jpg.txt \
--out_values=0,0.153605,174.494,199.729,562.075,604.014
./yolov3_full_static ${input_params} \
--model_dir=models_imgs/models/yolov3_mobilenetv1
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册