Skip to content

Using detectron2 to train Image classification models for backbone of detection models

License

Notifications You must be signed in to change notification settings

tkianai/ImageClassification.detectron2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImageClassification.detectron2

Image classification based on detectron2.

This provides a convenient way to initialize backbone in detectron2.

Usage

  • Trained with detectron2 builtin trainer
  1. Use default data flow in detectron2, you only need rename forward_d2 to forward, while renaming forward to forward_imgnet in imgcls/modeling/meta_arch/clsnet.py

  2. Create your own model config

  3. 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]
  1. Read carefully with some arguments in train_net.py
  2. Run: sh /scripts/train_net.sh

About

Using detectron2 to train Image classification models for backbone of detection models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published