9573a66124f7d0b1b4ee42a7b7b9ac6acccc296f,ssd_batch_generator.py,BatchGenerator,parse_csv,#BatchGenerator#Any#Any#Any#Any#Any#,202

Before Change


        current_labels = [] // The list where we collect all ground truth boxes for a given image
        for idx, i in enumerate(data):
            if current_file == "": // If this is the first image file
                current_file = i[0]
                current_labels.append(i[1:])
                if len(data) == 1: // If there is only one box in the CVS file
                    self.labels.append(np.stack(current_labels, axis=0))
                    self.filenames.append(os.path.join(self.images_path, current_file))
            else:
                if i[0] == current_file: // If this box (i.e. this line of the CSV file) belongs to the current image file
                    current_labels.append(i[1:])

After Change



        with open(self.labels_path, newline="") as csvfile:
            csvread = csv.reader(csvfile, delimiter=",")
            next(csvread) // Skip the header row.
            for row in csvread: // For every line (i.e for every bounding box) in the CSV file...
                if self.include_classes == "all" or int(row[self.input_format.index("class_id")].strip()) in self.include_classes: // If the class_id is among the classes that are to be included in the dataset...
                    box = [] // Store the box class and coordinates here
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pierluigiferrari/ssd_keras
Commit Name: 9573a66124f7d0b1b4ee42a7b7b9ac6acccc296f
Time: 2017-12-10
Author: pierluigi.ferrari@gmx.com
File Name: ssd_batch_generator.py
Class Name: BatchGenerator
Method Name: parse_csv


Project Name: tensorlayer/tensorlayer
Commit Name: f2073333b710a340403843763ba60eb1e6699916
Time: 2019-04-11
Author: rundi_wu@pku.edu.cn
File Name: examples/data_process/tutorial_tfrecord2.py
Class Name:
Method Name:


Project Name: tensorlayer/tensorlayer
Commit Name: f2073333b710a340403843763ba60eb1e6699916
Time: 2019-04-11
Author: rundi_wu@pku.edu.cn
File Name: examples/data_process/tutorial_tfrecord.py
Class Name:
Method Name: