Caffe: variable input image size

I am trying to use the deep word code that Caffe uses. They use the GoogLeNet model, pre-prepared on ImageNet, as envisioned by ModelZoo. This means that the network has been trained in images cropped to 224x224 pixels. From train_val.prototext :

layer {            
  name: "data"     
  type: "Data"     
  ...

  transform_param {
     mirror: true   
     crop_size: 224
  ... 

deploy.prototext , used for processing, also defines an input level of size 224x224x3x10 (RGB images of size 224x224, batchsize 10).

name: "GoogleNet"
input: "data"
input_shape {
  dim: 10
  dim: 3
  dim: 224
  dim: 224
}

However, I can use this network to process images of any size (the example above used one of 1024x574 pixels).

, , ?


+4
1

DeepDream .
, , : end= 'inception_4c/output' end='inception_3b/5x5_reduce', end='loss3/classifier'. , GoogLeNet , , ( conv padding pooling).

, deepdream

src.reshape(1,3,h,w) # resize the network input image size

(1,3,h,w).

+4

Source: https://habr.com/ru/post/1623583/


All Articles