hyz-xmaster / VarifocalNet

VarifocalNet: An IoU-aware Dense Object Detector
Apache License 2.0
346 stars 52 forks source link

不能正常的推理 #1

Open cpboost opened 3 years ago

cpboost commented 3 years ago

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug A clear and concise description of what the bug is.

Reproduction

  1. What command or script did you run?
    A placeholder for the command.
  2. Did you make any modifications on the code or config? Did you understand what you have modified?
  3. What dataset did you use?

Environment

  1. Please run python mmdet/utils/collect_env.py to collect necessary environment information and paste it here.
  2. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

Error traceback If applicable, paste the error trackback here.

A placeholder for trackback.

Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

cpboost commented 3 years ago

ModuleAttributeError Traceback (most recent call last)

in () 4 CONFIG_FILE = './work_dirs/vf_r2_base/vfnet_r2_101_fpn_mdconv_c3-c5_mstrain_2x_coco.py' 5 CHECKPOINT_PATH = './work_dirs/vf_r2_base/epoch_20.pth' ----> 6 model = init_detector(CONFIG_FILE, CHECKPOINT_PATH) 7 img1='./data/coco/train2017/train_29635.jpg' 8 # img1='./normal/train_1.jpg' 8 frames /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in __getattr__(self, name) 770 return modules[name] 771 raise ModuleAttributeError("'{}' object has no attribute '{}'".format( --> 772 type(self).__name__, name)) 773 774 def __setattr__(self, name: str, value: Union[Tensor, 'Module']) -> None: ModuleAttributeError: 'Bottle2neck' object has no attribute 'conv2'
hyz-xmaster commented 3 years ago

Commenting delattr(self, 'conv2') in res2net.py can solve this issue.

cpboost commented 3 years ago

是这个位置的报的错。但是该如何解决

hyz-xmaster commented 3 years ago

Comment delattr(self, 'conv2') <=> # delattr(self, 'conv2')

cpboost commented 3 years ago

thank success