-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a74284e
commit 5bb15d0
Showing
211 changed files
with
6,760 additions
and
6,390 deletions.
There are no files selected for viewing
Binary file added
BIN
+147 KB
_images/47638f102b6ae280b3bf78242334bf5544cbeeda78864d5ba72d5e8aa8d9030c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+357 KB
_images/543df62e8ee0c046852195b03c5991c63d742fc7c4022c3069509bb1a20dd599.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-21.2 KB
_images/71872b3ffe3e5d98f3d8e70ad86d05e4d8fd5a73ee31106af15ba541b090614f.png
Binary file not shown.
Binary file removed
BIN
-150 KB
_images/7c52791c7bc3615d698d13814e1966f676060b18352dafff71173aed6a834783.png
Binary file not shown.
Binary file added
BIN
+30.6 KB
_images/861cf92042db801d4447df36db45bb7b2c06c0dc7e6752090fa59dd6078fccd0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+21.6 KB
_images/a2617a0b50e674893d8d0dc94875b031801dc021d21bbeb63a687c2ae205b309.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-404 KB
_images/a837867f32382a992395cb369fd100a66eeacfde950f7cca84555618bc52305f.png
Binary file not shown.
Binary file removed
BIN
-31.3 KB
_images/d265d1deeb6083a9495d2b6183083bf78cc62239387a01aea233d71458629e09.png
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
|
||
Fine-Tune Cosem Starter | ||
============================ | ||
|
||
The CosemStarter in DaCapo allows you to load a pretrained COSEM model and fine-tune it for your experiments. This guide explains how to set up and use CosemStarter in DaCapo. | ||
|
||
Prerequisites | ||
------------- | ||
|
||
Ensure that you have DaCapo installed and configured correctly. | ||
|
||
Step 1: Import the CosemStartConfig | ||
----------------------------------- | ||
|
||
To get started, you need to import `CosemStartConfig` from `dacapo.experiments.starts`. | ||
|
||
.. code-block:: python | ||
from dacapo.experiments.starts import CosemStartConfig | ||
Step 2: Configure the Start Model | ||
--------------------------------- | ||
|
||
The `CosemStartConfig` takes two parameters: | ||
|
||
- **model_name**: The name of the model setup to load. | ||
- **checkpoint**: The specific checkpoint ID to load the pretrained model from. | ||
|
||
Example: | ||
|
||
.. code-block:: python | ||
# We will now download a pretrained COSEM model and fine-tune from that model. | ||
# It will only download the model the first time it is used. | ||
start_config = CosemStartConfig("setup04", "1820500") | ||
This configuration will download the COSEM model from setup `setup04` and load the checkpoint `1820500`. You only need to download the model once; subsequent runs will use the downloaded model. | ||
|
||
Step 3: Create a Run with `start_config` | ||
---------------------------------------- | ||
|
||
To start from the pretrained model, add `start_config` to your `RunConfig`. The `RunConfig` initializes the run and allows fine-tuning from the pretrained COSEM model. | ||
|
||
Example: | ||
|
||
.. code-block:: python | ||
from dacapo.experiments.runs import RunConfig | ||
run_config = RunConfig( | ||
# other parameters... | ||
start_config=start_config, | ||
) | ||
Full Example | ||
------------ | ||
|
||
Here’s how the complete setup looks: | ||
|
||
.. code-block:: python | ||
from dacapo.experiments.starts import CosemStartConfig | ||
from dacapo.experiments.runs import RunConfig | ||
# Define the start configuration to load the pretrained COSEM model | ||
start_config = CosemStartConfig("setup04", "1820500") | ||
# Define the run configuration with the start configuration | ||
run_config = RunConfig( | ||
# other configurations, | ||
start_config=start_config, | ||
) | ||
# Now you can run this configuration in your experiment to start from the COSEM pretrained model | ||
This setup will initiate your DaCapo run from the pretrained COSEM model and allow you to fine-tune it as needed. | ||
|
||
Available COSEM Pretrained Models | ||
--------------------------------- | ||
|
||
Below is a table of the COSEM pretrained models available, along with their details: | ||
|
||
+-----------+----------------------------+-----------------+--------------------------------------------------------------+-----------+------------+-----------------+ | ||
| Model | Checkpoints | Best Checkpoint| Classes | Input Res | Output Res | Model | | ||
+===========+============================+=================+==============================================================+===========+============+=================+ | ||
| setup04 | 975000, 625000, 1820500 | 1820500 | ecs, pm, mito, mito_mem, ves, ves_mem, endo, endo_mem, er, er_mem, eres, nuc, mt, mt_out | 8 nm | 4 nm | Upsample U-Net | | ||
+-----------+----------------------------+-----------------+--------------------------------------------------------------+-----------+------------+-----------------+ | ||
| setup26.1 | 650000, 2580000 | 2580000 | mito, mito_mem, mito_ribo | 8 nm | 4 nm | Upsample U-Net | | ||
+-----------+----------------------------+-----------------+--------------------------------------------------------------+-----------+------------+-----------------+ | ||
| setup28 | 775000 | 775000 | er, er_mem | 8 nm | 4 nm | Upsample U-Net | | ||
+-----------+----------------------------+-----------------+--------------------------------------------------------------+-----------+------------+-----------------+ | ||
| setup36 | 500000, 1100000 | 1100000 | nuc, nucleo | 8 nm | 4 nm | Upsample U-Net | | ||
+-----------+----------------------------+-----------------+--------------------------------------------------------------+-----------+------------+-----------------+ | ||
| setup45 | 625000, 1634500 | 1634500 | ecs, pm | 4 nm | 4 nm | U-Net | | ||
+-----------+----------------------------+-----------------+--------------------------------------------------------------+-----------+------------+-----------------+ | ||
|
||
Notes | ||
----- | ||
|
||
- The model will download only the first time you use it. After that, it will reuse the downloaded version. | ||
- Ensure that you have the necessary storage and access permissions configured for the COSEM model files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
tutorial | ||
docker | ||
aws | ||
cosem_starter | ||
autoapi/index | ||
cli | ||
|
||
|
Oops, something went wrong.