Exemplo n.º 1
0
    def __getitem__(self, i):
        filename = self.files[i]

        image = load_image(filename)

        label = data_processor.binarize(self.annotations[i], self.num_classes)
        label = np.reshape(label, (self.num_classes))
        return (image, label)
Exemplo n.º 2
0
    def __getitem__(self, i, type=None):
        target_file = self.files[i]

        image = load_image(target_file)
        label = self.get_label(target_file)

        label = data_processor.binarize(label, self.num_classes)
        label = np.reshape(label, (self.num_classes))
        return (image, label)
Exemplo n.º 3
0
    def __getitem__(self, i, type=None):
        files, labels = self.files_and_annotations

        filename = files[i]

        image = load_image(filename)

        label = data_processor.binarize(labels[i], self.num_classes)
        label = np.reshape(label, (self.num_classes))
        return (image, label)
Exemplo n.º 4
0
 def __getitem__(self, i):
     image = self._get_image(i)
     label = data_processor.binarize(self.labels[i], self.num_classes)
     label = np.reshape(label, (self.num_classes))
     return (image, label)