Download engine/BiRefNet/test.sh from HexBuddy/LHM: direct link, hf CLI and curl.
- Browser
- Download file 687 Bytes
-
https://huggingface.co/spaces/HexBuddy/LHM/resolve/main/engine/BiRefNet/test.sh
- Command line
-
hf download hf://spaces/HexBuddy/LHM/engine/BiRefNet/test.sh
-
curl -L -o test.sh https://huggingface.co/spaces/HexBuddy/LHM/resolve/main/engine/BiRefNet/test.sh
687 Bytes
| devices=${1:-0} | |
| pred_root=${2:-e_preds} | |
| # Inference | |
| CUDA_VISIBLE_DEVICES=${devices} python inference.py --pred_root ${pred_root} | |
| echo Inference finished at $(date) | |
| # Evaluation | |
| log_dir=e_logs && mkdir ${log_dir} | |
| task=$(python3 config.py --print_task) | |
| testsets=$(python3 config.py --print_testsets) | |
| testsets=(`echo ${testsets} | tr ',' ' '`) && testsets=${testsets[@]} | |
| for testset in ${testsets}; do | |
| # python eval_existingOnes.py --pred_root ${pred_root} --data_lst ${testset} > ${log_dir}/eval_${testset}.out | |
| nohup python eval_existingOnes.py --pred_root ${pred_root} --data_lst ${testset} > ${log_dir}/eval_${testset}.out 2>&1 & | |
| done | |
| echo Evaluation started at $(date) | |