c987d27ce7922d08f5d50bf0280b102548fac2a0,research/object_detection/dataset_tools/create_ava_actions_tf_record.py,Ava,get_label_map,#Ava#Any#,464

Before Change


    Parses a label map into {integer:string} format.
    label_map = {}
    label_map = label_map_util.load_labelmap(path)
    print(label_map)
    label_map_dict = {}
    for item in label_map.item:
        label_map_dict[item.name] = item.label_id
    with open(path, "rb") as f:

After Change


  def get_label_map(self, path):
    Parses a label map into {integer:string} format.
    label_map_dict = label_map_util.get_label_map_dict(path)
    label_map_dict = {v: bytes(k, "utf8") for k, v in label_map_dict.items()}
    logging.info(label_map_dict)
    return label_map_dict
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: tensorflow/models
Commit Name: c987d27ce7922d08f5d50bf0280b102548fac2a0
Time: 2020-08-15
Author: kaushikshiv@google.com
File Name: research/object_detection/dataset_tools/create_ava_actions_tf_record.py
Class Name: Ava
Method Name: get_label_map


Project Name: OpenNMT/OpenNMT-py
Commit Name: 63871d5ab3301d015805abddd8f4259680d6a24a
Time: 2017-09-21
Author: bpeters@coli.uni-saarland.de
File Name: translate.py
Class Name:
Method Name: main


Project Name: OpenNMT/OpenNMT-py
Commit Name: 4087c4610d89b74ba85d63c05be9e7d45e822f63
Time: 2017-06-23
Author: shuoyangd@users.noreply.github.com
File Name: translate.py
Class Name:
Method Name: main