c28a63fa9d9fb9ba3cced7052ea243e8884f9bf1,tensorflow_datasets/image/deep_weeds.py,DeepWeeds,_generate_examples,#DeepWeeds#Any#Any#,123

Before Change


    
    label_dict = {}
    for entry in csv:
        label_dict[entry[0].decode("UTF-8")] = int(entry[1])
    
    for file_name in tf.io.gfile.listdir(data_dir_path):
      image = os.path.join(data_dir_path, file_name)
      label = _NAMES[label_dict[file_name]]
      yield file_name, {"image": image, "label": label}

After Change


      self.info.features["label"].names = [v for k, v in sorted(label_id_to_name.items())]

    filename_to_label = {
        row["Filename"]: row["Species"] for row in reader
    }
    for file_name in tf.io.gfile.listdir(data_dir_path):
      yield file_name, {
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/datasets
Commit Name: c28a63fa9d9fb9ba3cced7052ea243e8884f9bf1
Time: 2019-11-21
Author: supertux90@googlemail.com
File Name: tensorflow_datasets/image/deep_weeds.py
Class Name: DeepWeeds
Method Name: _generate_examples


Project Name: scikit-image/scikit-image
Commit Name: ddfac3e42d2ae2e09751de6638d813c76e30ff94
Time: 2018-12-04
Author: mark.harfouche@gmail.com
File Name: tools/check_sdist.py
Class Name:
Method Name:


Project Name: commonsense/conceptnet5
Commit Name: db4b9f4d50af9e83733fc301c32e85cbe6d9c812
Time: 2014-02-25
Author: rob@luminoso.com
File Name: conceptnet5/builders/json_to_solr.py
Class Name:
Method Name: convert_to_solr


Project Name: tensorflow/datasets
Commit Name: c28a63fa9d9fb9ba3cced7052ea243e8884f9bf1
Time: 2019-11-21
Author: supertux90@googlemail.com
File Name: tensorflow_datasets/image/deep_weeds.py
Class Name: DeepWeeds
Method Name: _generate_examples