Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about changing backbone #30

Closed
bluvory opened this issue Jul 1, 2021 · 13 comments
Closed

Question about changing backbone #30

bluvory opened this issue Jul 1, 2021 · 13 comments
Labels
individual Individual problem and need

Comments

@bluvory
Copy link

bluvory commented Jul 1, 2021

Hello, I have a question about changing the backbones.
I want to change the backbone retinanet to ssd.
( customize 3 just like you customized 1 to 2 according to the paper )

I tried customizing it, and the following error occurred. ( look at link4 )
TypeError: init() missing 1 required positional argument: 'input_size'

So when I deleted input_size, I got the following error.
NameError: name 'input_size' is not defined

model, train_cfg, test_cfg are well inputted.
How can I fix this?

  1. https://github.com/open-mmlab/mmdetection/blob/master/configs/_base_/models/retinanet_r50_fpn.py
  2. https://github.com/yuantn/MI-AOD/blob/master/configs/_base_/retinanet_r50_fpn.py
  3. https://github.com/open-mmlab/mmdetection/blob/master/configs/_base_/models/ssd300.py
  4. https://github.com/bluvory/kuaicv/blob/main/ssd_vgg_custom.py
@yuantn
Copy link
Owner

yuantn commented Jul 1, 2021

Have you modified Line 4~7 in configs/MIAOD.py?

The './_base_/retinanet_r50_fpn.py' need to be replaced by your ssd_vgg_custom.py.

@bluvory
Copy link
Author

bluvory commented Jul 1, 2021

yes I already fixed that but error occurs.

@yuantn
Copy link
Owner

yuantn commented Jul 1, 2021

What if you uncomment the Line 6 in link 4?

@bluvory
Copy link
Author

bluvory commented Jul 1, 2021

If i uncomment it, this error occurs.
TypeError: init() missing 1 required positional argument: 'input_size'

@yuantn
Copy link
Owner

yuantn commented Jul 1, 2021

Can I have a look at your outermost configuration file (like configs/MIAOD.py instead of configs/_base_/models/ssd300.py )?

@bluvory
Copy link
Author

bluvory commented Jul 1, 2021

handRL is our custom dataset and this file (hand2voc) has been changed to voc format.

https://github.com/bluvory/kuaicv/blob/main/MIAOD.py
https://github.com/bluvory/kuaicv/blob/main/handRL.py

@yuantn
Copy link
Owner

yuantn commented Jul 1, 2021

I think that maybe you should add or modify something in this SSD+VOC configuration file to your MIAOD.py, such as train_pipeline, test_pipeline, and so on.

You can refer to the difference between MIAOD.py and the RetinaNet+VOC configuration file.

@bluvory
Copy link
Author

bluvory commented Jul 1, 2021

I changed the MIAOD.py like this on your advice,
but the error continues because (maybe) the ssd_vgg_custom.py has not changed.
TypeError: init() missing 1 required positional argument: 'input_size'

@yuantn yuantn added the enhancement New feature or request label Jul 1, 2021
@yuantn
Copy link
Owner

yuantn commented Jul 1, 2021

It is really a confusing error... Could you provide your full output log?

@bluvory
Copy link
Author

bluvory commented Jul 2, 2021

here, I put both cases of errors in this link.
(input_size=300 is in ssd_vgg_custom.py)

https://github.com/bluvory/kuaicv/blob/main/error.py

@yuantn
Copy link
Owner

yuantn commented Jul 5, 2021

I think I have got the point of the problem, that is, you need to add input_size=input_size in the model.backbone (anywhere in Lines 11-16) in your ssd_vgg_custom.py.

The deep reason is that, all of this MI-AOD repository is based on MMDetection V2.3.0 but not the latest version of MMDetection. There are some differences between these two versions. Please customize any files on the version 2.3.0.

@yuantn yuantn added individual Individual problem and need and removed enhancement New feature or request labels Jul 5, 2021
@bluvory
Copy link
Author

bluvory commented Jul 6, 2021

I got it. Thank you for your kind response.
Have a nice day :)

@yuantn yuantn closed this as completed Jul 31, 2021
yuantn added a commit that referenced this issue Sep 14, 2021
@abhigoku10
Copy link

@bluvory cna you please share ur implementation with retinanet repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
individual Individual problem and need
Projects
None yet
Development

No branches or pull requests

3 participants