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

How to use DOVER_plus_plus.pth? #30

Open
turian opened this issue Jun 15, 2024 · 1 comment
Open

How to use DOVER_plus_plus.pth? #30

turian opened this issue Jun 15, 2024 · 1 comment

Comments

@turian
Copy link

turian commented Jun 15, 2024

I tried changing the pth in dover.yml to DOVER_plus_plus.pth, but it doesn't work.

Can you show in the README how to use it?

@IvanDrokin
Copy link

IvanDrokin commented Jul 8, 2024

@turian Hi there!
It seems I managed to make it work

Here are the instructions:

  1. Copy the DOVER.yml file or replace in the existing the last line:
    test_load_path: ./pretrained_weights/DOVER_plus_plus.pth

  2. The DOVER_plus_plus.pth seems to contain additional data and it has two keys: "state_dict" and "validation_results". But we need only the state dict, so either resave to a new file "state_dict" values from the original checkpoint, or modify the code of model weights loading:

evaluator = DOVER(**opt["model"]["args"]).to(args.device)
evaluator.load_state_dict(
    torch.load(opt["test_load_path"], map_location=args.device)['state_dict']
    )

Hope it helps

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