Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating demo notebook for training #100

Merged
merged 43 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d3309f5
first pass on VSCyto2D demo
edyoshikun Jun 20, 2024
6a10640
updating notebooks
edyoshikun Jun 20, 2024
21205c4
Merge branch 'main' into update_dlmbl
edyoshikun Jul 3, 2024
454e5fa
draft modifications updating 2DUnet to UNeXT2
edyoshikun Jul 4, 2024
c071364
editing solution
edyoshikun Jul 5, 2024
3ea1df6
modifying to relative paths based on setup.sh download paths.
edyoshikun Jul 6, 2024
a74662c
small edits
mattersoflight Jul 8, 2024
0aa51bc
fixing video and adding todo comment for students to switch the top_dir.
edyoshikun Jul 8, 2024
add21bf
updating the readme and setup.sh
edyoshikun Jul 8, 2024
0b36a85
addressing some typos
edyoshikun Jul 8, 2024
496578d
html to md (#106)
ziw-liu Jul 9, 2024
5189378
typographical
mattersoflight Jul 9, 2024
091e9d2
nits
mattersoflight Jul 9, 2024
7f0e8af
-adding alias for UNeXt2_2D
edyoshikun Jul 11, 2024
e6aacc7
ruff and black
edyoshikun Jul 11, 2024
cda31bb
edit tensorboard instructions
mattersoflight Jul 16, 2024
8c19221
clean up the order for Part 2: fluor2phase, training call follows mod…
mattersoflight Jul 16, 2024
6db7aab
restructured fluor2phase sections
mattersoflight Jul 17, 2024
293ad17
Text edits
ziw-liu Jul 17, 2024
c067d53
markdown and html fixes
ziw-liu Jul 17, 2024
1920ffc
merge import blocks
ziw-liu Jul 17, 2024
db68932
add line break
ziw-liu Jul 17, 2024
2384767
tweak typesetting
ziw-liu Jul 17, 2024
ed6c21d
use the actual pi
ziw-liu Jul 17, 2024
15199f4
rotate 'around'
ziw-liu Jul 17, 2024
3fb5c21
addaptive figure size
ziw-liu Jul 17, 2024
9cc5933
remove division
ziw-liu Jul 17, 2024
46222a3
FOVs -> samples
ziw-liu Jul 17, 2024
8e86fa3
line breaks
ziw-liu Jul 17, 2024
b6646f5
remove duplicate function and more line breaks
ziw-liu Jul 17, 2024
7417277
send data to device
ziw-liu Jul 17, 2024
33caa87
fix multisamping in example data for graphing
ziw-liu Jul 17, 2024
818965e
fix definition location
ziw-liu Jul 17, 2024
0a387f2
fix device and markdown block
ziw-liu Jul 17, 2024
97937e9
reordering variable that prevented fluor2phase not to run if previous…
edyoshikun Jul 17, 2024
1efa433
fixing vscode and juypter readability
edyoshikun Jul 18, 2024
9e317df
remove old debug script
ziw-liu Jul 18, 2024
e18ae17
fix syntax
ziw-liu Jul 18, 2024
5db9c62
fix hyperlink
ziw-liu Jul 18, 2024
16acdf2
fix batch size story
ziw-liu Jul 18, 2024
1500366
remove emojis
ziw-liu Jul 18, 2024
3826087
making 3D_UNeXt2 example work
edyoshikun Jul 19, 2024
f6080c8
pointing to config files from 0.1.0 release
edyoshikun Jul 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions examples/demo_dlmbl/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Exercise 4: Image translation
# Exercise 6: Image translation - Part 1

This demo script was developed for the DL@MBL 2023 course by Ziwen Liu and Shalin Mehta, with many inputs and bugfixes by [Morgan Schwartz](https://github.com/msschwartz21), [Caroline Malin-Mayor](https://github.com/cmalinmayor), and [Peter Park](https://github.com/peterhpark).
This demo script was developed for the DL@MBL 2024 course by Eduardo Hirata-Miyasaki, Ziwen Liu and Shalin Mehta, with many inputs and bugfixes by [Morgan Schwartz](https://github.com/msschwartz21), [Caroline Malin-Mayor](https://github.com/cmalinmayor), and [Peter Park](https://github.com/peterhpark).

edyoshikun marked this conversation as resolved.
Show resolved Hide resolved


Expand All @@ -9,10 +9,10 @@ This demo script was developed for the DL@MBL 2023 course by Ziwen Liu and Shali

Make sure that you are inside of the `image_translation` folder by using the `cd` command to change directories if needed.

Make sure that you can use mamba to switch environments.
Make sure that you can use conda to switch environments.

```bash
mamba init
conda init
```

**Close your shell, and login again.**
Expand All @@ -23,7 +23,7 @@ sh setup.sh
```
Activate your environment
```bash
mamba activate 04_image_translation
conda activate 06_image_translation
```

## Use vscode
Expand All @@ -42,7 +42,8 @@ jupyter notebook

...and continue with the instructions in the notebook.

If 04_image_translation is not available as a kernel in jupyter, run
If `06_image_translation` is not available as a kernel in jupyter, run:

```
python -m ipykernel install --user --name=04_image_translation
python -m ipykernel install --user --name=06_image_translation
```
33 changes: 19 additions & 14 deletions examples/demo_dlmbl/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,36 @@

START_DIR=$(pwd)

# Create mamba environment
mamba create -y --name 04_image_translation python=3.10
# Create conda environment
conda create -y --name 06_image_translation python=3.10

# Install ipykernel in the environment.
mamba install -y ipykernel nbformat nbconvert black jupytext ipywidgets --name 04_image_translation
conda install -y ipykernel nbformat nbconvert black jupytext ipywidgets --name 06_image_translation
# Specifying the environment explicitly.
# mamba activate sometimes doesn't work from within shell scripts.
# conda activate sometimes doesn't work from within shell scripts.

# install viscy and its dependencies`s in the environment using pip.
mkdir -p ~/code/
cd ~/code/
git clone https://github.com/mehta-lab/viscy.git
cd viscy
git checkout 7c5e4c1d68e70163cf514d22c475da8ea7dc3a88 # Exercise is tested with this commit of viscy
# Find path to the environment - mamba activate doesn't work from within shell scripts.
ENV_PATH=$(conda info --envs | grep 04_image_translation | awk '{print $NF}')
git checkout main #FIXME: change after merging this PR # Exercise is tested with this commit of viscy

# Find path to the environment - conda activate doesn't work from within shell scripts.
ENV_PATH=$(conda info --envs | grep 06_image_translation | awk '{print $NF}')
$ENV_PATH/bin/pip install ".[metrics]"

# Create data directory
mkdir -p ~/data/04_image_translation
cd ~/data/04_image_translation
wget https://dl-at-mbl-2023-data.s3.us-east-2.amazonaws.com/DLMBL2023_image_translation_data_pyramid.tar.gz
wget https://dl-at-mbl-2023-data.s3.us-east-2.amazonaws.com/DLMBL2023_image_translation_test.tar.gz
tar -xzf DLMBL2023_image_translation_data_pyramid.tar.gz
tar -xzf DLMBL2023_image_translation_test.tar.gz
# Create the directory structure
mkdir -p ~/data/06_image_translation/training
mkdir -p ~/data/06_image_translation/test

# Change to the target directory
cd ~/data/06_image_translation/training

# Download the OME-Zarr dataset recursively
wget -m -np -nH --cut-dirs=4 -R "index.html*" "https://public.czbiohub.org/comp.micro/viscy/VSCyto2D/training/a549_hoechst_cellmask_train_val.zarr/"
cd ~/data/06_image_translation/test
wget -m -np -nH --cut-dirs=4 -R "index.html*" "https://public.czbiohub.org/comp.micro/viscy/VSCyto2D/test/a549_hoechst_cellmask_test.zarr/"

# Change back to the starting directory
cd $START_DIR
Loading
Loading