IDEA-Research / detrex

detrex is a research platform for DETR-based object detection, segmentation, pose estimation and other visual recognition tasks.
https://detrex.readthedocs.io/en/latest/
Apache License 2.0
1.95k stars 204 forks source link

How to modify training config from launch command? #233

Closed yxchng closed 1 year ago

yxchng commented 1 year ago

Is it possible to do command like this python tools/train_net.py --config-file projects/deformable_detr/configs/path/to/config.py --num-gpus 8 --output_dir 'example'? Or must I change the config file?

rentainhe commented 1 year ago

Is it possible to do command like this python tools/train_net.py --config-file projects/deformable_detr/configs/path/to/config.py --num-gpus 8 --output_dir 'example'? Or must I change the config file?

You can modify training config in command line as:

python tools/train_net.py --config-file projects/deformable_detr/configs/path/to/config.py --num-gpus 8 train.output_dir="/path/to/output_dir/"
rentainhe commented 1 year ago

Note that you can modify any config at command line using detrex, only one thing to care is, you should match the namespace in command line and your own config file:

python tools/train_net.py --config-file config.py --num-gpus 8 train.output_dir="./" train.max_iters=90000 ...
rentainhe commented 1 year ago

I'm closing this issue~ Feel free to reopen it if needed~