how to check both training/eval performances in tensorflow object_detection

后端 未结 1 1678
抹茶落季
抹茶落季 2020-12-29 14:02

When I check the tensorboard for observing the training performance, there only shows the eval_0 (in blue) result.

While it should be a separate train (in

相关标签:
1条回答
  • 2020-12-29 14:12

    If you want to evaluate your model on validation data you should use:

    python models/research/object_detection/model_main.py --pipeline_config_path=/path/to/pipeline_file --model_dir=/path/to/output_results --checkpoint_dir=/path/to/directory_holding_checkpoint --run_once=True
    

    If you want to evaluate your model on training data, you should set 'eval_training_data' as True, that is:

    python models/research/object_detection/model_main.py --pipeline_config_path=/path/to/pipeline_file --model_dir=/path/to/output_results --eval_training_data=True --checkpoint_dir=/path/to/directory_holding_checkpoint --run_once=True
    

    I also add comments to clarify some of previous options:

    --pipeline_config_path: path to "pipeline.config" file used to train detection model. This file should include paths to the TFRecords files (train and test files) that you want to evaluate, i.e. :

        ...
        train_input_reader: {
            tf_record_input_reader {
                    #path to the training TFRecord
                    input_path: "/path/to/train.record"
            }
            #path to the label map 
            label_map_path: "/path/to/label_map.pbtxt"
        }
        ...
        eval_input_reader: {
            tf_record_input_reader {
                #path to the testing TFRecord
                input_path: "/path/to/test.record"
            }
            #path to the label map 
            label_map_path: "/path/to/label_map.pbtxt"
        }
        ...
    

    --model_dir: Output directory where resulting metrics will be written, particularly "events.*" files that can be read by tensorboard.

    --checkpoint_dir: Directory holding a checkpoint. That is the model directory where checkpoint files ("model.ckpt.*") has been written, either during training process, or after export it by using "export_inference_graph.py".

    --run_once: True to run just one round of evaluation.

    0 讨论(0)
提交回复
热议问题