Training the Original Superpoint Network from scratch
vanguard478 opened this issue · 0 comments
Hi,
Thanks a lot for this amazing repo and also the blog post.
I am trying to train the original superpoint network SuperPoint_MagicLeap using the steps highlighted in this repo. I had to make some changes to deal with some issues in the first steps as below :
- In
models/SuperPointNet_pretrained.py
I changed this line toclass SuperPointNet_pretrained(torch.nn.Module)
- Also in the Train_model_heatmap.py , I had to make changes to the variable receiving the return of the model as in the modified Superpoint Models, the return type is
dict
where as the original one returns atuple
:
if self.config["model"]["name"] == "SuperPointNet_pretrained":
semi, coarse_desc = outs[0], outs[1]
else:
semi, coarse_desc = outs["semi"], outs["desc"]
I am using the same config file magicpoint_shapes_pair.yaml as the one mentioned in Step 1 of the README with the following parameters changed :
front_end_model: 'Train_model_heatmap'
model:
name: 'SuperPointNet_pretrained'
params: {
}
detector_loss:
loss_type: 'softmax'
batch_size: 512 # 64
retrain: True # set true for new model
reset_iter: True
#pretrained: ##train from scratch
With these changes, I am able to start the training without any issues. I have also changed the batch size parameter to batch_size: 512
and increased the learning_rate: 0.008
The training loss from tensorboard is as below and am not sure if the training is going corretcly:
Is my current changes sufficient for the training of the MagicPoint network using the Original Superpoint Network?