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

cfg ERROR #5

Open
Fly-dream12 opened this issue Jan 5, 2020 · 14 comments
Open

cfg ERROR #5

Fly-dream12 opened this issue Jan 5, 2020 · 14 comments

Comments

@Fly-dream12
Copy link

Thanks for your project!
In lib/modeling/model_builder.py, Generalized_RCNN doesn't receive the correct cfg from the config file, the cfg is just as the same as that in config.py. When the config is changed, it does not make sense. For example:

self.Conv_Body = get_func(cfg.MODEL.CONV_BODY)()
Here, the cfg.MODEL.CONV_BODY is [].

@Zzh-tju
Copy link
Owner

Zzh-tju commented Jan 5, 2020

I have not met this before. Can you start training or testing?

@Fly-dream12
Copy link
Author

I can start training, but the test process failed.

@Zzh-tju
Copy link
Owner

Zzh-tju commented Jan 5, 2020

What is the error

@Fly-dream12
Copy link
Author

may you leave an email?

@Fly-dream12
Copy link
Author

File "DIoU-pytorch-detectron-master/tools/../lib/core/test_engine.py", line 177, in test_net_on_dataset
cfg,args, dataset_name, proposal_file, output_dir, gpu_id=gpu_id
File "DIoU-pytorch-detectron-master/tools/../lib/core/test_engine.py", line 253, in test_net
model = initialize_model_from_cfg(cfg,args, gpu_id=gpu_id)
File "DIoU-pytorch-detectron-master/tools/../lib/core/test_engine.py", line 347, in initialize_model_from_cfg
model = model_builder.Generalized_RCNN()
File "DIoU-pytorch-detectron-master/lib/core/../modeling/model_builder.py", line 86, in init
self.Conv_Body = get_func(cfg.MODEL.CONV_BODY)()
TypeError: 'NoneType' object is not callable

@Zzh-tju
Copy link
Owner

Zzh-tju commented Jan 5, 2020

Try removing the brackets

@Zzh-tju
Copy link
Owner

Zzh-tju commented Jan 5, 2020

get_func(cfg.MODEL.CONV_BODY)()→get_func(cfg.MODEL.CONV_BODY)

@Fly-dream12
Copy link
Author

It will run into another environment like this:

File "/anaconda3/envs/CenterNet_0.4.1/lib/python3.6/site-packages/torch/nn/modules/module.py", line 518, in getattr
type(self).name, name))
AttributeError: 'Generalized_RCNN' object has no attribute 'RPN'

@Fly-dream12
Copy link
Author

The cfg is [], the right cfg in config file is not transmitted rightly in this function.
May be you should refine this class.

@Zzh-tju
Copy link
Owner

Zzh-tju commented Jan 5, 2020

I will check this repo as soon as possible. But if I can run it normally, I'm willing to help but unable to do so about this.

@Fly-dream12
Copy link
Author

may be you can leave your email , it is not convenient chatting like this

@Fly-dream12
Copy link
Author

What does bbox_inside_weights and bbox_outside_weights in diou loss mean?
Can you make this loss into mmdet?

@Zzh-tju
Copy link
Owner

Zzh-tju commented Jan 5, 2020

bbox_inside_weights means the regression loss is activated only for positive anchors. As for mmdet, I'm sorry I don't have time to do it currently.

@Zzh-tju
Copy link
Owner

Zzh-tju commented Jan 9, 2020

I can train and test normally. I'm also curious that you can train but why cannot test.

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

No branches or pull requests

2 participants