• train_faster_rcnn.sh


    #!/bin/bash

    set -x
    set -e

    export PYTHONUNBUFFERED="True"

    GPU_ID=$1
    DATASET=$2
    NET=$3

    array=( $@ )
    len=${#array[@]}
    EXTRA_ARGS=${array[@]:3:$len}
    EXTRA_ARGS_SLUG=${EXTRA_ARGS// /_}

    case ${DATASET} in
    pascal_voc)
    TRAIN_IMDB="voc_2007_trainval"
    TEST_IMDB="voc_2007_test"
    #STEPSIZE="[50000]"
    #ITERS=70000
    STEPSIZE="[500]"
    ITERS=10000
    ANCHORS="[8,16,32]"
    RATIOS="[0.5,1,2]"
    ;;
    pascal_voc_0712)
    TRAIN_IMDB="voc_2007_trainval+voc_2012_trainval"
    TEST_IMDB="voc_2007_test"
    #STEPSIZE="[80000]"
    #ITERS=110000
    STEPSIZE="[200]"
    ITERS=3200
    ANCHORS="[8,16,32]"
    RATIOS="[0.5,1,2]"
    ;;
    coco)
    TRAIN_IMDB="coco_2014_train+coco_2014_valminusminival"
    TEST_IMDB="coco_2014_minival"
    #STEPSIZE="[350000]"
    #ITERS=490000
    STEPSIZE="[100]"
    ITERS=4000
    ANCHORS="[4,8,16,32]"
    RATIOS="[0.5,1,2]"
    ;;
    *)
    echo "No dataset given"
    exit
    ;;
    esac

    LOG="experiments/logs/${NET}_${TRAIN_IMDB}_${EXTRA_ARGS_SLUG}_${NET}.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
    exec &> >(tee -a "$LOG")
    echo Logging output to "$LOG"

    set +x
    if [[ ! -z ${EXTRA_ARGS_SLUG} ]]; then
    NET_FINAL=output/${NET}/${TRAIN_IMDB}/${EXTRA_ARGS_SLUG}/${NET}_faster_rcnn_iter_${ITERS}.ckpt
    else
    NET_FINAL=output/${NET}/${TRAIN_IMDB}/default/${NET}_faster_rcnn_iter_${ITERS}.ckpt
    fi
    set -x

    if [ ! -f ${NET_FINAL}.index ]; then
    if [[ ! -z ${EXTRA_ARGS_SLUG} ]]; then
    CUDA_VISIBLE_DEVICES=${GPU_ID} time python ./tools/trainval_net.py
    --weight data/imagenet_weights/${NET}.ckpt
    --imdb ${TRAIN_IMDB}
    --imdbval ${TEST_IMDB}
    --iters ${ITERS}
    --cfg experiments/cfgs/${NET}.yml
    --tag ${EXTRA_ARGS_SLUG}
    --net ${NET}
    --set ANCHOR_SCALES ${ANCHORS} ANCHOR_RATIOS ${RATIOS}
    TRAIN.STEPSIZE ${STEPSIZE} ${EXTRA_ARGS}
    else
    CUDA_VISIBLE_DEVICES=${GPU_ID} time python ./tools/trainval_net.py
    --weight data/imagenet_weights/${NET}.ckpt
    --imdb ${TRAIN_IMDB}
    --imdbval ${TEST_IMDB}
    --iters ${ITERS}
    --cfg experiments/cfgs/${NET}.yml
    --net ${NET}
    --set ANCHOR_SCALES ${ANCHORS} ANCHOR_RATIOS ${RATIOS}
    TRAIN.STEPSIZE ${STEPSIZE} ${EXTRA_ARGS}
    fi
    fi

    ./experiments/scripts/test_faster_rcnn.sh $@
  • 相关阅读:
    SQL删除重复记录
    C#分页插件 Webdiyer
    B/S系统操作日志设计思路
    VS2010自动添加版权信息以及更改默认的jquery库
    Gridview中添加CheckBox全选
    利用log4net记录操作日志
    如何在定义游标的时候使用动态sql语句
    java 获取指定月份第一天和最后一天
    java 判断星期几
    SSH登陆错误"WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! "
  • 原文地址:https://www.cnblogs.com/herd/p/10875415.html
Copyright © 2020-2023  润新知