Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?
like image 597
Chaine Avatar asked Jan 08 '19 01:01

Chaine


People also ask

What is the TensorFlow object detection API?

The TensorFlow Object Detection API is an open-source framework built on top of TensorFlow that makes it easy to construct, train and deploy object detection models. There are already pre-trained models in their framework which are referred to as Model Zoo.


1 Answers

  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.

like image 119
Fransiska Avatar answered Sep 18 '22 01:09

Fransiska