Skip to content

Example workflow - #45

Merged
ziw-liu merged 1 commit into
mainfrom
usage-guide
Sep 25, 2023
Merged

ziw-liu merged 1 commit into
mainfrom
usage-guide

Conversation

@ziw-liu

@ziw-liu ziw-liu commented Aug 31, 2023

Copy link
Copy Markdown
Contributor

Adds a short description of the virtual staining workflow in its current state.

@ziw-liu ziw-liu added the documentation Improvements or additions to documentation label Aug 31, 2023

@mattersoflight mattersoflight left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mattersoflight

Copy link
Copy Markdown
Collaborator

This addresses #43.

@mattersoflight mattersoflight linked an issue Aug 31, 2023 that may be closed by this pull request
Comment thread examples/configs/test_example.yml Resolved
Comment thread examples/configs/test_example.yml Resolved
@edyoshikun

Copy link
Copy Markdown
Collaborator

LGTM! Thanks @ziw-liu

@edyoshikun

Copy link
Copy Markdown
Collaborator

Maybe this is for a separate issue, but I had also trouble running the metrics/test command. I think this was just a lack of time on my side during the course to fully explore pytorch lightning framework. I think that if we run it together @ziw-liu this comment can be solved and we can add further documentation as separate PR.

@Soorya19Pradeep

Copy link
Copy Markdown
Contributor

Thank for putting together this example @ziw-liu! It was very easy to navigate and documentation was great!
I was able to navigate through the solution and train a 2D HEK nucleus-membrane prediction model using uninfected cells in the TICM0036 dataset acquired on Dragonfly microscope. I was able to test the model by performing prediction on OC43-infected HEK cells at 48hpi.

I did make changes on the line:
https://github.com/mehta-lab/VisCy/blob/c13176d8d9b21cfc3a9b2ead913f748bc0dd775d/examples/demo_dlmbl/solution.py#L396

I changed this based on @ziw-liu 's suggestion.

phase2fluor_config = {
    "num_filters": [24, 48, 96, 192, 384],
    "in_channels": 1,
    "out_channels": 2,
    "residual": True,
    "dropout": 0.1,  # dropout randomly turns off weights to avoid overfitting of the model to data.
    "task": "reg",  # reg = regression task.
}

phase2fluor_model = VSUNet(
    architecture="2D",
    model_config=phase2fluor_config.copy(),
    loss_function=torch.nn.functional.l1_loss,
    schedule="WarmupCosine",
    log_num_samples=5,  # Number of samples from each batch to log to tensorboard.
    example_input_yx_shape=YX_PATCH_SIZE,
)

@ziw-liu
ziw-liu merged commit 4b16dfb into main Sep 25, 2023
@ziw-liu
ziw-liu deleted the usage-guide branch September 25, 2023 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify how to use different stages of VisCy

4 participants