utils/SegmentationDataLoader.py
def _parse_data(self, image_paths, mask_paths):
        """
        Reads image and mask files depending on
        specified extension.
        """
        image_content = tf.read_file(image_paths)
        mask_content = tf.read_file(mask_paths)

        if self.image_extension == '.jpg':
            images = tf.image.decode_jpeg(image_content, channels=self.image_channels)
        elif self.image_extension == '.png':
            images = tf.image.decode_png(image_content, channels=self.image_channels)
        else:
            raise ValueError("Specified image extension is not supported,\
                              please use either jpg or png images")

        if self.mask_extension == '.png':
            masks = tf.image.decode_png(mask_content, channels=self.mask_channels)
        elif self.mask_extension == '.jpg':
            masks = tf.image.decode_jpeg(mask_content, channels=self.mask_channels)
        else:
            raise ValueError("Specified image extension is not supported,\
                              please use either jpg or png images")

        return images, masks

        Reads image and mask files depending on
        specified extension.
        
Reads image and mask files depending on
specified extension.
Reads image and mask files depending on specified extension .
def _parse_data(self, image_paths, mask_paths):
        image_content = tf.read_file(image_paths)
        mask_content = tf.read_file(mask_paths)
        if self.image_extension == '.jpg':
            images = tf.image.decode_jpeg(image_content, channels=self.image_channels)
        elif self.image_extension == '.png':
            images = tf.image.decode_png(image_content, channels=self.image_channels)
        else:
            raise ValueError("Specified image extension is not supported,\
                              please use either jpg or png images")
        if self.mask_extension == '.png':
            masks = tf.image.decode_png(mask_content, channels=self.mask_channels)
        elif self.mask_extension == '.jpg':
            masks = tf.image.decode_jpeg(mask_content, channels=self.mask_channels)
        else:
            raise ValueError("Specified image extension is not supported,\
                              please use either jpg or png images")
        return images, masks
def _parse_data ( self , image_paths , mask_paths ) : image_content = tf . read_file ( image_paths ) mask_content = tf . read_file ( mask_paths ) if self . image_extension == '.jpg' : images = tf . image . decode_jpeg ( image_content , channels = self . image_channels ) elif self . image_extension == '.png' : images = tf . image . decode_png ( image_content , channels = self . image_channels ) else : raise ValueError ( "Specified image extension is not supported,\
                              please use either jpg or png images" ) if self . mask_extension == '.png' : masks = tf . image . decode_png ( mask_content , channels = self . mask_channels ) elif self . mask_extension == '.jpg' : masks = tf . image . decode_jpeg ( mask_content , channels = self . mask_channels ) else : raise ValueError ( "Specified image extension is not supported,\
                              please use either jpg or png images" ) return images , masks
Reads image and mask files depending on
specified extension.
Reads image and mask files depending on specified extension .
"""
        Reads image and mask files depending on
        specified extension.
        """
self
image_paths
mask_paths