MCPcopy Create free account
hub / github.com/Pixel-Talk/EHM-Tracker / decompose_code

Method decompose_code

src/modules/pixie/pixie_encoder.py:145–154  ·  view source on GitHub ↗

Convert a flattened parameter vector to a dictionary of parameters

(self, code, num_dict)

Source from the content-addressed store, hash-verified

143 net.eval()
144
145 def decompose_code(self, code, num_dict):
146 ''' Convert a flattened parameter vector to a dictionary of parameters
147 '''
148 code_dict = {}
149 start = 0
150 for key in num_dict:
151 end = start+int(num_dict[key])
152 code_dict[key] = code[:, start:end]
153 start = end
154 return code_dict
155
156 def part_from_body(self, image, part_key, points_dict, crop_joints=None):
157 ''' crop part(head/left_hand/right_hand) out from body data, joints also change accordingly

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected