0

The requirement is that the python script be more illustrative than performant.

  1. Keep it simple (no multiprocessing, that can be a separate step)
  2. It should take-in images and corresponding labels in batches of 50.
  3. It should apply the transformer (resize, transpose, mean, raw-scale, channel swap) to each image in the setup step.
  4. The rest of the network can be a caffe bvlc reference network or Alex net. It could be something simpler if it can better demonstrate that the network in working fine, end-to-end.
  5. In effect, the python layer should work as if the images and labels are being provided by type: "ImageData" (which takes in a text file with image path and label)
  6. As a simplification, no validation code is required.

From the unit-test provided here, my thought is that the setup, forward, and possibly reshape code needs to be "filled" in (no backward code needed). My assumption is that the forward will process images in batches of 50 with a get_next_batch function.

auro
  • 1,079
  • 1
  • 10
  • 22

1 Answers1

0

Turns out, this is already available!

https://github.com/BVLC/caffe/blob/master/examples/pascal-multilabel-with-datalayer.ipynb

with the pyhton input layer code here,

https://github.com/BVLC/caffe/blob/master/examples/pycaffe/layers/pascal_multilabel_datalayers.py

Sorry to cause consternation about why this was asked (I got dinged for asking).

The question is legit. Just needed to look harder.

Could help someone later.

auro
  • 1,079
  • 1
  • 10
  • 22