zhanghang1989 / ResNeSt

ResNeSt: Split-Attention Networks
https://arxiv.org/abs/2004.08955
Apache License 2.0
3.24k stars 496 forks source link

How to use it on a custom dataset for object detection? #134

Open shehroz010 opened 3 years ago

shehroz010 commented 3 years ago

Hello, How can I use it on a custom data set for object detection? Is there any documentation regarding this ? Format of data for training. Is it similar to detectron2 ?

zhanghang1989 commented 3 years ago

We have provided detectron2 wrapper. https://github.com/zhanghang1989/ResNeSt/tree/master/d2 Everything works the same with detectron2. You can easily add your own data through registry.

shehroz010 commented 3 years ago

Thank you for the quick reply. So basically you are saying that all I have to do is use resnest cfg file instead of detectron2 ones, I mean something like this ?

cfg = get_cfg()
cfg.merge_from_file('./faster_rcnn_ResNeSt_50_FPN_dcn_syncbn_range-scale_1x.yaml')
zhanghang1989 commented 3 years ago
from resnest.d2 import add_resnest_config
add_resnest_config(cfg)

https://github.com/zhanghang1989/ResNeSt/blob/master/d2/train_net.py#L123