Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorflow object detection API not displaying global steps

I am new here. I recently started working with object detection and decided to use the Tensorflow object detection API. But, when I start training the model, it does not display the global step like it should, although it's still training in the background.

Details: I am training on a server and accessing it using OpenSSH on Windows. I trained a custom dataset, by collecting pictures and labeling them. I trained it using model_main.py. Also, until a couple of months back, the API was a little different, and only recently they changed to the latest version. For instance, earlier it used to use train.py for training, instead of model_main.py. All the online tutorial I can find use train.py, so it might be a problem with the latest commit. But I don't find anyone else fining this problem.

Thanks in advance!

like image 565
Aditya Singh Avatar asked Aug 25 '18 10:08

Aditya Singh


3 Answers

Regarding the recent change to model_main , the previous version is available at the folder "legacy". I use train.py and eval.py from this legacy folder with the same functionality as before.

like image 186
Hafplo Avatar answered Sep 20 '22 18:09

Hafplo


Add tf.logging.set_verbosity(tf.logging.INFO) after the import section of the model_main.py script. It will display a summary after every 100th step.

like image 15
Thommy257 Avatar answered Oct 31 '22 19:10

Thommy257


As Thommy257 suggested, adding tf.logging.set_verbosity(tf.logging.INFO) after the import section of model_main.py prints the summary after every 100 steps by default.

Further, to specify the frequency of the summary, change

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

to

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

where it will print after every k steps.

like image 11
Aditya Singh Avatar answered Oct 31 '22 19:10

Aditya Singh