GithubHelp home page GithubHelp logo

feymanpriv / delg Goto Github PK

View Code? Open in Web Editor NEW
178.0 178.0 23.0 28.57 MB

Pytorch Implementation of Unifying Deep Local and Global Features for Image Search (DELG)

Python 12.04% Shell 0.03% Jupyter Notebook 87.93%

delg's People

Contributors

feymanpriv avatar xuexuetong1993 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

delg's Issues

How to get the global feature file?

In the ReadME, Feature extraction section, you mentioned extracting global and local features, but I didn't see the part about extracting global features. Could you tell me how to generate the "roxford5k512gem_delg_res50_3global.mat" file for global features?

Question about preparing a training data

Hello,@feymanpriv
Thank you for sharing your code. But I ran into some problems when trying to run your code. I downloaded the GLDv2 data set and got JPG files and CSV files, but the train_list.txt file and val_list file mentioned in your code are missing. What should I do with the GLDv2 data set to get the missing files to run your code.
I would be very grateful if you could tell me how to do it.

The top accuracy is low

Hi!Thanks for your code about DELG.
I train my model by my own data,which has 116 classes.I edit the config file and generate the text file,where the line is like imagepath+" "+class index
image
However,I get the low accuracy.
image
Could you help figure out the reason,thank you very much!

ROxf / RPar query image cropping

Hello @feymanpriv,

Thanks for providing this pytorch implementation of DELG! This can be very helpful to the community.

I was looking at the retrieval evaluation code, and I have a question about the experimental protocol on the Revisited Oxford and Paris datasets:

I don't see where query images are cropped before feature extraction. I believe feature extraction is performed here, if I am not mistaken, and this does not seem to distinguish between query and index images (query ones should be cropped, while index ones should not). Possibly the query images would be pre-cropped before image loading? (this is uncommon, and not done in the dataset preparation code in this repo as far as I can tell)

The need for query image cropping is described in the Revisited Oxford/Paris paper. See section 2.3,

Only the cropped regions are to be used as queries; never the full image, since the ground-truth labeling strictly considers only the visual content inside the query region.

Also the authors provide example code where it's shown query cropping, see here. As another example, here's how we do it in the DELG TF codebase (cropping before extraction if images are queries).

Naturally, if images are not cropped before feature extraction, the performance should be much higher given the much larger context.

I am also wondering whether this was the same protocol used in your DOLG paper. There, I see huge gains due to simple reimplementation of DELG (eg, +14-18pp improvement for results in the R1M large-scale dataset) -- those look a bit suspicious.

Again, thanks a lot for your work here. My goal is not to remove merit from your work at all (I find DOLG very interesting!) -- I just really want to clarify the protocol and make sure we would be comparing results apples-to-apples.

Best,
Andre

Question about preparing a training data

Hello, @feymanpriv.
First of all, thank you very much for sharing your code.
I'm trying to run your code, but I ran into some problems since I'm new to the GLDv2dataset.

I downloaded the gldv2 dataset from the official DELG GitHub link below.
link
With this, I got image files and CSV files.
After that, what do I need to do to run this code?

The build_image_dataset.py in the link above is the process of running to get the TFRecord file, but it doesn't seem to match this code.
I would be very grateful if you could tell me how to handle the raw GLDv2 dataset to run your code.

Question about the training parameters

Hello, @feymanpriv , thank you very much for your work.

I am trying to review your code, here I want to know some key important parameters in your work:

As claimed in delg paper, only 15M step(about 25epoch) is needed in GLDv2Clean-Train-80percent dataset, while the max epoch in your config file is 100, do you train 100 epochs finnally to get your result?

Is there any modification in your implemention which is different to origin implemention by tensorflow ?

About the training config for resnet50

Hello, thanks for your reproduction. Since many stuffs are missing in the codebase, so I have tried running your codebase by fixing lots of issues by myself. However, I did not obtained the claimed results in the readme. I have many questions regarding the configuration of training

  1. Should the NUM_CLASSES be 81313 instead of 96264 (I don't know where the number comes from.) if trained on GLD-v2-clean?
  2. You have mentioned in readme that "All training set version is GLDv2-clean (81313, 15804700)". So how do you split the val_list.txt in TEST SPLIT? I personally split the whole 1.5 million images into training and validation sets by the ratio 4:1. I am not sure if it coincides with your setting.
  3. Would you mind providing the configuration file if changing the input size to 512?

Thanks!

关于训练集的问题

您好,在我跑这个logger.info("Constructing dataset from {}...".format(split)) self._data_path, self._split = data_path, split的时候, split显示‘train_list.txt’,可我下载的GLDv2中没有这个txt,请您帮忙解答下,感谢

The reported numbers are higher than DELG paper

Thank you so much for the nice repo. I notice that the performance of DELG (ResNet50 Global) is around 73 on ROxf M. But this repo claims to have 78.51, which is much higher. Do you have any idea about this performance gap? Could you highlight the key implementation differences that might cause this performance gap? Thank you for your time and consideration. Looking forward to hearing from you.

License for the code

Thanks a lot for sharing your code. May I ask what is the license for the code?

I plan to run experiments with it and incorporate part of it into my own code.

Thanks.

-- Nhon

Can you show me your dataset structure?

When i run this code,it tells me AssertionError: Data path '/home/y182202031/DELG-master/datasets/data/landmark' not found. So, can you show me your dataset structure?

Traceback (most recent call last):
File "train_delg.py", line 23, in
main()
File "train_delg.py", line 19, in main
dist.multi_proc_run(num_proc=cfg.NUM_GPUS, fun=trainer.train_model)
File "/home/y182202031/DELG-master/core/distributed.py", line 141, in multi_proc_run
fun(*fun_args, **fun_kwargs)
File "/home/y182202031/DELG-master/core/trainer.py", line 176, in train_model
train_loader = loader.construct_train_loader()
File "/home/y182202031/DELG-master/datasets/loader.py", line 50, in construct_train_loader
drop_last=True,
File "/home/y182202031/DELG-master/datasets/loader.py", line 27, in _construct_loader
dataset = DataSet(data_path, split)
File "/home/y182202031/DELG-master/datasets/commondataset.py", line 38, in init
assert os.path.exists(data_path), "Data path '{}' not found".format(data_path)
AssertionError: Data path '/home/y182202031/DELG-master/datasets/data/landmark' not found

Is there a plan for auto-encoder part

Nice work!
I go through the model define part, and found that the auto-encoder of local feature not implement. I wonder is there any plan for this auto-encoder part?
Thank u!

Model training

Do you have to use the multi-card training model if you re-train? About how much GPU resources are required, is single-card training feasible

Some Quesntion about TestDataset

Can the blogger provide test_list.txt?
My problem is that there are only about 70,000 images in the index folder, but there are 760,000 images in index. CSV. How can I solve this problem?

Reranking process is too slow.

Hi, @feymanpriv.

  • How long do you cost to test on the benchmark datasets (e.g., oxford5k)?
    I found that testing on these 5000 images costs over 0.6s per image for extracting features on a single GPU. Then it sounds incredible that reranking with local features costs over 200sec per query on a single process. Compared to the original tf implementation, it is too slow.

  • The used reranking parameters are default as NUM_RERANK = 100, MAX_RANSAC_ITERATIONS = 1000.

  • I am confused about whether I run in an improper way. Also, I have tried batch-wise running but failed due to the different sizes of each sample. Could you please help me accelerate it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.