models icon indicating copy to clipboard operation
models copied to clipboard

Object detection API : faster_rcnn_nas config problem

Open andmiles2go opened this issue 8 years ago • 3 comments

When i trained a faster_rcnn_nas model locally, i got a error as bellow

Traceback (most recent call last): File "train.py", line 198, in <module> tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "train.py", line 194, in main worker_job_name, is_chief, FLAGS.train_dir) File "build/bdist.linux-x86_64/egg/object_detection/trainer.py", line 193, in train first_clone_scope = clones[0].scope File "build/bdist.linux-x86_64/egg/object_detection/builders/model_builder.py", line 85, in build File "build/bdist.linux-x86_64/egg/object_detection/builders/model_builder.py", line 327, in _build_faster_rcnn_model File "build/bdist.linux-x86_64/egg/object_detection/meta_architectures/faster_rcnn_meta_arch.py", line 326, in __init__ ValueError: second_stage_batch_size should be no greater than first_stage_max_proposals.

When i compared the defalut pipeline config file of faster_rcnn_nas with other faster rcnn based models, i found a slight difference between two parameters. in 'object_detection/samples/configs/faster_rcnn_resnet101_coco.config', the 'max_total_detections' value of 'second_stage_post_processing' is 300, and it is not greater than' first_stage_max_proposals', which is set to 300 equally. but in 'object_detection/samples/configs/faster_rcnn_nas_coco.config', the 'max_total_detections' value of 'second_stage_post_processing' is 100, and it is greater than 'first_stage_max_proposals', which is set 50.

I am not sure if this is the reason why i got that error, so i set both of them to 300, and it worked.

So, is this the right way to train this model?

andmiles2go avatar Dec 05 '17 09:12 andmiles2go

I am also interested in the same question. The error I am getting with the default config file is: ValueError: second_stage_batch_size should be no greater than first_stage_max_proposals.

What are the optimal (or reasonable) values for second_stage_batch_size and first_stage_max_proposals?

uziela avatar Jan 04 '18 18:01 uziela

Hi, @uziela & @andmiles2go have you found the solution? If not, you may want to refer issue #2668 Good luck

ronykalfarisi avatar Jan 26 '18 21:01 ronykalfarisi

Closing as this is resolved

wt-huang avatar Nov 17 '18 23:11 wt-huang