使用ssd_inception_v2_coco训练了模型,下一步该怎么做?

时间:2018-12-12 12:54:45

标签: tensorflow computer-vision

我在这里遵循了有关使用深度学习检测对象的教程:https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html

在某些时候,经过多达4082个步骤的训练之后,我使用CTRL + C停止了训练。

现在我的训练目录下有很多文件,看起来像这样:

list of files in the training directory

问题是,我现在应该如何进行?接下来做什么?本教程不会教您如何使用训练数据,如果正确识别,甚至不会对其进行测试。

谢谢。

1 个答案:

答案 0 :(得分:0)

您获得的文件是检查点。您现在要做的是从检查点还原模型。来自CV tricks的指示:

with tf.Session() as sess:
  model = tf.train.import_meta_graph('my_test_model-1000.meta')
  model.restore(sess, tf.train.latest_checkpoint('./'))

之后,您可以在test set上评估模型:

test_accuracy = tfe.metrics.Accuracy()

for (x, y) in test_dataset:
  logits = model(x)
  prediction = tf.argmax(logits, axis=1, output_type=tf.int32)
  test_accuracy(prediction, y)

print("Test set accuracy: {:.3%}".format(test_accuracy.result()))
相关问题