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

Function _map

deeplabcut/benchmark/metrics.py:101–115  ·  view source on GitHub ↗

Map image paths from predicted data to GT as the first are typically absolute whereas the latter are relative to the project path.

(strings, substrings)

Source from the content-addressed store, hash-verified

99
100
101def _map(strings, substrings):
102 """Map image paths from predicted data to GT as the first are typically absolute
103 whereas the latter are relative to the project path."""
104
105 lookup = dict()
106 strings_ = strings.copy()
107 substrings_ = substrings.copy()
108 while strings_:
109 string = strings_.pop()
110 for s in substrings_:
111 if string.endswith(s):
112 lookup[string] = s
113 substrings_.remove(s)
114 break
115 return lookup
116
117
118def conv_obj_to_assemblies(eval_results_obj, keypoint_names):

Callers 1

calc_prediction_errorsFunction · 0.85

Calls 1

removeMethod · 0.80

Tested by

no test coverage detected