Metadata-Version: 2.4
Name: miblab-dl
Version: 0.0.2
Summary: Python API for miblab's trained deep-learning models
Author-email: Steven Sourbron <s.sourbron@sheffield.ac.uk>, Joao Periquito <j.s.periquito@sheffield.ac.uk>
License-Expression: Apache-2.0
Project-URL: Homepage, https://miblab.org/
Project-URL: Source Code, https://github.com/openmiblab/miblab-dl
Keywords: python,medical imaging,MRI,deep learning
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: platformdirs
Requires-Dist: numpy
Requires-Dist: nibabel
Requires-Dist: miblab[data]
Requires-Dist: nnunetv2
Provides-Extra: dev
Requires-Dist: dbdicom; extra == "dev"
Requires-Dist: miblab[data]; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: autopep8; extra == "dev"
Requires-Dist: pycodestyle; extra == "dev"
Dynamic: license-file

# miblab-dl

Python API for miblab's trained deep-learning models

## Installation in a working environment

If you are working in an existing environment with pytorch already installed, 
then all you need is this:

```bash
pip install miblab-dl
```

## Installation from scratch

If you start from scratch, first create a virtual environment, activate it 
and make sure you have the latest pip version. 

On Windows:

```bash
python -m venv myenv
myenv/Scripts/activate
python -m pip install --upgrade pip
```

On Mac or Linux:

```bash
python -m venv myenv
source myenv/bin/activate
python -m pip install --upgrade pip
```

Now install pytorch in your environment:

```bash
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
```

Then install the `miblab-dl` package:

```bash
pip install miblab-dl
```

## Usage

You can import `miblab-dl` functionality in a python script like this:

```python
import miblab_dl as dl
```

Then to compute fat and water maps from numpy arrays representing 
`in_phase` and `opposed_phase` Dixon images:

```python
fat, water = dl.fatwater(opposed_phase, in_phase)
```
