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

Method decompose_code

src/modules/pixie/pixie.py:191–200  ·  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

189 net.eval()
190
191 def decompose_code(self, code, num_dict):
192 ''' Convert a flattened parameter vector to a dictionary of parameters
193 '''
194 code_dict = {}
195 start = 0
196 for key in num_dict:
197 end = start+int(num_dict[key])
198 code_dict[key] = code[:, start:end]
199 start = end
200 return code_dict
201
202 def part_from_body(self, image, part_key, points_dict, crop_joints=None):
203 ''' crop part(head/left_hand/right_hand) out from body data, joints also change accordingly

Callers 1

encodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected