Patch-NetVLAD icon indicating copy to clipboard operation
Patch-NetVLAD copied to clipboard

Train on custom dataset

Open JiananZhao0224 opened this issue 3 years ago • 14 comments

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.

JiananZhao0224 avatar May 31 '21 11:05 JiananZhao0224

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

Best, Tobias

Tobias-Fischer avatar Jun 01 '21 04:06 Tobias-Fischer

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

wzxuhuaiyuan avatar Jul 02 '21 17:07 wzxuhuaiyuan

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.

StephenHausler avatar Jul 05 '21 00:07 StephenHausler

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.

Tobias-Fischer avatar Jul 30 '21 04:07 Tobias-Fischer

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.

alien19 avatar Nov 18 '21 13:11 alien19

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.

Tobias-Fischer avatar Nov 18 '21 20:11 Tobias-Fischer

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.

alien19 avatar Nov 18 '21 22:11 alien19

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

Tobias-Fischer avatar Nov 18 '21 22:11 Tobias-Fischer

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)

alien19 avatar Nov 21 '21 07:11 alien19

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 avatar Apr 01 '22 03:04 Zhaozhpe

@alien19

Zhaozhpe avatar Apr 01 '22 03:04 Zhaozhpe

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 [email protected] to discuss further details.

alien19 avatar Apr 03 '22 08:04 alien19

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?

JSP-ywu avatar Sep 08 '22 07:09 JSP-ywu

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.

StephenHausler avatar Sep 08 '22 23:09 StephenHausler