PyTorch implementation of HighRes3DNet
Project description
highresnet
$ NII_FILE=`download_oasis` $ deepgif $NII_FILE
PyTorch implementation of HighRes3DNet from Li et al. 2017, *On the Compactness, Efficiency, and Representation of 3D Convolutional Networks: Brain Parcellation as a Pretext Task*.
All the information about how the weights were ported from NiftyNet can be found in my submission to the MICCAI Educational Challenge 2019.
Usage
Command line interface
(deepgif) $ deepgif t1_mri.nii.gz
Using cache found in /home/fernando/.cache/torch/hub/fepegar_highresnet_master
100%|███████████████████████████████████████████| 36/36 [01:13<00:00, 2.05s/it]
PyTorch Hub
If you are using pytorch>=1.1.0, you can import the model directly from this repository using PyTorch Hub.
>>> import torch
>>> repo = 'fepegar/highresnet'
>>> model_name = 'highres3dnet'
>>> print(torch.hub.help(repo, model_name))
"HighRes3DNet by Li et al. 2017 for T1-MRI brain parcellation"
"pretrained (bool): load parameters from pretrained model"
>>> model = torch.hub.load(repo, model_name, pretrained=True)
>>>
Installation
1. Create a conda environment (recommended)
ENVNAME="gifenv"
conda create -n $ENVNAME python -y
conda activate $ENVNAME
2. Install PyTorch and highresnet
Within the conda environment:
pip install pytorch highresnet
Now you can do
>>> from highresnet import HighRes3DNet
>>> model = HighRes3DNet(in_channels=1, out_channels=160)
>>>
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.7.1 (2019-11-05)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file highresnet-0.10.2.tar.gz
.
File metadata
- Download URL: highresnet-0.10.2.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 938841caf10306e3bf429e6cb174dc8135b3aaff64967d395151ea8058f23565 |
|
MD5 | f058c90b5fc4f7131cf9c9bb9a3fdac1 |
|
BLAKE2b-256 | cdd8f4330e112607a436ff3c0709825f36fb245cbf24ff1b2a81f433810dbcaf |
File details
Details for the file highresnet-0.10.2-py2.py3-none-any.whl
.
File metadata
- Download URL: highresnet-0.10.2-py2.py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 451b1134868c9d648e8c531bf9bf4c0f2274df90834bb52b245255710192e016 |
|
MD5 | 4ed8389bb2055d2f98d521b992ae09b2 |
|
BLAKE2b-256 | 58b61910770261403d95acc22124e358d1ec40fc34d4f235caaab0d73948e564 |