easton-cau / SOTR

SOTR: Segmenting Objects with Transformers
MIT License
193 stars 32 forks source link

Can't find cfg.MODEL.SOTR.FPN_SCALE_RANGES #15

Open YeahHighly opened 2 years ago

YeahHighly commented 2 years ago

I encountered the following problem when running SOTR with a new data set. File "/home/xxx/EndoCV2022/detectron2/SOTR/adet/modeling/sotr/sotr.py", line 33, in init self.scale_ranges = cfg.MODEL.SOTR.FPN_SCALE_RANGES

I checked the configuration file R50.yaml and found that there was no such variable. Do you know how to solve it?

JasonZuu commented 2 years ago

Configs of MODEL are in the adet/config/defaults.py

To deal with your problem, you may use from adet.config import get_cfg() cfg = get_cfg() model = SOTR(cfg)

However, it is better to run the tools/train_net.py file directly according to the guidance of the author, since it is a detectron2 based project.