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

Train on custom dataset #8

Open
JiananZhao0224 opened this issue May 31, 2021 · 14 comments
Open

Train on custom dataset #8

JiananZhao0224 opened this issue May 31, 2021 · 14 comments

Comments

@JiananZhao0224
Copy link

Hi, I really appreciate for the work you've done.
I wondered if the training code will be released, which can be used to train our custom dataset, thanks.

Best regards.

@Tobias-Fischer
Copy link
Contributor

Hi @JiananZhao0224, many thanks for your interest in Patch-NetVLAD. We will release training code in the next few weeks.

Best, Tobias

@wzxuhuaiyuan
Copy link

Hi! I'm very inspired by your wonderful work! Could you tell me when you will release the training code? I want to train it myself. Thanks.

Best, Huaiyuan

@StephenHausler
Copy link
Contributor

Hi @wzxuhuaiyuan, thanks for your interest in our work! We will have the training code released by the end of this month at the very latest.

@Tobias-Fischer
Copy link
Contributor

Just in time - @StephenHausler managed to get it done in #20

Please let us know if you run into issues.

@alien19
Copy link

alien19 commented Nov 18, 2021

Hi @Tobias-Fischer , I'd like really to show my appreciation for your work but I want to know if there is a provided code for training Patch-NetVLAD on a custom dataset or how to build my dataset to be compatible with the available code

thanks in advance.

@Tobias-Fischer Tobias-Fischer changed the title About training code. Train on custom dataset Nov 18, 2021
@Tobias-Fischer
Copy link
Contributor

Hi @alien19, many thanks for your message. At the moment we do not support training on a custom dataset in this repository. I'll chat again with @StephenHausler to see how much work it would be for us to support this - but unfortunately it is not a priority at the moment with several deadlines coming up for us.

@alien19
Copy link

alien19 commented Nov 18, 2021

Thanks @Tobias-Fischer, looking forward to your reply and good luck with your deadlines.
But for now if you can provide a brief about the Mapillary dataloader or the metadata required for training the model, I'd be very thankful.

@Tobias-Fischer
Copy link
Contributor

Hi, do you have any specific questions? Most of the code is in https://github.com/QVPR/Patch-NetVLAD/tree/main/patchnetvlad/training_tools

@alien19
Copy link

alien19 commented Nov 21, 2021

Thank you @Tobias-Fischer, I checked most of the code (not all yet) in order to try the training code with the "Mapillary dataset" so, now I want to know how to form my dataset in order to supply the model with it for training (already checked that there are 4 metadata files)

@Zhaozhpe
Copy link

Zhaozhpe commented Apr 1, 2022

Hello, I am also trying to train Patch-NetVLAD on a custom dataset, but it's not going very well. I would like to ask if you have solved this problem, or if it is convenient to communicate this problem together.

@Zhaozhpe
Copy link

Zhaozhpe commented Apr 1, 2022

@alien19

@alien19
Copy link

alien19 commented Apr 3, 2022

Hi @Zhaozhpe , actually I cannot remember what I have reached in that problem since it has been a while ago (I will check though). Until then, yes we can communicate to solve it together. just tell me the point u have reached or ping me on mariamalikhalill@gmail.com to discuss further details.

@JSP-ywu
Copy link

JSP-ywu commented Sep 8, 2022

Hi! Can I get advice about training on a custom dataset? I think this repository doesn't support training on a custom dataset directly. I need to implement original netVLAD with PCA and this repository help me out about what I wonder. But the code for a custom dataset is missing. @alien19 , may I contact you via mail address you wrote?

@StephenHausler
Copy link
Contributor

Hi, I can try and offer some tips that might help. For a custom dataset, a lot of the training code will stay the same as in msls.py. You can pretty much reuse these functions from msls.py:
def getitem()
def update_subcache()
def new_epoch()

Writing a new init() function will require the most work. In init, you need to add in code to find positive images for training (you need GPS data for this), to fill in a pos_indices variable (see line 157 of msls.py). You'll need to populate some self.qIdx, self.pIdx and self.negIdx (indices to locations in query/reference sets) and self.qImages, self.dbImages containing paths to the respective query/reference image sets for your new dataset.

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

7 participants