nicetoolbox.detectors.method_detectors.body_joints.mmpose_framework.extract_key_per_value¶
- nicetoolbox.detectors.method_detectors.body_joints.mmpose_framework.extract_key_per_value(input_dict)[source]¶
Extracts keys from a dictionary based on the type of their values.
If all values in the dictionary are integers, it returns a list of keys. If any value is a list, it appends an index to the key to create a unique key.
- Parameters:
input_dict (dict) – The input dictionary to extract keys from.
- Returns:
A list of keys extracted from the input dictionary.
- Return type:
return_keys (list)
- Raises:
NotImplementedError – If a value in the dictionary is neither an integer nor a
list. –