facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
29.97k stars 7.41k forks source link

RecursionError: maximum recursion depth exceeded when merging DeepLabV3 config #4474

Closed MLDovakin closed 2 years ago

MLDovakin commented 2 years ago

I want to train semantic segmentation to recognize small objects. For this I use DeepLabVabV3. But when installing the config, I get a recursion error that reloads the environment. Am I setting the config correctly or is there a problem in my yaml file?

``` cfg = get_cfg() cfg.load_yaml_with_base('/content/Base3-DeepLabV3-OS16-Semantic.yaml') cfg.MODEL.WEIGHTS = '/content/model_final_0dff1b.pkl'` ``` ## Еrorr logs: ``` --------------------------------------------------------------------------- RecursionError Traceback (most recent call last) [](https://localhost:8080/#) in () 1 cfg = get_cfg() ----> 2 cfg.load_yaml_with_base('/content/Base3-DeepLabV3-OS16-Semantic.yaml') 3 cfg.MODEL.WEIGHTS = '/content/model_final_0dff1b.pkl' 2 frames [/usr/local/lib/python3.7/dist-packages/fvcore/common/config.py](https://localhost:8080/#) in load_yaml_with_base(cls, filename, allow_unsafe) 92 # the path to base cfg is relative to the config file itself. 93 base_cfg_file = os.path.join(os.path.dirname(filename), base_cfg_file) ---> 94 base_cfg = cls.load_yaml_with_base(base_cfg_file, allow_unsafe=allow_unsafe) 95 del cfg[BASE_KEY] 96 [/usr/local/lib/python3.7/dist-packages/fvcore/common/config.py](https://localhost:8080/#) in load_yaml_with_base(cls, filename, allow_unsafe) 92 # the path to base cfg is relative to the config file itself. 93 base_cfg_file = os.path.join(os.path.dirname(filename), base_cfg_file) ---> 94 base_cfg = cls.load_yaml_with_base(base_cfg_file, allow_unsafe=allow_unsafe) 95 del cfg[BASE_KEY] 96 ... last 2 frames repeated, from the frame below ... [/usr/local/lib/python3.7/dist-packages/fvcore/common/config.py](https://localhost:8080/#) in load_yaml_with_base(cls, filename, allow_unsafe) 92 # the path to base cfg is relative to the config file itself. 93 base_cfg_file = os.path.join(os.path.dirname(filename), base_cfg_file) ---> 94 base_cfg = cls.load_yaml_with_base(base_cfg_file, allow_unsafe=allow_unsafe) 95 del cfg[BASE_KEY] 96 RecursionError: maximum recursion depth exceeded ``` ## My .yaml file structure: ``` _BASE_: Base3-DeepLabV3-OS16-Semantic.yaml MODEL: WEIGHTS: "/content/deeplab_v3_R_103_os16_mg124_poly_90k_bs16.yaml" PIXEL_MEAN: [123.675, 116.280, 103.530] PIXEL_STD: [58.395, 57.120, 57.375] BACKBONE: NAME: "build_resnet_deeplab_backbone" RESNETS: DEPTH: 101 NORM: "SyncBN" RES5_MULTI_GRID: [1, 2, 4] STEM_TYPE: "deeplab" STEM_OUT_CHANNELS: 128 STRIDE_IN_1X1: False SEM_SEG_HEAD: NAME: "DeepLabV3Head" NORM: "SyncBN" INPUT: FORMAT: "RGB" ```
github-actions[bot] commented 2 years ago

You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template. The following information is missing: "Instructions To Reproduce the Issue and Full Logs";

github-actions[bot] commented 2 years ago

Requested information was not provided in 7 days, so we're closing this issue.

Please open new issue if information becomes available. Otherwise, use github discussions for free-form discussions.