Difference between `train.py` and `model_main.py` in Tensorflow Object Detection API
Asked Answered
W

2

6

I usually just use train.py to train using Tensorflow Object Detection API. However, I read from https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/discussion/68581 that you can also use model_main.py to train your model and see real-time plots and images on Tensorboard.

  1. How do you exactly use model_main.py on Tensorboard?
  2. What is the difference between train.py and model_main.py?
Wilheminawilhide answered 8/1, 2019 at 1:55 Comment(0)
G
4
  1. On TensorBoard, the model_main.py output similar graphs like train.py, but in model_main.py, the performance of the model on the evaluation dataset is measured too.

  2. model_main.py is the newer version in TensorFlow Object Detection API. It is used for training and also evaluating the model. When using train.py we have to run a separate program for evaluation (eval.py), while model_main.py executes both. For example, training code will be running for a certain time (for example 5 mins or every 2000 steps), then the training will be stopped and evaluation will be run. After the evaluation has finished, the training will be continued again. Then the same cycle is repeated again.

Gaskell answered 1/8, 2019 at 14:37 Comment(0)
U
0

The newer version of Object Detection API of Tensorflow offers model_main.py that trains as well as evaluates the model using the various pre-conditions and preprocessing where as the older versions of Tensorflow Object Detection APIs uses train.py for training and eval.py for evaluating.

Reference : https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

Unclench answered 3/11, 2019 at 5:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.