QVPR / Patch-NetVLAD

Code for the CVPR2021 paper "Patch-NetVLAD: Multi-Scale Fusion of Locally-Global Descriptors for Place Recognition"
MIT License
517 stars 72 forks source link

Train on custom dataset #8

Open JiananZhao0224 opened 3 years ago

JiananZhao0224 commented 3 years ago

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 commented 3 years ago

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

Best, Tobias

wzxuhuaiyuan commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

Just in time - @StephenHausler managed to get it done in https://github.com/QVPR/Patch-NetVLAD/pull/20

Please let us know if you run into issues.

alien19 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@alien19

alien19 commented 2 years ago

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 commented 1 year ago

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 commented 1 year ago

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.