models icon indicating copy to clipboard operation
models copied to clipboard

API object detection error for multi-object detection

Open ghost opened this issue 8 years ago • 8 comments

when i execute this instruction python3 legacy/train.py --logtostderr --train_dir=training/ --pipeline_config_path=pipeline3.config

with different architecture i get this error :

Traceback (most recent call last): File "legacy/train.py", line 184, in tf.app.run() File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/deprecation.py", line 272, in new_func return func(*args, **kwargs) File "legacy/train.py", line 180, in main graph_hook_fn=graph_rewriter_fn) File "/home/marwane/object__datection/models/research/object_detection/legacy/trainer.py", line 303, in train train_config.optimizer) File "/home/marwane/object__datection/models/research/object_detection/builders/optimizer_builder.py", line 50, in build learning_rate = _create_learning_rate(config.learning_rate) File "/home/marwane/object__datection/models/research/object_detection/builders/optimizer_builder.py", line 112, in _create_learning_rate learning_rate_sequence, config.warmup) File "/home/marwane/object__datection/models/research/object_detection/utils/learning_schedules.py", line 160, in manual_stepping raise ValueError('First step cannot be zero.') ValueError: First step cannot be zero.

ghost avatar Oct 15 '18 14:10 ghost

@bellahcenmarwane Which architecture did you encounter this issue?

wt-huang avatar Oct 20 '18 01:10 wt-huang

im try to working with ssd_mobilenet_v1_coco_2017_11_17 and faster_rcnn_inception_v2_coco_2018_01_28 and i get the seem error

ghost avatar Oct 23 '18 08:10 ghost

There is a problem with your train config in your Optimizer, the manual training schedule is not necessary. If you look at the new sample configs you can modify your Optimizer to the new layout to match.

twhitloc avatar Oct 23 '18 18:10 twhitloc

can you plz give more details

ghost avatar Oct 25 '18 10:10 ghost

Sure, if you can post the train config section of your pipeline I can highlight the change.

Otherwise to put it a bit more concretely, in the train_config: {} Where you have your optimizer {} if you have something like this: schedule { step: 0 learning_rate: .0001 } You need to remove it in the newer versions of object detection. You can find more information here #3794

twhitloc avatar Oct 25 '18 16:10 twhitloc

i try to change Learning_rate but it not work for me

ghost avatar Oct 26 '18 12:10 ghost

If you could post your train config I will post the fix.
Alternatively pull the newest configs from the samples folder and use one of those, or check the other thread for perhaps better explanation.

Essentially: If you delete the schedule {...} you should be able to use that config.

twhitloc avatar Oct 29 '18 16:10 twhitloc

@twhitloc is correct that schedule block needs to be removed and learning rate has to specified separately in the config file.

wt-huang avatar Nov 08 '18 05:11 wt-huang