mediapipe脚本可视化生成apk文件

#!/bin/bash


preparelist="objectdetectioncpu
	objectdetectiongpu
	facedetectioncpu
	facedetectiongpu
	facemeshgpu
	handdetectiongpu
	handtrackinggpu
	multihandtrackinggpu
	objectdetection3d
	templatematchingcpu
	hairsegmentationgpu
	edgedetectiongpu
	facedetection"

#echo ${preparelist[@]}


if [ $# != 1 ] ; then
	echo "请输入要编译的项目:"
	for indexii in $preparelist
	do
	 		echo " e.g.: $0 $indexii";
	done
exit 1;
else
		if [[ $1 =~ $indexii ]];then
			echo "要编译的项目: $1"
		fi
fi



cd ${HOME}/githubSave/mediapipe
##bazel clean --expunge
bazel build --cxxopt='--std=c++14' -c opt --fat_apk_cpu=arm64-v8a,armeabi-v7a     //mediapipe/examples/android/src/java/com/google/mediapipe/apps/$1:$1 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain --local_ram_resources=1024 --verbose_failures
sleep 1
##echo build complete.
path="bazel-bin/mediapipe/examples/android/src/java/com/google/mediapipe/apps/"$1
myFile=$1".apk"
if [  -f "$path/$myFile" ];then
echo "build apk name:"$myFile
cd $path
echo -e "###################################################################################"
echo -e "\033[35mbazel-bin/mediapipe/examples/android/src/java/com/google/mediapipe/apps/$1"
sub_apk_string=".apk"

filelist=`ls ${PWD}`
for file in $filelist
do
	if [[ $file =~ $sub_apk_string ]]
	then
		echo -e "\033[32m$file"
	else
		echo -e "\033[34m$file"
	fi
done
fi

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Teleger

你的支持是我前进的方向

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值