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

detector freeze problem #128

Open
YOOHYOJEONG opened this issue Oct 26, 2022 · 1 comment
Open

detector freeze problem #128

YOOHYOJEONG opened this issue Oct 26, 2022 · 1 comment

Comments

@YOOHYOJEONG
Copy link

YOOHYOJEONG commented Oct 26, 2022

Hi.

I'm going to freeze the parameters of detector as you say(#126).

In qdtrack/models/mot/qdtrack.py, I tried to freeze the detector using freeze_detector(freeze_detector = True).
But, when freeze_detector = True, self.detector, I got this error.

Traceback (most recent call last):
File "tools/train.py", line 169, in
main()
File "tools/train.py", line 140, in main
test_cfg=cfg.get('test_cfg'))
File "/workspace/qdtrack/qdtrack/models/builder.py", line 15, in build_model
return build(cfg, MODELS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/workspace/mmcv/mmcv/cnn/builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/workspace/mmcv/mmcv/utils/registry.py", line 72, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
AttributeError: QDTrack: 'QDTrack' object has no attribute 'backbone'

image

Here is the config file I used.
image

I think,
image
be caused by self.detector.

How can I put the backbone and neck, rpn_head, roi_head.bbox_head of the detector config file(/configs/base/faster_rcnn_r50_fpn.py) in self.detector?

Thank you.

@YOOHYOJEONG
Copy link
Author

YOOHYOJEONG commented Nov 2, 2022

Hi, I solved this problem. But I got a new question afterwards.

I want to inference using detector I trained using MMCV and tracker obtained when I training only trackers by freezing the detector together.

I want to use tools/inference.py. I think checkpoint argument in inference.py means I get when I training at once without freezing anything( joint training).

How can I use each checkpoint of the detector and tracker in tools/inference.py?

Thank you.

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

1 participant