Metadata-Version: 2.1
Name: mindfultensors
Version: 0.0.10
Summary: Dataloader that serves MRI images from a mogodb
Home-page: http://pypi.python.org/pypi/mindfultensors/
Author: Sergey Plis
Author-email: s.m.plis@gmail.com
License: MIT
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy>=1.7
Requires-Dist: pymongo>=4.0
Requires-Dist: redis
Requires-Dist: torch

# mindfultensors
Dataloader that serves MRI images from a mogodb.

The main idea is to keep MRI images and corresponding training labels
for segmentation tasks in a `mongo` database. However, each <img src="https://render.githubusercontent.com/render/math?math=256^3"> 3D MRI
tensor even in 8 bit precision is 16Mb. `mongo`'s records cannot be
larger than this limit and we need to also store the labels of the
same dimensions. `mindfultensors` fetches and aggregates each <img src="https://render.githubusercontent.com/render/math?math=256^3">
tensor stored across multiple records, together with corresponding labels
either for gray and white matter, 104 regions atlas, volume of each of 104 ROIs, or a 50 region
atlas.

# installation

The package is on `pypy` and the simplest way to install it is
```
pip install mindfultensors
```
However, to tinker with it you can also clone the repo:
```
git clone git@github.com:neuroneural/mindfultensors.git
```
Then change directory to the newly cloned repository:
```
cd mindfultensors
```
And install locally by
```
pip intall -e .
```
# usage
A detailed example of how to create a dataloader using provided
dataset class and the corresponding tools is in
`scripts/usage_example.py`

Do not forget to move the batches to the GPU once obtained.
