Skip to content

How to prepare an image for the MATLAB wrapper #198

Description

@AlexBinder

Hi,

I want to do a forward for an image for a pretrained network in C++ (as a first step for some research on checking the conservation of certain physically motivated quantities within a neural net).
I have checked the matlab and python wrappers.
I understand that the input is a float array with width-major addressing in the type of
arr[channel_index * imageheight * imagewidth + height_index * imagewidth + width_index ](correct me if I am wrong)

My questions are:

  1. what image value scaling is required for the input array for the model models/caffe_reference_imagenet_model ?
    [0,1] or [0 255] (data_layer.cpp contains an uint8 conversion ... thats a hint for 255) or ??

  2. does the data set mean get substracted internally during a forward for testing phase
    or do I have to substract it myself for testing phase (I dont care about training phase here)?

  3. I see the mean gets substracted in the data_layer class,
    models/imagenet.prototxt does initialize a data_layer ?
    Even if it is initialized it looks like the mean from the data layer will not be used in the matlab wrapper for substraction, right or wrong?

Best, Alex

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions