Skip to main content

Portable and lightweight brain segmentation using tinygrad

Project description

BrainChop

BrainChop is a lightweight tool for brain segmentation that runs on pretty much everything.


Installation

You can install BrainChop using pip (Python > 3.10)

pip install brainchop

Usage

To use BrainChop, run the following command:

brainchop input.nii.gz -o output.nii.gz

Docker

You can also install BrainChop using docker

git clone git@github.com:neuroneural/brainchop-cli.git
cd brainchop-cli
docker build -t brainchop .

Then to run, use

docker run --rm -it --device=nvidia.com/gpu=all -v [[output directory]]:/app brainchop [[input nifti file]] -o [[output nifti file]]

On some systems (like recent 25.05 nixos), the docker run command will need to be prepended with

docker run --rm -it --device=nvidia.com/gpu=all

Where:

  • input.nii.gz is your input NIfTI file
  • output.nii.gz is the desired output file name

Requirements

  • Python 3.10+
  • tinygrad : our tiny and portable (but powerful) ML inference engine
  • numpy : basic tensor operations
  • nibabel : to read nifti files
  • requests : to download models

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brainchop-0.1.11.tar.gz (589.0 kB view details)

Uploaded Source

Built Distribution

brainchop-0.1.11-py3-none-any.whl (589.4 kB view details)

Uploaded Python 3

File details

Details for the file brainchop-0.1.11.tar.gz.

File metadata

  • Download URL: brainchop-0.1.11.tar.gz
  • Upload date:
  • Size: 589.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for brainchop-0.1.11.tar.gz
Algorithm Hash digest
SHA256 d5094b65ff8df1d186469ad2503c6bdafdaff3546b163a7020828c1a83dad1c3
MD5 a3d781c58995956b6622bd001d655916
BLAKE2b-256 e073d54f50098d6a6bd4fceb8b7995505edad137ab9b66d9ecb3577c301e4b9f

See more details on using hashes here.

File details

Details for the file brainchop-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: brainchop-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 589.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for brainchop-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 892f9295cc82a819cf6e9903b8dbdb75eeb329caa35692be21d55f81ed618b46
MD5 d281164c59d46d4cd965b2a44951bd4d
BLAKE2b-256 8545d1924ca5ec68f9bae9af4424d92424ef7735cf338db747edc41b7f03b011

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page