parameters: (model, net_input)
return_statement: return feat_prob, locreg_pred
docstring: Get the CNN results for a fully prepared image.
docstring_summary: Get the CNN results for a fully prepared image.
docstring_tokens: Get the CNN results for a fully prepared image .
function: def _cnn_process_image(model, net_input):
      """Get the CNN results for a fully prepared image."""
      net_input = net_input.transpose((2, 0, 1))
      model.blobs['data'].reshape(1, 3, net_input.shape[1], net_input.shape[2])
      model.blobs['data'].data[0, ...] = net_input[...]
      model.forward()
  
      for outp_name in ['loc_pred', 'prob']:
          out_value = model.blobs[outp_name].data
          if out_value.shape[1] == 14:
              feat_prob = out_value.copy().transpose((2, 3, 0, 1))
              continue
          else:
              out_value = out_value.reshape((14, 2,
                                             out_value.shape[2],
                                             out_value.shape[3]))
              out_value = out_value.transpose((2, 3, 1, 0))
              locreg_pred = out_value
      return feat_prob, locreg_pred
function_tokens: def _cnn_process_image ( model , net_input ) : net_input = net_input . transpose ( ( 2 , 0 , 1 ) ) model . blobs [ 'data' ] . reshape ( 1 , 3 , net_input . shape [ 1 ] , net_input . shape [ 2 ] ) model . blobs [ 'data' ] . data [ 0 , ... ] = net_input [ ... ] model . forward ( ) for outp_name in [ 'loc_pred' , 'prob' ] : out_value = model . blobs [ outp_name ] . data if out_value . shape [ 1 ] == 14 : feat_prob = out_value . copy ( ) . transpose ( ( 2 , 3 , 0 , 1 ) ) continue else : out_value = out_value . reshape ( ( 14 , 2 , out_value . shape [ 2 ] , out_value . shape [ 3 ] ) ) out_value = out_value . transpose ( ( 2 , 3 , 1 , 0 ) ) locreg_pred = out_value return feat_prob , locreg_pred