lhoyer / DAFormer

[CVPR22] Official Implementation of DAFormer: Improving Network Architectures and Training Strategies for Domain-Adaptive Semantic Segmentation
Other
466 stars 91 forks source link

test.sh: 4: Bad substitution #83

Closed yuheyuan closed 1 year ago

yuheyuan commented 1 year ago

Hello,I follow your test.sh run

sh test.sh work_dirs/211108_1622_gta2cs_daformer_s0_7f24c

Then it occour

test.sh: 4: Bad substitution
 ailab@ailab:/media/ailab/data/yy/DAFormer$ sh test.sh work_dirs/211108_1622_gta2cs_daformer_s0_7f24c
test.sh: 4: Bad substitution

here is the test.sh

#!/bin/bash

TEST_ROOT=$1
CONFIG_FILE="${TEST_ROOT}/*${TEST_ROOT: -1}.json"
CHECKPOINT_FILE="${TEST_ROOT}/latest.pth"
SHOW_DIR="${TEST_ROOT}/preds/"
echo 'Config File:' $CONFIG_FILE
echo 'Checkpoint File:' $CHECKPOINT_FILE
echo 'Predictions Output Directory:' $SHOW_DIR
python -m tools.test ${CONFIG_FILE} ${CHECKPOINT_FILE} --eval mIoU --show-dir ${SHOW_DIR} --opacity 1

DO you have some ways to solve it.

SSSilvester commented 2 months ago

use bash test.sh work_dirs/211108_1622_gta2cs_daformer_s0_7f24c