LArbys / LArCV

Liquid Argon Computer Vision
11 stars 9 forks source link

Discuss Thresholding and Mean Subtraction #24

Closed twongjirad closed 8 years ago

twongjirad commented 8 years ago

The order of these operations seem to matter a lot when passing to the network. We must do exactly what is done at training time.

Also, applying a threshold probably has to be split into two contexts: 1) for changing the contrast in the viewer and 2) applying it to the image data that is going to be passed into caffe.

vgenty commented 8 years ago

for 1) I will let the thresholding for contrast on the viewer be independent of the thresholding done before it goes into the blob so that it's just done for visual effect. OpenCV applied to the image will modify the original image, then thresholded for contrast -- the original image with OpenCV applied (no thresholding for contrast) will be sent to the network. At test time the original image is mean subtracted then thresholded -- I will make this consistent

drinkingkazu commented 8 years ago

I suggest we do not do mean subtraction in the viewer code.

We should use the same operation scheme as what is used during the training. In my case, SimpleFiller process C++ class is responsible for handing information to the datum, and that is where various operations like image mean subtraction is doen. Using the exact same scheme, I can give the exact same network configuration file I used during training to this SimpleFiller class to guarnatee same operation happens.

I think that is more robust way to ensure data is handed over to caffe in the exact same way as during the training. Any class inherit from DatumFillerBase C++ class can be used in the same way.