GithubHelp home page GithubHelp logo

freesurfer / samseg Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 5.0 83.12 MB

This repository contains the code for the SAMSEG.

CMake 1.21% C++ 64.69% MATLAB 2.05% Cuda 0.53% Shell 0.04% C 0.23% Python 30.72% Makefile 0.53%

samseg's Introduction

SAMSEG

This repository is under construction. Please look at the main repository in the meantime.

TODO: Add segmentation image(s)?

Sequence Adaptive Multimodal SEGmentation (SAMSEG) is a tool to robustly segment dozens of brain structures from head MRI scans without preprocessing. The characteristic property of SAMSEG is that it accepts multi-contrast MRI data without prior assumptions on the specific type of scanner or pulse sequences used. Dedicated versions to handle longitudinal data, or to segment white matter lesions in multiple sclerosis (MS) patients are also available.

TODO: The description above does not include the subregions module. Fix this.

Build Status

Linux Windows MacOS
Build Status Build Status Build Status

Getting Started

SAMSEG runs on 64bit Windows, Linux, and MacOS machines. Please visit the official SAMSEG Wiki and subregions Wiki for instructions.

Most of the functionalities of SAMSEG do not require FreeSurfer to be installed on your system, except:

  • longitudinal registration preprocessing;
  • subregions module.

Installing from source (on *nix)

  1. Clone project: git clone https://github.com/freesurfer/samseg.git

  2. Get the submodules: git submodule init git submodule update

  3. Create a virtual environment using, e.g., conda: conda create -n samseg python=3.9

  4. Activate the virtual environment: conda activate samseg

  5. Install correct compilers for ITK v.4.13.2 conda install -c conda-forge gxx_linux-64=7.5 gcc_linux-64=7.5 sysroot_linux-64=2.17

  6. Create the ITK build directory mkdir ITK-build cd ITK-build

  7. Export compilers installed with conda: export CC=<your_conda_path>/envs/samseg/bin/x86_64-conda_cos6-linux-gnu-gcc export CXX=<your_conda_path>/envs/samseg/bin/x86_64-conda_cos6-linux-gnu-g++

  8. Run CMAKE: cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ITK-install ../ITK

  9. Install: make install cd..

  10. Install in development mode (.[test] installs pytest, use just . if you don't want to run tests) ITK_DIR=ITK-install python -m pip install --editable .[test]

  11. If you want to build wheels call ITK_DIR=ITK-install python -m pip wheel . -w ./dist --no-deps

  12. If you're developing and want to run the tests call (in the root of the git repository): pytest samseg

References

If you use these tools in your analysis, please cite:

samseg's People

Contributors

avnishks avatar hypersad avatar jduemose avatar jnolan14 avatar merdi-dtu avatar oulap avatar ste93ste avatar yhuang43 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

samseg's Issues

how to use the mesh created by samseg?

I put --save-mesh at samseg command, and finally samseg created a mesh file. but it can not be used in freeview as rh.pial (recon-all). So, how to use the mesh files created by samseg?

Optimsing SAMSEG

Hello!
I am a masters student trying to optmise SAMSEG to detect WMH in stroke. I was wondering if it would be possible to add stroke images (with manually segmented WMH) to optimise the hyperparameters for modelling spatial location and shape of lesions. If so, I am struggling to find how to adapt the code to add images from or dataset for optimisation proposes, as I am new to coding.
Kind regards,
Adrija.

Does Samseg use the GPU?

Dear Developers,

without cuda drivers, samseg issues a warning at the beginning that the GPU will not be used. This warning disappears after the cuda drivers are installed but the execution time was the same as before and "watch nvidia-smi" does not show any GPU usage at all.
Does the current version use the GPU at all? If not, do you have a GPU compiled version available or could you provide a short guide how to compile samseg with GPU support?

Thanks a lot!

Kind regards,
Lukas

How do I train samseg with my own data

In practical application, the segmentation effectiveness of a single MRI structure is not consistently robust in certain areas. Therefore, I intend to train a new probabilistic model tailored to my own data.
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.