Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

Raise helpful warnings with Faster R-CNN train script #418

Merged
merged 2 commits into from
Sep 14, 2017

Conversation

yuyu2172
Copy link
Member

Error message

$ python train.py                                                                
Traceback (most recent call last):
  File "train.py", line 161, in <module>
    main()
  File "train.py", line 76, in main
    'Some hyperparameters are not set.\n'
ValueError: Some hyperparameters are not set.
Please specify the following arguments: 'dataset', 'step_size' and 'iteration'.
ex: python train.py --gpu 0 --dataset voc07 --step_size 50000 --iteration 70000

@Hakuyume
Copy link
Member

Why don't you use required option? https://docs.python.org/3/library/argparse.html#required

@yuyu2172
Copy link
Member Author

Thanks. I did not know the option.

The page says the following.

Note Required options are generally considered bad form because users expect options to be optional, and thus they should be avoided when possible.

Maybe, it is better to set default values.
In that case, the default values should be for the simplest experiment, which is VOC07 in this case.

@Hakuyume
Copy link
Member

Maybe, it is better to set default values.
In that case, the default values should be for the simplest experiment, which is VOC07 in this case.

I agree. The options with --<name> style should be optional. (at least in argparse). It is a good idea to use VOC07's setting as the default values.

@Hakuyume
Copy link
Member

Perhaps, it is better to use VOC0712's setting because we switched the default setting from VOC07 to VOC0712 in #350.

@yuyu2172
Copy link
Member Author

It depends on what you want to set as the default training parameters.
Personally, the most simple setting should be preferred for the default parameters.
"Simple" means that a script finishes quickly and the GPU memory requirement is low.
Although, the difference is not huge, VOC07 ends faster than VOC0712 and downloads less images.
Analogously, if ResNet is added to the train script, VGG feature extractor should be the default extractor.

For evaluation, the choice of pretrained weights do not matter for speed, so it can be anything.
I think it is fine to use weights trained with VOC0712, which is performing the best.

@Hakuyume
Copy link
Member

I know why you chose VOC07 as the default of training and VOC0712 as that of testing. However, I thought the difference between training and testing is confusing for users. Perhaps, some user wonder why the score of the trained model is lower than that of the distributed model.

@Hakuyume
Copy link
Member

I think it is fine to use weights trained with VOC0712, which is performing the best.

Will you change the default value whenever we add a better model?

@yuyu2172
Copy link
Member Author

I know why you chose VOC07 as the default of training and VOC0712 as that of testing. However, I thought the difference between training and testing is confusing for users. Perhaps, some user wonder why the score of the trained model is lower than that of the distributed model.

How about making all pretrained weight options to the simplest setting? (in this case VOC07)

@Hakuyume
Copy link
Member

How about making all pretrained weight options to the simplest setting? (in this case VOC07)

It is OK.

@yuyu2172
Copy link
Member Author

Updated

Copy link
Member

@Hakuyume Hakuyume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Hakuyume Hakuyume merged commit 0423ffe into chainer:master Sep 14, 2017
@yuyu2172 yuyu2172 deleted the faster-rcnn-example branch September 14, 2017 06:26
@yuyu2172 yuyu2172 added this to the v0.7 milestone Oct 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants