你好,请问怎么训练, 运行faster_rcnn_end2end.sh时,进入不到train_net.py脚本
yeyuxmf opened this issue · 8 comments
运行faster_rcnn_end2end.sh时,界面上的输出如下:
- export PYTHONUNBUFFERED=True
- PYTHONUNBUFFERED=True
- GPU_ID=0
- NET=VGG16
- NET_lc=vgg16
- DATASET=rrpn
- array=($@)
- len=3
- EXTRA_ARGS=
- EXTRA_ARGS_SLUG=
- case $DATASET in
- TRAIN_IMDB=MSRA_TRAIN
- TEST_IMDB=MSRA_TEST
- PT_DIR=rrpn
- ITERS=490000
++ date +%Y-%m-%d_%H-%M-%S - LOG=experiments/logs/faster_rcnn_end2end_VGG16_.txt.2018-01-29_19-19-20
- exec
++ tee -a experiments/logs/faster_rcnn_end2end_VGG16_.txt.2018-01-29_19-19-20 - echo Logging output to experiments/logs/faster_rcnn_end2end_VGG16_.txt.2018-01-29_19-19-20
Logging output to experiments/logs/faster_rcnn_end2end_VGG16_.txt.2018-01-29_19-19-20 - echo /home/into2/git/HRRPN/tools/train_net.py --gpu 0 --solver models/rrpn/VGG16/faster_rcnn_end2end/solver.prototxt --weights data/imagenet_models/VGG_ILSVRC_16_layers_fc_reduced.caffemodel --imdb MSRA_TRAIN --iters 490000 --cfg experiments/cfgs/faster_rcnn_end2end.yml
/home/into2/git/HRRPN/tools/train_net.py --gpu 0 --solver models/rrpn/VGG16/faster_rcnn_end2end/solver.prototxt --weights data/imagenet_models/VGG_ILSVRC_16_layers_fc_reduced.caffemodel --imdb MSRA_TRAIN --iters 490000 --cfg experiments/cfgs/faster_rcnn_end2end.yml
real 0m0.000s
user 0m0.000sc
sys 0m0.000s
- set +x
- echo ./tools/test_net.py --gpu 0 --def models/rrpn/VGG16/faster_rcnn_end2end/test.prototxt --net --imdb MSRA_TEST --cfg experiments/cfgs/faster_rcnn_end2end.yml
./tools/test_net.py --gpu 0 --def models/rrpn/VGG16/faster_rcnn_end2end/test.prototxt --net --imdb MSRA_TEST --cfg experiments/cfgs/faster_rcnn_end2end.yml
real 0m0.000s
user 0m0.000s
sys 0m0.000s
就是没有进入train_net.py脚本,而是直接退出了faster_rcnn_end2end.sh,请问是什么原因?还请大神指教!!!谢谢!!!
请问你是按照readme的说明开始训练的吗 @huang229
@mjq11302010044 是的,按照说明输入参数, ./experiments/scripts/faster_rcnn_end2end.sh 0 VGG16 rrpn,请问是不是我的参数没输正确?
@huang229 那你有组织自己的训练数据进行训练吗
@mjq11302010044数据输入之参考你的data_extractor.py修改的(我标记的格式不一样),读入到roidb中去.我运行./experiments/scripts/faster_rcnn_end2end.sh 0 VGG16没能进入到train_net.py中去.
于是我直接修改了train_net.py脚本的参数:
def parse_args():
"""
Parse input arguments
"""
parser = argparse.ArgumentParser(description='Train a Fast R-CNN network')
parser.add_argument('--gpu', dest='gpu_id',
help='GPU device id to use [0]',
default=0, type=int)
parser.add_argument('--solver', dest='solver',
help='solver prototxt',
default='/home/into2/git/HRRPN/models/rrpn/VGG16/faster_rcnn_end2end/solver.prototxt', type=str)
parser.add_argument('--iters', dest='max_iters',
help='number of iterations to train',
default=40000, type=int)
parser.add_argument('--weights', dest='pretrained_model',
help='initialize with pretrained model weights',
default='/home/into2/git/HRRPN/data/imagenet_models/VGG_ILSVRC_16_layers.caffemodel', type=str)
parser.add_argument('--cfg', dest='cfg_file',
help='optional config file',
default='/home/into2/git/HRRPN/experiments/cfgs/faster_rcnn_end2end.yml', type=str)
parser.add_argument('--imdb', dest='imdb_name',
help='dataset to train on',
default='MSRA_TRAIN', type=str)
parser.add_argument('--rand', dest='randomize',
help='randomize (do not use a fixed seed)',
action='store_true')
parser.add_argument('--set', dest='set_cfgs',
help='set config keys', default=None,
nargs=argparse.REMAINDER)
#if len(sys.argv) == 1:
# parser.print_help()
# sys.exit(1)
args = parser.parse_args()
return args
现在是程序已能运行起来,但是还不知道对不对,请问我在这里这样修改参数有没有没改到的地方?我看网络结构还是faster rcnn的,请问你设置priorbox时(加入了角度)的代码是放在cpp里面?你对哪些脚本进行了修改,能说一下吗?人忙晕了代码我还没具体看,实在是惭愧!!!
就是不再使用/faster_rcnn_end2end.sh
@huang229 具体请参照generate_anchors和RPN 相应层的代码,在 lib/rotation下
@mjq11302010044 非常感谢
@huang229 @mjq11302010044 我在训练的时候,loss一直在某个区间内震荡,可能是什么问题造成的,训练自己的数据