Image classification based on detectron2.
This provides a convenient way to initialize backbone in detectron2.
- Trained with detectron2 builtin trainer
-
Use default data flow in detectron2, you only need rename
forward_d2
toforward
, while renamingforward
toforward_imgnet
inimgcls/modeling/meta_arch/clsnet.py
-
Create your own model config
-
Run:
python train_net_builtin.py --num-gpus <gpu number> --config-file configs/<your config file>
. For example:sh scripts/train_net_builtin.sh
- Trained with pytorch formal imagenet trainer [Recommend]
- Read carefully with some arguments in
train_net.py
- Run:
sh /scripts/train_net.sh