__init__.py 496 B

1234567891011121314151617
  1. from .yolof_head import YolofHead
  2. from .fcos_head import FcosHead, FcosRTHead
  3. # build head
  4. def build_head(cfg, in_dim, out_dim):
  5. print('==============================')
  6. print('Head: {}'.format(cfg.head))
  7. if cfg.head == 'fcos_head':
  8. model = FcosHead(cfg, in_dim, out_dim)
  9. elif cfg.head == 'fcos_rt_head':
  10. model = FcosRTHead(cfg, in_dim, out_dim)
  11. elif cfg.head == 'yolof_head':
  12. model = YolofHead(cfg, in_dim, out_dim)
  13. return model