SegMitos_train/mitos_layers_ring.py
def load_image(self, idx):
        """
        Load input image and preprocess for Caffe:
        - cast to float
        - switch channels RGB -> BGR
        - subtract mean
        - transpose to channel x height x width order
        """
        im = Image.open('{}/augImg/{}.jpg'.format(self.mitos_dir, idx))
        in_ = np.array(im, dtype=np.float32)
        in_ = in_[:,:,::-1]
        in_ -= self.mean
        in_ = in_.transpose((2,0,1))
        return in_

        Load input image and preprocess for Caffe:
        - cast to float
        - switch channels RGB -> BGR
        - subtract mean
        - transpose to channel x height x width order
        
Load input image and preprocess for Caffe:
cast to float
switch channels RGB -> BGR
subtract mean
transpose to channel x height x width order
Load input image and preprocess for Caffe : cast to float switch channels RGB - > BGR subtract mean transpose to channel x height x width order
def load_image(self, idx):
        im = Image.open('{}/augImg/{}.jpg'.format(self.mitos_dir, idx))
        in_ = np.array(im, dtype=np.float32)
        in_ = in_[:,:,::-1]
        in_ -= self.mean
        in_ = in_.transpose((2,0,1))
        return in_
def load_image ( self , idx ) : im = Image . open ( '{}/augImg/{}.jpg' . format ( self . mitos_dir , idx ) ) in_ = np . array ( im , dtype = np . float32 ) in_ = in_ [ : , : , : : - 1 ] in_ -= self . mean in_ = in_ . transpose ( ( 2 , 0 , 1 ) ) return in_
Load input image and preprocess for Caffe:
 cast to float
 switch channels RGB -> BGR
 subtract mean
 transpose to channel x height x width order
Load input image and preprocess for Caffe : cast to float switch channels RGB - > BGR subtract mean transpose to channel x height x width order
"""
        Load input image and preprocess for Caffe:
        - cast to float
        - switch channels RGB -> BGR
        - subtract mean
        - transpose to channel x height x width order
        """
self
idx