nashory / DeLF-pytorch

PyTorch Implementation of "Large-Scale Image Retrieval with Attentive Deep Local Features"
MIT License
343 stars 63 forks source link

Pretrained weights trained on landmark dataset #2

Open nashory opened 5 years ago

nashory commented 5 years ago

I share the pretrained weight trained on landmarkd dataset. Please download it from the following url:

https://drive.google.com/open?id=1dbdaDyVeIb53iGh4Uk5kA4in9-uURoLM

rita-qingyu commented 3 years ago

Hi, thank you for sharing the trained model. Is this keypoints model trained on the full-version and the finetune model trained on the clean-version?

PapaMadeleine2022 commented 3 years ago

@nashory , Hello, when I use your 'pretrained_model/ldmk/pca/pca.h5' to extract dimension-reduced DeLF, it shows error:

...
loaded weights from module "pool" ...
load model from "pretrained_model/ldmk/model/keypoint/ckpt/fix.pth.tar"
load PCA parameters...
Traceback (most recent call last):
  File "extract/extractor.py", line 432, in <module>
    extractor = FeatureExtractor(extractor_config)
  File "extract/extractor.py", line 112, in __init__
    self.pca_mean = h5file['.']['pca_mean'].value
AttributeError: 'Dataset' object has no attribute 'value'

How to fix it? Can you give me some advises?

PapaMadeleine2022 commented 3 years ago

@nashory , Hello, when I use your 'pretrained_model/ldmk/pca/pca.h5' to extract dimension-reduced DeLF, it shows error:

...
loaded weights from module "pool" ...
load model from "pretrained_model/ldmk/model/keypoint/ckpt/fix.pth.tar"
load PCA parameters...
Traceback (most recent call last):
  File "extract/extractor.py", line 432, in <module>
    extractor = FeatureExtractor(extractor_config)
  File "extract/extractor.py", line 112, in __init__
    self.pca_mean = h5file['.']['pca_mean'].value
AttributeError: 'Dataset' object has no attribute 'value'

How to fix it? Can you give me some advises?

I use np.array(x) to replace x.value, and now it works.