PolarizedLightFieldMicroscopy / napari-LF

Light field imaging plugin for napari
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

New page for Neural Net processes #24

Closed gschlafly closed 1 year ago

gschlafly commented 1 year ago

How enhancement relates to a problem

Having the Neural Net (LFMNet) content and the LF Analyze content viewable simultaneously adds clutter to the screen.

Preferred solution

Extract the Neural Net (LFMNet) content onto its own "page".

Neural Net content (listed in order to appear)

  1. some words related to the training process and a relevant link containing more information
  2. Light field image: field to select the raw/rectified light field image
  3. Model: field to select training model file
  4. Output image stack: field to type in the filename desired for the output image
  5. Network model inspector: field area that displays content inside the model file selected

Alternative solutions considered

The Neural Net page could be its own "subwidget" instead of "page" within the same widget display.

Additional context

The rectification process is being included in the process that occurs when the model is applied to the image (#21).

gschlafly commented 1 year ago

I still think would be helpful to make the LF Analyze and Neural Net zones separate widgets within our napari-LF plugin. This is the napari built-in method for doing what we are trying to achieve. It is similar to the one button toggle that @rudolfoldenbourg suggested, because it leaves room for additional methods to be added to napari-LF. Below is a screen recording showing two of these widgets within a single plugin (napari-pyclesperanto-assistant) being open and moved around. Widgets can also be moved outside the napari viewer to a different place on your display screen.

https://user-images.githubusercontent.com/23206511/215179079-20b1ce76-17c7-448c-a8c4-3237bd13aaec.mp4

rudolfoldenbourg commented 1 year ago

Thanks, Geneva, for illustrating this option. As an alternative, here are two mockups that show how a single button might work a) to switch between two processing modes and b) give a heading to the panels below the button. What is above the button, applies to both modes, what is below is specific to each mode: WidgetLayoutLFA WidgetLayoutNN

In the Neural Net panel, the first tab Files can be used to setup the deconvolution, the second tab Training can include some narrative about training an NN using a Jupyter notebook, which will be available in the lfa directory of the distribution. A button in that tab might switch to the Jupyter notebook in question (e.g. main_train_neural_net.ipynb).

gschlafly commented 1 year ago

I like it! @rudolfoldenbourg

amitabhverma commented 1 year ago

@rudolfoldenbourg @gschlafly I'd like to suggest if we are thinking more in line of cycling through the choices does something like below make more sense.. this would make the task of setting the image easy since it does not need to be an image with button feel.

image

@gschlafly wrt your suggestion of independent widgets, I don't believe the one in the example share any sort of settings between them, like setting the data directory, etc. So in our case we'd have the divide into 3 widget sections.

gschlafly commented 1 year ago

I see–I was hoping that widgets within the same plugin could share some sort of settings. I like your solution for making the cycling through choices more intuitive! @amitabhverma

amitabhverma commented 1 year ago

@gschlafly @rudolfoldenbourg I've implemented the following with the latest /NN branch. The tabs on the side seem to save the vertical real-estate. Also, went for the single clickable cycling button for now.. maybe we can have that in a new WIP issue.

image

rudolfoldenbourg commented 1 year ago

@gschlafly @amitabhverma Excellent, I like the vertical tabs on the left that are common to both processing modes. For the buttons Calibrate, Rectify, Deconvolve for LFAnalyze processing, and Deconvolve for Neural Net processing, I suggest to include them and the Stop button in the tab "Parameters" and call that tab "Processing".

amitabhverma commented 1 year ago

@gschlafly @amitabhverma Excellent, I like the vertical tabs on the left that are common to both processing modes. For the buttons Calibrate, Rectify, Deconvolve for LFAnalyze processing, and Deconvolve for Neural Net processing, I suggest to include them and the Stop button in the tab "Parameters" and call that tab "Processing".

Implemented in latest /NN branch (https://github.com/PolarizedLightFieldMicroscopy/napari-LF/commit/6fecb290d34c9aed2409b350eea99d619be5d356)

image