ISET / isetL3

Linear, Local, Learned
3 stars 6 forks source link

L3 matlab software structure #5

Closed qytian closed 8 years ago

qytian commented 9 years ago

(1) training (2) rendering (3) classification (4) simulation (5) data (6) validation (7) tutorial (8) utility

Training and rendering sections should take any kind of input data, either from simulated or physical camera.

Classification section specifies ways to classify patches that are used in both training and rendering.

Simulation section provides the ISET simulation way to generate the training data.

Accordingly, L3 object has three sub-objects (1) training (2) rendering (3) classification (4) simulation

wandell commented 9 years ago

I thought we should keep your conversation recorded here, in the github repository.

So, I copied the exchange here for the record. We can close this and start more specific discussions in other issues, if you agree.

Got it. Thanks a lot.

Best, HJ On Mon, Jun 8, 2015 at 3:01 AM Qiyuan Tian qytian@stanford.edu wrote: Hi Haomiao

In the l3DataC class there are two properties called sImages and tImages which are sensor and target images.

We can set the sImages as the Nikon raw images and the tImages as the Nikon processed images.

Something like this:

l3D = l3DataC('sImages', XX, ' tImages', YY)

In this case, we can just skip the ISET camera and ISET simulation and start from the given sensor and target images.

Please let know whether this makes sense.

Best QT

Sent from my iPhone

On Jun 8, 2015, at 11:59 AM, Haomiao Jiang hjiang36@gmail.com wrote:

Hi Brian and Qiyuan,

Thanks a lot for the explanation. I got the idea and it sounds a good plan.

The codes looks like serial pipeline, meaning that we need to generate one class before doing another. One thing I'm a little concerned is the flexibility of the structure. For example, if we don't have a camera structure (e.g. only raw and rgb available from Nikon camera), how to build the l3DataC class. I think one possibility is to make these class abstract / virtual and we do our implementation as an inherited subclass. For other people / applications, they can have their inherited subclasses.

I'm not sure what's the priority for the implementation. Let me know what you would like me to implement first. Thanks a lot.

Best Regards, Haomiao Jiang

On Sun, Jun 7, 2015 at 7:59 AM Qiyuan Tian qytian@stanford.edu wrote: Hi Haomiao, Brian,

As I can remember, the code structure is something like this. There are four objects: l3DataC, l3ClassifyC, l3Train and l3Render.

The codes run like this:

l3D = l3DataC(camera, params, ...) l3C = l3Classify(l3D, params) l3T = l3Train(l3C, params) l3R = l3Render(l3T, raw, params)

Please let me know whether this makes sense.

Best QT

----- 原始邮件 ----- 发件人: "Brian Wandell" wandell@stanford.edu 收件人: "Haomiao Jiang" hjiang36@gmail.com 抄送: "Qiyuan Tian" qytian@stanford.edu 发送时间: 星期六, 2015年 6 月 06日 下午 6:58:18 主题: Re: About new code structure for L3

Good question.

This target code is on the board in my office. Unfortunately, I didn’t make a picture or write it down. It is on the white board.

The difference between your code and what is on the board is that we thought to make three objects. An l3Data, l3Train and l3Render, as I recall.

Your code below has one object. I think we can continue to discuss what we want. But the plan on the board was to have 3 different objects.

Brian

On Jun 6, 2015, at 6:53 PM, Haomiao Jiang hjiang36@gmail.com wrote:

Hi Qiyuan,

Hope everything goes well with you in China.

I'm reading your new code structure for L3 but I get a little confused there. Is there a 'target code section' I could refer to? For 'target code section', I mean what the code will be like when the new implementation is done.

To me, a potential target code could be like l3 = L3(sensor, params, ...) l3.set(params, val, ...) % set more values if needed l3.train(data_generator, params, ...) % data generator could be a class that provides raw and desired output l3.render(raw_data, params, ...) % prediction method, use learned model to render new images

Seems like the current code will not work like this. Could you let me know how the new designed code will work?

Thanks a lot.

Best Regards, Haomiao Jiang


Brian A. Wandell Stein Family Professor Cognitive and Neurobiological Imaging (CNI) Psychology Department Phone: 1-650-725-2466 http://www.stanford.edu/~wandell

hjiang36 commented 8 years ago

Code restructuring almost finished. Closing this issue now.