nsf-ri-ubicv / sthor

STHOR (S{ekyfsr,imple,patio} Temporal Hierarchical Object Representation"
Other
3 stars 1 forks source link

WIP: SLM extension #9

Closed poilvert closed 12 years ago

poilvert commented 12 years ago

I want to add the following features:

  1. Support for computing feature vectors for all pixels in the original image
  2. Support for pad_apron options when computing features

So far I just added some (I believe) useful class methods to compute:

  1. the number of layers in the SLM
  2. the neighborhood and stride parameters of all the operations in the SLM (in order)
  3. the shape of the receptive field of the SLM (e.g. for L3 first, the receptive field is (121, 121))

A typical use case I would like, is very much similar to the way we instantiate an SLM so far. The only difference should be when one calls the process method to compute the feature map. I forsee two keywords that we could add :

>>> slm = SequentialLayeredModel(in_shape, desc)
>>> feature_map = slm.process(img, pad_apron=False, interleave_stride=False)

if pad_apron is False, then it means that we compute the feature map "the usual way". if pad_apron is True, then we want the feature map to have the first two dimensions equal to the shape of the input image.

if interleave_stride is False, then we compute the feature as usual. But if it is True, we want to compute a feature vector for every pixel in the original image in the valid domain.

poilvert commented 12 years ago

@npinto, @davidcox

Dear all, here are a couple more tests for my latest addition to the SLM model class.

  1. support for computing feature vectors for all pixels in the original image
  2. support for mode "same" (i.e. no aprons in the resulting feature map)
npinto commented 12 years ago

Looks good to me, merging now.