-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from flatironinstitute/zernike_distance
Implementation of external Zernike3D distance
- Loading branch information
Showing
10 changed files
with
183 additions
and
3 deletions.
There are no files selected for viewing
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,50 @@ | ||
<h1 align='center'>How to setup Zernike3D distance?</h1> | ||
|
||
<p align="center"> | ||
|
||
<img alt="Supported Python versions" src="https://img.shields.io/badge/Supported_Python_Versions-3.8_%7C_3.9_%7C_3.10_%7C_3.11_%7C_3.12-blue"> | ||
<img alt="GitHub Downloads (all assets, all releases)" src="https://img.shields.io/github/downloads/I2PC/Flexutils-Toolkit/total"> | ||
<img alt="GitHub License" src="https://img.shields.io/github/license/I2PC/Flexutils-Toolkit"> | ||
|
||
</p> | ||
|
||
<p align="center"> | ||
|
||
<img alt="Flexutils" src="https://github.com/scipion-em/scipion-em-flexutils/raw/devel/flexutils/icon.png" width="200" height="200"> | ||
|
||
</p> | ||
|
||
|
||
|
||
Zernike3D distance relies on the external software **[Flexutils](https://github.com/I2PC/Flexutils-Toolkit)**. The following document includes the installation guide to setup this software in your machine, as well as some guidelines on the parameters and characteristics of the Zernike3D distance. | ||
|
||
# Flexutils installation | ||
**Flexutils** can be installed in your system with the following commands: | ||
|
||
```bash | ||
git clone https://github.com/I2PC/Flexutils-Toolkit.git | ||
cd Flexutils-Toolkit | ||
bash install.sh | ||
``` | ||
|
||
Any errors raised during the installation of the software or the computation of the Zernike3D distance can be reported through Flexutils GitHub issue [webpage](https://github.com/I2PC/Flexutils-Toolkit/issues). | ||
|
||
# Defining the config file parameters | ||
Zernike3D distance relies on the approximation of a deformation field between two volumes to measure their similarity metric. A detailed explanation on the theory behind the computation of these deformation fields is provided in the following publications: [Zernike3D-IUCRJ](https://journals.iucr.org/m/issues/2021/06/00/eh5012/) and [Zernike3D-NatComm](https://www.nature.com/articles/s41467-023-35791-y). | ||
|
||
The software follows a neural network approximation, so the usage of a GPU is strongly recommended. | ||
|
||
The Zernike3D distance requires a set of additional execution parameters that need to be supplied through the `config_map_to_map.yaml` file passed to the distance compution step. These additional parameters are presented below: | ||
|
||
- **gpuID**: An integer larger than 0 determining the GPU to be used to train the Zernike3Deep neural network. | ||
- **tmpDir**: A path to a folder needed to store the intermediate files generated by the software. This folder is **NOT** emptied once the execution finishes. | ||
- **thr**: An integer larger than 0 determining the number of processes to use during the execution of the software. | ||
|
||
```yaml | ||
metrics: | ||
- zernike3d | ||
zernike3d_extra_params: | ||
gpuID: 0 | ||
tmpDir: where/to/save/intermediate/files/folder | ||
thr: 20 | ||
``` |
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
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
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
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
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,31 @@ | ||
data: | ||
n_pix: 16 | ||
psize: 30.044 | ||
submission: | ||
fname: tests/data/dataset_2_submissions/submission_1000.pt | ||
volume_key: volumes | ||
metadata_key: populations | ||
label_key: id | ||
ground_truth: | ||
volumes: tests/data/Ground_truth/test_maps_gt_flat_10.pt | ||
metadata: tests/data/Ground_truth/test_metadata_10.csv | ||
mask: | ||
do: false | ||
volume: tests/data/Ground_truth/test_mask_bool.mrc | ||
analysis: | ||
zernike3d_extra_params: | ||
gpuID: 0 | ||
tmpDir: tmp_zernike | ||
thr: 20 | ||
numProjections: 20 # projecions should be 20-100 | ||
metrics: | ||
- zernike3d | ||
chunk_size_submission: 4 | ||
chunk_size_gt: 5 | ||
low_memory: | ||
do: false | ||
chunk_size_low_memory: null | ||
normalize: | ||
do: true | ||
method: median_zscore | ||
output: tests/results/test_map_to_map_distance_matrix_submission_0.pkl |
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
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
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