MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / align_pred_with_gt

Function align_pred_with_gt

models/strand_codec.py:102–108  ·  view source on GitHub ↗
(pred_dict, normalization_dict)

Source from the content-addressed store, hash-verified

100 return gt_dict_out
101
102def align_pred_with_gt(pred_dict, normalization_dict):
103 #the positions (originating from integration of directions) from the codec start at 0 but we need to shift this by the amount that normalize_gt_data shifts the origin
104 strands_data=pred_dict["strand_positions"]
105 strands_data=strands_data-normalization_dict["xyz_mean"].view(1,1,3)/normalization_dict["xyz_std"].view(1,1,3)
106 pred_dict_out = dict(pred_dict)
107 pred_dict_out["strand_positions"]=strands_data
108 return pred_dict_out
109
110
111

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected