original_docstring: Converts an image into a network input.
  		Arguments:
  		im (ndarray): a color image in BGR order
  		Returns:
  		blob (ndarray): a data blob holding an image pyramid
  		im_scale_factors (list): list of image scales (relative to im) used
  		  in the image pyramid
  		
docstring: Converts an image into a network input.
docstring_tokens: Converts an image into a network input .
code: def _get_image_blob(self, im):
  		"""Converts an image into a network input.
  		Arguments:
  		im (ndarray): a color image in BGR order
  		Returns:
  		blob (ndarray): a data blob holding an image pyramid
  		im_scale_factors (list): list of image scales (relative to im) used
  		  in the image pyramid
  		"""
  		im_orig = im.astype(np.float32, copy=True)
  		im_orig -= cfg.PIXEL_MEANS
  
  		im_shape = im_orig.shape
  		im_size_min = np.min(im_shape[0:2])
  		im_size_max = np.max(im_shape[0:2])
  
  		processed_ims = []
  		im_scale_factors = []
  
  		for target_size in cfg.TEST.SCALES:
  			im_scale = float(target_size) / float(im_size_min)
  			# Prevent the biggest axis from being more than MAX_SIZE
  			if np.round(im_scale * im_size_max) > cfg.TEST.MAX_SIZE:
  				im_scale = float(cfg.TEST.MAX_SIZE) / float(im_size_max)
  			im = cv2.resize(im_orig, None, None, fx=im_scale, fy=im_scale,
  							interpolation=cv2.INTER_LINEAR)
  			im_scale_factors.append(im_scale)
  			processed_ims.append(im)
  
  		# Create a blob to hold the input images
  		blob = im_list_to_blob(processed_ims)
  		return blob, np.array(im_scale_factors)
code_tokens: def _get_image_blob ( self , im ) : im_orig = im . astype ( np . float32 , copy = True ) im_orig -= cfg . PIXEL_MEANS im_shape = im_orig . shape im_size_min = np . min ( im_shape [ 0 : 2 ] ) im_size_max = np . max ( im_shape [ 0 : 2 ] ) processed_ims = [ ] im_scale_factors = [ ] for target_size in cfg . TEST . SCALES : im_scale = float ( target_size ) / float ( im_size_min ) if np . round ( im_scale * im_size_max ) > cfg . TEST . MAX_SIZE : im_scale = float ( cfg . TEST . MAX_SIZE ) / float ( im_size_max ) im = cv2 . resize ( im_orig , None , None , fx = im_scale , fy = im_scale , interpolation = cv2 . INTER_LINEAR ) im_scale_factors . append ( im_scale ) processed_ims . append ( im ) blob = im_list_to_blob ( processed_ims ) return blob , np . array ( im_scale_factors )
short_docstring: Converts an image into a network input.
short_docstring_tokens: Converts an image into a network input .
comment: """Converts an image into a network input.
  		Arguments:
  		im (ndarray): a color image in BGR order
  		Returns:
  		blob (ndarray): a data blob holding an image pyramid
  		im_scale_factors (list): list of image scales (relative to im) used
  		  in the image pyramid
  		"""$SEP$# Prevent the biggest axis from being more than MAX_SIZE$SEP$# Create a blob to hold the input images