dongzhang89 / CONTA

Implementation for paper: Causal Intervention for Weakly-Supervised Semantic Segmentation
MIT License
185 stars 27 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'imagenet_pre_trained_model' #10

Closed mtli77 closed 3 years ago

mtli77 commented 3 years ago

Hi @ZHANGDONG-NJUST during the segmentation process, the error reported here:

Mode: train
Device:
    0: GeForce RTX 2080 Ti
    1: GeForce RTX 2080 Ti
Dataset: VOCAug
    # data: 1464
    Split: train
    Root: /disk/PASCAL_VOC_2012/VOCdevkit/VOC2012
Model: DeepLabV2_ResNet101_MSC
Traceback (most recent call last):
  File "main.py", line 477, in <module>
    main()
  File "/disk/tia/anaconda3/envs/tia36/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/disk/tia/anaconda3/envs/tia36/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/disk/tia/anaconda3/envs/tia36/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/disk/tia/anaconda3/envs/tia36/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/disk/tia/anaconda3/envs/tia36/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "main.py", line 129, in train
    state_dict = torch.load(CONFIG.MODEL.INIT_MODEL)
  File "/disk/tia/anaconda3/envs/tia36/lib/python3.6/site-packages/torch/serialization.py", line 584, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "/disk/tia/anaconda3/envs/tia36/lib/python3.6/site-packages/torch/serialization.py", line 234, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "/disk/tia/anaconda3/envs/tia36/lib/python3.6/site-packages/torch/serialization.py", line 215, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'imagenet_pre_trained_model'

Could you please help me to solve this problem? By the way, does the ins_seg in /CONTA-master/pseudo_mask/result/ is the generated pseudo mask?

dongzhang89 commented 3 years ago

Thanks for your report. You can download an ImageNet pre-trained ResNet model and put it here, this problem will be solved.

kkechen commented 3 years ago

@ZHANGDONG-NJUST Sorry to bother you, may i ask is the initial weight of the segmentation network only pre-trained on ImageNet or also fine tune on COCO, Thanks a lot.

dongzhang89 commented 3 years ago

@hiddlephila only pre-trained on ImageNet not COCO