Faster-RCNN-tf使用训练好的模型验证测试集 test_net.py

对应源码地址:https://github.com/endernewton/tf-faster-rcnn

1、打开tools目录下的test_net.py文件

修改(1):

  parser.add_argument('--model', dest='model',  help='model to test',   default='../output/vgg16/voc_2007_trainval+voc_2012_trainval/default/vgg16_faster_rcnn_iter_5000.ckpt', type=str)

修改default为我们训练完数据后的模型地址

修改(2):

  parser.add_argument('--net', dest='net',
                      help='vgg16, res50, res101, res152, mobile',
                      default='vgg16', type=str)

修改default为我们自己使用的网络类型

修改(3):

接着运行test_net.py时可能出现以下错误:

    pickle.dump(recs, f)
TypeError: write() argument must be str, not bytes

问题及修改请参考:https://blog.csdn.net/oMoDao1/article/details/83146740

修改后请把以下文件删除:

如果不删除,将可能出现以下错误:

2、最后再次运行test_net.py文件

猜你喜欢

转载自blog.csdn.net/oMoDao1/article/details/83344755
今日推荐