MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / test_assembler_with_single_bodypart

Function test_assembler_with_single_bodypart

tests/test_inferenceutils.py:173–196  ·  view source on GitHub ↗
(real_assemblies)

Source from the content-addressed store, hash-verified

171
172
173def test_assembler_with_single_bodypart(real_assemblies):
174 with open(os.path.join(TEST_DATA_DIR, "trimouse_full.pickle"), "rb") as file:
175 temp = pickle.load(file)
176 data = {"metadata": temp.pop("metadata")}
177 for k, dict_ in temp.items():
178 data[k] = {
179 "coordinates": (dict_["coordinates"][0][:1],),
180 "confidence": dict_["confidence"][:1],
181 }
182 ass = inferenceutils.Assembler(
183 data,
184 max_n_individuals=3,
185 n_multibodyparts=1,
186 )
187 ass.metadata["joint_names"] = ass.metadata["joint_names"][:1]
188 ass.metadata["num_joints"] = 1
189 ass.metadata["paf_graph"] = []
190 ass.metadata["paf"] = []
191 ass.metadata["bpts"] = [0]
192 ass.metadata["ibpts"] = [0]
193 ass.assemble(chunk_size=0)
194 assert not ass.unique
195 assert len(ass.assemblies) == len(real_assemblies)
196 assert all(len(a) == 3 for a in ass.assemblies.values())
197
198
199def test_assembler_with_unique_bodypart(real_assemblies_montblanc):

Callers

nothing calls this directly

Calls 3

assembleMethod · 0.95
loadMethod · 0.80
itemsMethod · 0.80

Tested by

no test coverage detected