X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=run.sh;h=fe041f2f98c9c61d575c84aef7cee429c27cc561;hb=fe5dee151313b6abd8ffee2c5fc5593f326e663f;hp=d905ef996a22d739fbaf91bcab00dabdc15876f9;hpb=8e60c68637e79580cdefa53edf79a4804849997d;p=dyncnn.git diff --git a/run.sh b/run.sh index d905ef9..fe041f2 100755 --- a/run.sh +++ b/run.sh @@ -28,41 +28,79 @@ set -o pipefail [[ "${TORCH_NB_THREADS}" ]] || echo "You can set \$TORCH_NB_THREADS to the proper value (default 1)." [[ "${TORCH_USE_GPU}" ]] || echo "You can set \$TORCH_USE_GPU to 'yes' or 'no' (default 'no')." [[ "${DYNCNN_DATA_DIR}" ]] || DYNCNN_DATA_DIR="./data/10p-mg" -[[ "${DYNCNN_RESULT_DIR}" ]] || DYNCNN_RESULT_DIR="./results" - -if [[ -d "${DYNCNN_DATA_DIR}" ]]; then - echo "Found ${DYNCNN_DATA_DIR}, checking the number of images in there." - if [[ $(find "${DYNCNN_DATA_DIR}" -name "dyn_*.png" | wc -l) == 150000 ]]; then - echo "Looks good !" - else - echo "I do not find the proper number of images. Please remove the dir and re-run this scripts, or fix manually." - exit 1 - fi -else - # Creating the data-base + +[[ "${DYNCNN_RUNDIR}" ]] || DYNCNN_RUNDIR="./results" + +###################################################################### +# Create the data-set if the directory does not exist + +if [[ ! -d "${DYNCNN_DATA_DIR}" ]]; then + cat <