Comments (4)
it looks this issue would be a problem with making the model scriptable: pytorch/pytorch#36061
https://github.com/nianticlabs/ace/blob/main/ace_network.py#L91
one alternative would be to do something like this:
self.res_blocks = nn.ModuleList(
nn.ModuleList(([
nn.Conv2d(self.head_channels, self.head_channels, 1, 1, 0),
nn.Conv2d(self.head_channels, self.head_channels, 1, 1, 0),
nn.Conv2d(self.head_channels, self.head_channels, 1, 1, 0),
])) for block in range(num_head_blocks)
)
though this would end up breaking this import:
Line 212 in 6b2a3bf
from ace.
@tcavallari I would really love to get inference to run on mobile if it's possible, but it appears as though the pretrained weights must be retrained as per this issue (I'm assuming that there are currently no plans to make the code for the pretrained weights available):
To make these projects scriptable, we must replace list of modules with nn.ModuleList which will make the pretrained models invalid, since the replacement will change the keys of state_dict, and may increase the number of model parameters.
from ace.
Hello!
To make these projects scriptable, we must replace list of modules with nn.ModuleList which will make the pretrained models invalid, since the replacement will change the keys of state_dict, and may increase the number of model parameters.
I don't think it's necessary to retrain the encoder. You can create a scriptable architecture using nn.ModuleList
and inserting the same convolution layers (keeping the same parameters, i.e. kernel size, stride, padding, etc...) inside it. The number of model parameters shouldn't change at all.
Then it should just be a matter of replacing the weights in the new state_dict
with the weights in the pretrained one we provide with the repo. You just have to figure out which keys in the new dict map to which keys in the old dictionary, but it should be relatively easy.
from ace.
Hello!
To make these projects scriptable, we must replace list of modules with nn.ModuleList which will make the pretrained models invalid, since the replacement will change the keys of state_dict, and may increase the number of model parameters.
I don't think it's necessary to retrain the encoder. You can create a scriptable architecture using
nn.ModuleList
and inserting the same convolution layers (keeping the same parameters, i.e. kernel size, stride, padding, etc...) inside it. The number of model parameters shouldn't change at all.Then it should just be a matter of replacing the weights in the new
state_dict
with the weights in the pretrained one we provide with the repo. You just have to figure out which keys in the new dict map to which keys in the old dictionary, but it should be relatively easy.
Ok awesome I think I managed to figure it out. I believe this change should be completely seamless in terms of back-compat so do you think we could merge this into main? I made a PR here in #22. Thank you so much for the guidance
from ace.
Related Issues (20)
- Is there a pipline for large scale scene like kitti odometry? HOT 1
- Failed to Load Encoder HOT 2
- Cannot download encoder weights HOT 1
- Consistency in pose format for train/validation HOT 1
- Support principle point intrinsic parameters in training HOT 3
- Wayspot Datasets Visualization HOT 1
- Question about sensitivity to ground truth pose accuracy HOT 3
- Peformance vs hloc HOT 3
- Need some clarification on what pose file mean HOT 4
- Does ACE not support large dataset? HOT 4
- 3D models for the wayspot dataset HOT 2
- fx and fy in test_ace.py HOT 2
- Confusion about ACE coordinate frame
- Where does ACE freezes the backbone when training the head HOT 1
- Pretrain Feature Extractor Backbone Network from ScanNet HOT 2
- About 7_scenes rgb calibration HOT 2
- About _convert_cv_to_gl(pose) HOT 3
- Support in MacOS HOT 2
- render_visualization error HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ace.