如何增加tensorflow模型的默认图像_梅因·皮伊?

2024-09-27 21:27:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我是模特儿_主.py(https://github.com/tensorflow/models/blob/master/research/object_detection/model_main.py)训练OD模型。你知道吗

经过一些步骤后,开始评估。日志如下:

2019-12-04 18:38:59,859 - tensorflow - INFO - Running local_init_op.

2019-12-04 18:39:00,032 - tensorflow - INFO - Done running local_init_op.

2019-12-04 18:39:04,461 - tensorflow - INFO - Evaluation [10/100]

2019-12-04 18:39:06,404 - tensorflow - INFO - Evaluation [20/100]

2019-12-04 18:39:08,155 - tensorflow - INFO - Evaluation [30/100]

2019-12-04 18:39:09,934 - tensorflow - INFO - Evaluation [40/100]

2019-12-04 18:39:11,761 - tensorflow - INFO - Evaluation [50/100]

2019-12-04 18:39:13,584 - tensorflow - INFO - Evaluation [60/100]

2019-12-04 18:39:15,379 - tensorflow - INFO - Evaluation [70/100]

2019-12-04 18:39:17,073 - tensorflow - INFO - Evaluation [80/100]

2019-12-04 18:39:19,001 - tensorflow - INFO - Evaluation [90/100]

2019-12-04 18:39:20,742 - tensorflow - INFO - Evaluation [100/100]

2019-12-04 18:39:21,949 - tensorflow - INFO - **Performing evaluation on 100 images**.

2019-12-04 18:39:21,952 - tensorflow - INFO - Loading and preparing annotation results...

2019-12-04 18:39:21,962 - tensorflow - INFO - DONE (t=0.01s)

2019-12-04 18:39:29,931 - tensorflow - INFO - Finished evaluation at 2019-12-04-18:39:29

2019-12-04 18:39:29,931 - tensorflow - INFO - Saving dict for global step 17507: DetectionBoxes_Precision/mAP = 0.44948143, DetectionBoxes_Precision/mAP (large) = 0.582809, DetectionBoxes_Precision/mAP (medium) = 0.33799592, DetectionBoxes_Precision/mAP (small) = 0.09610865, DetectionBoxes_Precision/mAP@.50IOU = 0.67960435, DetectionBoxes_Precision/mAP@.75IOU = 0.4594444, DetectionBoxes_Recall/AR@1 = 0.44452518, DetectionBoxes_Recall/AR@10 = 0.49779674, DetectionBoxes_Recall/AR@100 = 0.49779674, DetectionBoxes_Recall/AR@100 (large) = 0.636014, DetectionBoxes_Recall/AR@100 (medium) = 0.39656863, DetectionBoxes_Recall/AR@100 (small) = 0.15524893, Loss/BoxClassifierLoss/classification_loss = 0.16186869, Loss/BoxClassifierLoss/localization_loss = 0.19118023, Loss/RPNLoss/localization_loss = 0.087585546, Loss/RPNLoss/objectness_loss = 0.11538031, Loss/total_loss = 0.5560148, global_step = 17507, learning_rate = 0.001, loss = 0.5560148

2019-12-04 18:39:32,022 - tensorflow - INFO - Saving 'checkpoint_path' summary for global step 17507: ../../Data/Training\model.ckpt-17507

我想评估100多张图片。你知道吗

1)我应该更改哪个配置参数?你知道吗

2)这些评估图像是否在eval.tfrecord中?或者train?你知道吗

我在1中设置了sample_1_of_n_eval_examplessample_1_of_n_eval_on_train_exampleseval_training_data为假。你知道吗

我改变了那些参数,但似乎那些不是我应该改变的。你知道吗

正在运行的线路是:

config = tf.estimator.RunConfig(       
  model_dir                            = FLAGS.model_dir,
  save_checkpoints_secs                = 60 * 5,
  keep_checkpoint_max                  = 0,
  save_summary_steps                   = 1000,
  log_step_count_steps                 = 10)

train_and_eval_dict                    = model_lib.create_estimator_and_inputs(
  run_config                           = config,
  hparams                              = model_hparams.create_hparams(FLAGS.hparams_overrides),
  pipeline_config_path                 = FLAGS.pipeline_config_path,
  train_steps                          = FLAGS.num_train_steps, 
  sample_1_of_n_eval_examples          = FLAGS.sample_1_of_n_eval_examples,
  sample_1_of_n_eval_on_train_examples = FLAGS.sample_1_of_n_eval_on_train_examples,
  override_eval_num_epochs             = False)

estimator                              = train_and_eval_dict['estimator']
train_input_fn                         = train_and_eval_dict['train_input_fn']
eval_input_fns                         = train_and_eval_dict['eval_input_fns']
eval_on_train_input_fn                 = train_and_eval_dict['eval_on_train_input_fn']
predict_input_fn                       = train_and_eval_dict['predict_input_fn']
train_steps                            = train_and_eval_dict['train_steps']


  train_spec, eval_specs = model_lib.create_train_and_eval_specs(
      train_input_fn,
      eval_input_fns,
      eval_on_train_input_fn,
      predict_input_fn,
      train_steps,
      eval_on_train_data=False)

张量流1.14 视窗10


Tags: andinfomapinputmodelontensorfloweval
1条回答
网友
1楼 · 发布于 2024-09-27 21:27:11

行:

config = tf.estimator.RunConfig(model_dir=FLAGS.model_dir)

实例化tf.estimator.RunConfig对象。 基于其documentation,它接受log_step_count_steps关键字参数:

log_step_count_steps: The frequency, in number of global steps, that the global step and the loss will be logged during training. Also controls the frequency that the global steps / s will be logged (and written to summary) during training.

它的默认值是100。 因此可以将新值传递给此关键字参数:

config = tf.estimator.RunConfig(model_dir=FLAGS.model_dir, log_step_count_steps=anynumber )

我想这对你有用。你知道吗

相关问题 更多 >

    热门问题