nianticlabs / relpose-gnn Goto Github PK
View Code? Open in Web Editor NEW[3DV21] Visual Camera Re-Localization Using Graph Neural Networks and Relative Pose Supervision, M. Türkoǧlu et al.
License: Other
[3DV21] Visual Camera Re-Localization Using Graph Neural Networks and Relative Pose Supervision, M. Türkoǧlu et al.
License: Other
Thank you for your great job, but I still have some questions. About the image retrieval process, including the query image in the database? Or enquiry to whether the images including the image itself
Hi,
thanks alot for you great paper.
I am trying to run your pre-trained model over 7scenes.
when I try to run the original code I get below error:
RuntimeError: Error(s) in loading state_dict for PoseNetX_R2:
Unexpected key(s) in state_dict: "gnn2.mlp.0.weight", "gnn2.mlp.0.bias", "gnn2.mlp.2.weight", "gnn2.mlp.2.bias", "gnn2.mlp_updating.0.weight", "gnn2.mlp_updating.0.bias", "gnn2.mlp_updating.2.weight", "gnn2.mlp_updating.2.bias", "gnn2.edge_model.edge_mlp.0.weight", "gnn2.edge_model.edge_mlp.0.bias", "gnn2.edge_model.edge_mlp.2.weight", "gnn2.edge_model.edge_mlp.2.bias", "gnn2.att.g.weight", "gnn2.att.g.bias", "gnn2.att.theta.weight", "gnn2.att.theta.bias", "gnn2.att.phi.weight", "gnn2.att.phi.bias", "gnn2.att.W.weight", "gnn2.att.W.bias".
In order for the model to load properly, I changed in test.py line 162 from R2 to R3
from:
elif self.model_name == 'R3':
self.model = PoseNetX_R2(
to:
self.model = PoseNetX_R3(
and then model loads properly, but I am getting different results than in paper, for example for chess scene I get: 0.31m/14.18 degrees vs. paper 0.08m/2,7 degrees
python -u ${RELPOSEGNN}/python/niantic/testing/test.py
--dataset-dir "${SEVENSCENES}"
--test-data-dir "${SEVENSCENESRW}"
--weights "${DATADIR}/relpose_gnn__multi_39.pth.tar"
--save-dir "${DATADIR}"
--gpu 0
--test-scene "${SCENE}"
2023-09-09 18:16:05.220 | INFO | main:init:137 - Dataset: 7Scenes
2023-09-09 18:16:05.221 | INFO | main:init:138 - Test scene: chess
2023-09-09 18:16:05.221 | INFO | main:init:139 - Test data dir: relpose_gnn/7scenes-rw/
2023-09-09 18:16:05.221 | INFO | main:init:140 - Test dataset size: 2000
2023-09-09 18:16:05.221 | INFO | main:init:141 - Images sizes: 256, 341
2023-09-09 18:16:05.221 | INFO | main:init:142 - Number of nodes in the graph: 8, fc
2023-09-09 18:16:05.221 | INFO | main:init:143 - Number of nodes in the graph - test: 8 fc
2023-09-09 18:16:05.221 | INFO | main:init:145 - Use RP loss: True
2023-09-09 18:16:05.221 | INFO | main:init:146 - Use RP model: True
2023-09-09 18:16:05.221 | INFO | main:init:147 - srx: 0.0
2023-09-09 18:16:05.221 | INFO | main:init:148 - srq: -3
2023-09-09 18:16:05.221 | INFO | main:init:149 - edge_keep_factor: 0.5
2023-09-09 18:16:05.221 | INFO | main:init:150 - gnn_recursion: 2
2023-09-09 18:16:05.222 | INFO | main:init:151 - droprate: 0.5
2023-09-09 18:16:05.222 | INFO | main:init:152 - gpu: 0
2023-09-09 18:16:06.938 | INFO | main:init:175 - Num parameters: 118861132
2023-09-09 18:16:53.399 | INFO | main:eval_RP:275 - [Scene: chess, set: test, relpose_gnn__multi_39.pth.tar] Error in translation: median 0.31 m, mean 0.39 m Error in rotation: median 14.18 degrees, mean 16.58 degrees
any ideas?
what is the difference with PoseNetX_R2 and PoseNetX_R3?
are you sure you uploaded the correct pre-trainefd model to the git?
Thanks,
Ofer
Thanks for sharing the code for the paper!
However, when going through the code about data loading, I feel confused about the normalization procedure:
In python\niantic\datasets\seven_scenes.py Line 121, the poses seem to undergo a normalization operation, why?
Will it influence the evaluation since the scale of camera translation is modified?
Thanks for sharing the code of the paper :)
I'm curious to know about making the given visualizations comparing predicted pose and GT.
Any leads would be helpful!
Looking forward to your reply.
relpose-gnn/python/niantic/modules/posenet.py
Lines 1014 to 1017 in e69e05f
Hello,
Thanks for sharing the code for this cool paper. I was going through your implementation and can't really understand why edge direction invariance is introduced in creating the initial edge features.
Since we are regressing relative pose, shouldn't we ensure that features are different for different edge directions? The later edge updates in the GNN do account for the edge direction. But why is this invariance explicitly introduced in creating the initial edge features?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.