Comments (2)
Hey Gengshan, I went about addressing the case without symmetry and you were exactly correct! I reinit the CNN weights for the non-root bones when reiniting the bones (code included below) and got the following results:
vi-vi_t-5-10.mp4
The code added when reiniting the bones (inside the if
statement you pointed to) was:
# Quat weights: (4*n_hypo) per bone
quat_weights = self.model.module.code_predictor.quat_predictor.pred_layer.weight
quat_weights_shape = quat_weights.shape
nfeat = quat_weights_shape[-1] # same for all predictors
quat_weights = torch.cat(
[
quat_weights.view(self.opts.n_bones, self.opts.n_hypo*4, nfeat)[:1], # leave root bone estimator unchanged
torch.randn_like(quat_weights.view(self.opts.n_bones, self.opts.n_hypo*4, nfeat)[1:]) # reinit other weights
],
dim=0
).view(quat_weights_shape)
self.model.module.code_predictor.quat_predictor.pred_layer.weight = torch.nn.Parameter(quat_weights)
# Trans weights: 2 per bone
trans_weights = self.model.module.code_predictor.trans_predictor.pred_layer.weight
trans_weights_shape = trans_weights.shape
trans_weights = torch.cat(
[
trans_weights.view(self.opts.n_bones, 2, nfeat)[:1], # leave root bone estimator unchanged
torch.randn_like(trans_weights.view(self.opts.n_bones, 2, nfeat)[1:]) # reinit other weights
],
dim=0
).view(trans_weights_shape)
self.model.module.code_predictor.trans_predictor.pred_layer.weight = torch.nn.Parameter(trans_weights)
# Depth weights: 1 per bone
depth_weights = self.model.module.code_predictor.depth_predictor.pred_layer.weight
depth_weights_shape = depth_weights.shape
depth_weights = torch.cat(
[
depth_weights.view(self.opts.n_bones, 1, nfeat)[:1], # leave root bone estimator unchanged
torch.randn_like(depth_weights.view(self.opts.n_bones, 1, nfeat)[1:]) # reinit other weights
],
dim=0
).view(depth_weights_shape)
self.model.module.code_predictor.depth_predictor.pred_layer.weight = torch.nn.Parameter(depth_weights)
This seems to address the problem of the mesh being dragged out of screen, although I am implicitly making the assumption that all the root body quaternion predictor weights for every hypothesis come before any other bones. Thanks a lot for the excellent help!
from lasr.
Hi Erik, thanks for sharing the details, which helps a lot for understanding your problem.
Here are my thoughts on the two scenarios (1) symmetry (2) without symmetry:
- In short, when symmetry is enabled for your video, LASR ended up finding a wrong symmetry plane, which poses a wrong constraint on the shape via the soft-symmetry loss, Eq(11). Specifically, at the first stage, LASR will hypothesize 16 symmetry planes whose normal is evenly distributed on a hemisphere. At the second stage, LASR finds the symmetry plane with the lowest accumulated reconstruction error and use it in the subsequent stages for construction symmetry loss Eq (11).
- When symmetry is disabled, the problem encountered is different. Based on my experience, the misalignment of GT silhouette and renderings is sometimes caused by the re-initialization of bones here, where the rest bone positions are re-intialized but the CNN predictor for bone transforms Eq(13) is not re-initalized. Sometimes, a large and misaligned bone transformation can drag the whole mesh out of screen.
To solve 1, you may manually select the best symmetry plane by modifying the optim_cam
variable here. I don't have a piece of code right now, but I usually save reconstructed meshes corresponding to all hypothesis and visually inspect them. Vertices are from states['mean_v']
, faces are from states['faces']
and texture are from states['tex']
.
To solve 2, re-initializing the corresponding weights of CNN predictor for the bone transformations would work. It is not implemented. In case you want to implement it, these lines could help. Basically you want to maintain the weights for root body pose (the first set of parameters for quat
, trans
and depth
) and assign random values to weights of the second to last set of parameters.
from lasr.
Related Issues (18)
- error [python scripts/render_syn.py] HOT 2
- LASR with known camera intrinsics/extrinsics HOT 12
- Does the env yaml file not works on windows? HOT 1
- Bone Length HOT 1
- OOM ERROR HOT 1
- Question on Flow preprocessing HOT 1
- Flipped flow maps in the flow loss HOT 3
- Question about the flatten loss HOT 4
- ModuleNotFoundError: No module named 'point_rend' HOT 11
- Cluster Centers remain constant.
- how to plot such figure? HOT 4
- Pdb mode HOT 64
- ninja: no work to do. HOT 8
- OpenGL.error.GLError HOT 3
- RuntimeError: CUDA error: invalid device ordinal HOT 2
- No module named 'detectron2.config' HOT 1
- why is N-NRSfM [44] not compared in Tab.3? HOT 2
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 lasr.