Created
April 28, 2019 20:08
-
-
Save headupinclouds/4bb7928cdd6b77955f92524e47d2af40 to your computer and use it in GitHub Desktop.
acf repo test for https://github.com/elucideye/acf/issues/107
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Get a test image: | |
wget https://s-i.huffpost.com/gen/2125210/images/n-EYES-628x314.jpg | |
TOOLCHAIN=gcc-5-pic-hid-sections | |
CONFIG=Release | |
function build_acf | |
{ | |
ES2=${1} | |
ES3=${2} | |
ACF_USE_EGL=ON | |
acf_args=( | |
--toolchain ${TOOLCHAIN} | |
--config-all ${CONFIG} | |
--verbose | |
--install | |
--clear | |
--test | |
--fwd | |
ACF_OPENGL_ES2=${ES2} | |
ACF_OPENGL_ES3=${ES3} | |
ACF_HAS_GPU=ON | |
ACF_BUILD_OGLES_GPGPU=ON | |
ACF_BUILD_TESTS=ON | |
ACF_USE_EGL=${ACF_USE_EGL} | |
) | |
polly.py ${acf_args[@]} | |
} | |
function run_acf | |
{ | |
ES2=${1} | |
ES3=${2} | |
run_args=( | |
--input=n-EYES-628x314.jpg | |
--model=_install/${TOOLCHAIN}/share/acf_unsplash_60x40_eye_any_color_d4.cpb | |
--nms | |
--annotate | |
--calibration=-0.002 | |
) | |
name=${TOOLCHAIN}_es2${ES2}_es3${ES3}_cpu | |
mkdir -p ${name} | |
args=( | |
--output=${name} | |
) | |
_install/${TOOLCHAIN}/bin/acf-detect ${run_args[@]} ${args[@]} | tee ${name}.txt | |
name=${TOOLCHAIN}_es2${ES2}_es3${ES3}_gpu | |
mkdir -p ${name} | |
args=( | |
--output=${name} | |
--gpu | |
) | |
_install/${TOOLCHAIN}/bin/acf-detect ${run_args[@]} ${args[@]} | tee ${name}.txt | |
} | |
function eye_test | |
{ | |
build_acf ${1} ${2} | |
run_acf ${1} ${2} | |
} | |
eye_test ON OFF # OpenGL ES 2.0 | |
eye_test OFF OFF # OpenGL (compatible subset) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment