parameters: (self, idx)
return_statement: return in_
docstring: Load input image and preprocess for Caffe:
          - cast to float
          - switch channels RGB -> BGR
          - subtract mean
          - transpose to channel x height x width order
docstring_summary: Load input image and preprocess for Caffe:
          - cast to float
          - switch channels RGB -> BGR
          - subtract mean
          - transpose to channel x height x width order
docstring_tokens: Load input image and preprocess for Caffe : - cast to float - switch channels RGB - > BGR - subtract mean - transpose to channel x height x width order
function: 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('{}/JPEGImages/{}.jpg'.format(self.voc_dir, idx))
          in_ = np.array(im, dtype=np.float32)
          in_ = in_[:,:,::-1]
          in_ -= self.mean
          in_ = in_.transpose((2,0,1))
          return in_
function_tokens: def load_image ( self , idx ) : im = Image . open ( '{}/JPEGImages/{}.jpg' . format ( self . voc_dir , idx ) ) in_ = np . array ( im , dtype = np . float32 ) in_ = in_ [ : , : , : : - 1 ] in_ -= self . mean in_ = in_ . transpose ( ( 2 , 0 , 1 ) ) return in_