Commit e00448b
Implementation of Beta VAE for benchmarking (#273)
* simualte different embeddings
* update the msd calculation to re-use cdist functions in the repo
* adding a test for the msd
* removing unused msd functions
* renaming msd to compute_track_displacement
* default to cosine distance
* adding the gradient attribution video.
* extend to training ratios
* demo beta_vae 2.5D
* improving the logging for readability and drop pythae baseclasses
* condense the logging to have less tabs.
* fix disentagle metrics
* fixing beta warmup bug
* renaming to loss
* updating architecture to flatten vs spatial VAE with convs
* chaning to use mse with mean reduction and normalizing the kl loss by batch size.
* optunea proof of concept
* add normalized sampled into the transforms so we can use it with MONAIs vae
* update loss debugging code
* adding sync for disentaglement metrics
* adding the dataloader for rpe1 dataset and plotting utils
* cleanup the vae and add the monai to lightning. adding configs
* add saving hyperparameters
* fix hyperparameter logging
* add embedding logging to the CLIP version
* test and plot of monaivae
* handle monai_vae 2d
* redifining rotation agumentsations
* adding optional scaling to phate
* adding alias and output 2d
* normalizing by also the latent dim and swapping to FP32 for forward pass to avoid overflow with log and exp
* update test for magnitudes
* expose the normalization for vae
* add sam 2 test
* refactor smoothness metrics
* rever to normalalize kl wrt to batch size and removing the the beta min value
* commit dtwembeddings w sam
* added a clamp to logvar, switch to mse loss sum reduction like the original formulation.
* remove unecessary vae logging losses.
* add a way to handle when using 'mean' reduction for proper scaling
* adding optional config for middle slice index for computing sam2 embeddings and dinov3
* converting latent stats active_dimensions parameter to float to remove warning
* ruff
* removing the optuna config
* numpy docstring
* fix compute smoothness script
* archiving old scripts
* re org the pc features scripts
* embeddings for phase
* add smoothness (mean rand vs adj frame) to the csv
* archiving old beta vae code
* ruff
* fix format
* fix typo
* remove the archived unecessary files
* remove the test run archived file
* adding normalizeintensity
* fixing the vae_logging typing and removing PC plotting from here
* fixing the compute_embedding_smoothness docstring
* simplify the distance metrics and removing deprecated functions and scripts
* remove deprecated functions from clustering.py
* add timelpase to grad_attr.py script
* refactoring the betavaemodule. removing the hyperparamter logging, adding the nn.Module as input for typing purposes and removing the fp32 custom fwd
* remove the optuna dependency
* deleting old msd test
* ruff format
* fix to explicitly stratify on fov level
* adding reference to dataset for rpe1
* fix pyproject.toml dev
* format and lint
* restore no-augmentation flag effect
* format tests
* rename the sam2 file
* removing unused arguments for logging embeddings.
* removing duplication in the lca
* remove disentaglement metrics
* vectorized the anchor filtering for celldivisiontriplet dataset
* map the channels to the rpe dataset convention
* fix logistic regresion standardization
* update rpe classifier to include mitosis
* ruff
* remove unused logging
* datamodule agnostic
* cleaning up duplicated code in the benchmarking
* cleanup vae
* keeping it consistent and using residual units
* fix typings betavaemonai
* update smoothness to handle adata
* update clustering method and add test
* pre-commit
* Update viscy/data/cell_division_triplet.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update applications/benchmarking/DynaCLR/SAM2/sam2_visualizations.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update applications/pseudotime_analysis/evaluation/compare_dtw_embeddings_sam2.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update applications/pseudotime_analysis/evaluation/compare_dtw_embeddings_sam2.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update applications/contrastive_phenotyping/evaluation/smoothness/compute_smoothness.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update applications/pseudotime_analysis/evaluation/compare_dtw_embeddings_sam2.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update applications/contrastive_phenotyping/evaluation/smoothness/compute_smoothness.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update applications/contrastive_phenotyping/evaluation/archive/ALFI_MSD_v2.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* valuerror on the fidn peaks function
* add literal to the betavae25d normalization
* clipping similarity that was breaking the tests
---------
Co-authored-by: Ziwen Liu <67518483+ziw-liu@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent b56dc9f commit e00448b
File tree
42 files changed
+4668
-904
lines changed- applications
- benchmarking/DynaCLR
- DINOV3
- OpenPhenom
- SAM2
- contrastive_phenotyping
- evaluation
- archive
- imagenet
- knowledge_distillation
- pc_vs_computed_features
- rpe1_fucci
- smoothness
- figures
- pseudotime_analysis/evaluation
- tests/representation/evaluation
- viscy
- data
- representation
- evaluation
- transforms
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
42 files changed
+4668
-904
lines changedLines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
Lines changed: 170 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| |||
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| 17 | + | |
19 | 18 | | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
0 commit comments