Updated poetry environment, removed checkpoints to models
Browse files- .gitignore +1 -0
- README.md +24 -19
- docker/README.md +24 -0
- new_packages.txt +0 -17
- poetry.lock +0 -0
- pyproject.toml +19 -1
- sfcn-multi.index +0 -0
.gitignore
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
.pytest_cache
|
| 2 |
**/__pycache__/
|
| 3 |
*.egg-info
|
|
|
|
|
|
| 1 |
.pytest_cache
|
| 2 |
**/__pycache__/
|
| 3 |
*.egg-info
|
| 4 |
+
checkpoints
|
README.md
CHANGED
|
@@ -1,24 +1,29 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
|
|
|
| 3 |
|
|
|
|
|
|
|
| 4 |
```
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
```
|
| 10 |
|
| 11 |
-
##
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
--volume <path_to_licenses>:/licenses \
|
| 22 |
-
--gpus all \
|
| 23 |
-
pyment/preprocessing:1.0.0
|
| 24 |
```
|
|
|
|
|
|
| 1 |
+
# Installation
|
| 2 |
+
<details>
|
| 3 |
+
<summary> <b>macOS</b> </summary>
|
| 4 |
|
| 5 |
+
### Install pyenv
|
| 6 |
+
To select the appropriate python version, ```pyenv``` must be installed. On macOS this can be done via brew:
|
| 7 |
```
|
| 8 |
+
brew update
|
| 9 |
+
brew install pyenv
|
| 10 |
+
```
|
| 11 |
+
After installation we can add pyenv to the ```~/.zshrc```-file to enable terminal shortcuts:
|
| 12 |
+
```
|
| 13 |
+
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
|
| 14 |
+
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
|
| 15 |
+
echo 'eval "$(pyenv init - zsh)"' >> ~/.zshrc
|
| 16 |
```
|
| 17 |
|
| 18 |
+
### Install Python
|
| 19 |
+
The models in this repository expects Python version 3.10.4, which can be set up using ```pyenv```:
|
| 20 |
+
```
|
| 21 |
+
pyenv install 3.10.4
|
| 22 |
+
```
|
| 23 |
+
### Configure Python environment
|
| 24 |
+
Next, we can set up a python environment for running the code in the repository:
|
| 25 |
+
```
|
| 26 |
+
poetry env use 3.10.4
|
| 27 |
+
poetry install
|
|
|
|
|
|
|
|
|
|
| 28 |
```
|
| 29 |
+
</details>
|
docker/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Build docker container for preprocessing
|
| 2 |
+
Note that for now, building the container requires a folder called <checkpoints> that contains the FastSurfer segmentation checkpoints
|
| 3 |
+
|
| 4 |
+
```
|
| 5 |
+
docker build \
|
| 6 |
+
-f docker/preprocess.Dockerfile \
|
| 7 |
+
-t pyment/preprocessing:1.0.0 \
|
| 8 |
+
.
|
| 9 |
+
```
|
| 10 |
+
|
| 11 |
+
## Run docker container for preprocessing
|
| 12 |
+
Running the container for preprocessing requires three volumes:
|
| 13 |
+
- Inputs: A folder containing input data. All nifti-files detected in this folder or one of its subfolders will be processed
|
| 14 |
+
- Outputs: A folder where the preprocessed images will be written.
|
| 15 |
+
- Licenses: A folder containing the freesurfer license
|
| 16 |
+
```
|
| 17 |
+
docker run --rm \
|
| 18 |
+
--user $(id -u):$(id -g) \
|
| 19 |
+
--volume <path_to_input>:/input \
|
| 20 |
+
--volume <path_to_ouput>:/output \
|
| 21 |
+
--volume <path_to_licenses>:/licenses \
|
| 22 |
+
--gpus all \
|
| 23 |
+
pyment/preprocessing:1.0.0
|
| 24 |
+
```
|
new_packages.txt
DELETED
|
@@ -1,17 +0,0 @@
|
|
| 1 |
-
tomli==2.2.1
|
| 2 |
-
pandas==1.4.2
|
| 3 |
-
packaging==24.1
|
| 4 |
-
typing-extensions==4.12.2
|
| 5 |
-
wheel==0.43
|
| 6 |
-
decorator==5.1.1
|
| 7 |
-
requests==2.32.3
|
| 8 |
-
nibabel==5.2.1
|
| 9 |
-
jupyter==1.1.1
|
| 10 |
-
matplotlib==3.8
|
| 11 |
-
tqdm==4.66.4
|
| 12 |
-
|
| 13 |
-
plotly==5.24.1
|
| 14 |
-
pytest==8.3.3
|
| 15 |
-
scikit-learn==1.5.1
|
| 16 |
-
xlrd==2.0.1
|
| 17 |
-
pydantic==2.10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
poetry.lock
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pyproject.toml
CHANGED
|
@@ -17,8 +17,26 @@ packages = [{include = "pyment"}]
|
|
| 17 |
|
| 18 |
[tool.poetry.dependencies]
|
| 19 |
python = "3.10.4"
|
| 20 |
-
tensorflow = "2.11
|
|
|
|
|
|
|
| 21 |
numpy = "1.22.3"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
[build-system]
|
| 24 |
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
|
|
|
| 17 |
|
| 18 |
[tool.poetry.dependencies]
|
| 19 |
python = "3.10.4"
|
| 20 |
+
tensorflow-macos = { version = "2.11", markers = "platform_system == 'Darwin'" }
|
| 21 |
+
tensorflow-metal = { version = "0.7", markers = "platform_system == 'Darwin'" }
|
| 22 |
+
tensorflow = { version = "2.11", markers = "platform_system != 'Darwin'" }
|
| 23 |
numpy = "1.22.3"
|
| 24 |
+
tomli = "2.2.1"
|
| 25 |
+
pandas = "1.4.2"
|
| 26 |
+
packaging = "24.1"
|
| 27 |
+
typing-extensions = "4.12.2"
|
| 28 |
+
wheel = "0.43"
|
| 29 |
+
decorator = "5.1.1"
|
| 30 |
+
requests = "2.32.3"
|
| 31 |
+
nibabel = "5.2.1"
|
| 32 |
+
jupyter = "1.1.1"
|
| 33 |
+
matplotlib = "3.8"
|
| 34 |
+
tqdm = "4.66.4"
|
| 35 |
+
plotly = "5.24.1"
|
| 36 |
+
pytest = "8.3.3"
|
| 37 |
+
scikit-learn = "1.5.1"
|
| 38 |
+
xlrd = "2.0.1"
|
| 39 |
+
pydantic = "2.10"
|
| 40 |
|
| 41 |
[build-system]
|
| 42 |
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
sfcn-multi.index
DELETED
|
Binary file (8.49 kB)
|
|
|