Skip to content

Commit

Permalink
Finished code review
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Sep 20, 2024
1 parent e916d7f commit 757edd9
Show file tree
Hide file tree
Showing 8 changed files with 507 additions and 42 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
nnunet_results/Dataset903_Task903_DLMUSEV2/nnUNetTrainer__nnUNetPlans__3d_fullres/crossval_results_folds_0/summary.json filter=lfs diff=lfs merge=lfs -text
40 changes: 40 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Upload Python Package

on: workflow_dispatch

permissions:
contents: read
id-token: write # Allow GitHub to mint tokens

jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest # Can use macos-latest if needed

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"

- name: Install dependencies
run: |
pip install setuptools
pip install twine
pip install wheel
sudo apt-get install jq
- name: Clean previous builds
run: rm -rf dist

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Publish package to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
31 changes: 2 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,13 @@ cd DLMUSE
pip install -e .
```

### Using docker(OUTDATED)

```bash
docker pull aidinisg/dlmuse:0.0.1
```

## Usage

A pre-trained nnUNet model can be found in the [DLMUSEV2-1.0.0 release](https://github.com/CBICA/DLMUSE/releases/tag/v1.0.0). Feel free to use it under the package's [license](LICENSE).
A pre-trained nnUNet model can be found at our [hugging face account](https://huggingface.co/nichart/DLMUSE/tree/main) or at the [DLMUSEV2-1.0.0 release](https://github.com/CBICA/DLMUSE/releases/tag/v1.0.0). Feel free to use it under the package's [license](LICENSE).

### From command line
```bash
DLMUSE -i "image_folder" -o "path to output folder" -m "path to model weights" -f 0 -tr nnUNetTrainer -c 3d_fullres -p nnUNetPlans -d "id" -device cuda/cpu/mps
```

### Using the docker container(OUTDATED)

In the [docker container](https://hub.docker.com/repository/docker/aidinisg/dlmuse/general), the default model is included, but you can also provide your own.

Without providing a model:

```bash
docker run --gpus all -it --rm -v /path/to/local/input:/workspace/input \
-v /path/to/local/output:/workspace/output \
aidinisg/dlmuse:0.0.1 -i input/ -o output/
```

Providing a model:

```bash
docker run --gpus all -it --rm -v /path/to/local/model:/workspace/model \
-v /path/to/local/input:/workspace/input \
-v /path/to/local/output:/workspace/output \
aidinisg/dlmuse:0.0.1 -i input/ -o output/ --model model/
DLMUSE -i "image_folder" -o "path to output folder" -device cuda/mps/cpu
```

## Contact
Expand Down
11 changes: 11 additions & 0 deletions nnunet_output/dataset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"channel_names": {
"0": "MRI"
},
"file_ending": ".nii.gz",
"labels": {
"background": 0,
"class1": 1
},
"numTraining": 1806
}
Loading

0 comments on commit 757edd9

Please sign in to comment.