• Stars
    star
    220
  • Rank 175,104 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created about 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Manage your machine learning experiments with trixi - modular, reproducible, high fashion. An experiment infrastructure optimized for PyTorch, but flexible enough to work for your framework and your tastes.

DOI PyPI version Build Status Documentation Status Downloads GitHub

Finally get some structure into your machine learning experiments. trixi (Training & Retrospective Insights eXperiment Infrastructure) is a tool that helps you configure, log and visualize your experiments in a reproducible fashion.

Contribute

We're always grateful for contributions, even small ones! We're PhD students and this is just a side project, so there will always be something to improve.

The best way is to create pull requests on Github. Fork the repository and work either directly on develop or create a feature branch, whichever you like best. Then go to "Pull requests" on our Github, select "New pull request" and "compare across forks". Select our develop as base and your work as head/compare.

We currently don't support the full Github workflow, because we have to mirror from our working repository to Github, but don't worry, we can export the pull requests and apply them so that your contribution will still appear on Github :)

Features

trixi consists of three parts:

  • Logging API
    Log whatever data you like in whatever way you like to whatever backend you like.

  • Experiment Infrastructure
    Standardize your experiment, let the framework do all the inconvenient stuff, and simply start, resume, change and finetune all your experiments.

  • Experiment Browser
    Compare, combine and visually inspect the results of your experiments.

An implementation diagram is given here.

Logging API

The Logging API provides a standardized way for logging results to different backends. The Logging API supports (among others):

  • Values
  • Text
  • Plots (Bar, Line, Scatter, Piechart, ...)
  • Images (Single, Grid)

And offers different Backends, e.g. :

And an experiment-logger for logging your experiments, which uses a file logger to automatically create a structured directory and allows storing of config, results, plots, dict, array, images, etc. That way your experiments will always have the same structure on disk.

Here are some examples:

visdom-logger

  • Files:

file-logger

  • Telegram:

telegram-logger

Experiment Infrastructure

The Experiment Infrastructure provides a unified way to configure, run, store and evaluate your results. It gives you an experiment interface, for which you can implement the training, validation and testing. Furthermore it automatically provides you with easy access to the Logging API and stores your config as well as the results for easy evaluation and reproduction. There is an abstract Experiment class and a PytorchExperiment with many convenience features.

exp-trainexp-test

For more info, visit the Documentation.

Experiment Browser

(We're currently remaking this from scratch, expect major improvements :))

The Experiment Browser offers a complete overview of experiments along with all config parameters and results. It also allows to combine and/or compare different experiments, giving you an interactive comparison highlighting differences in the configs and a detailed view of all images, plots, results and logs of each experiment, with live plots and more. trixi browser

Installation

Install trixi:

pip install trixi

Or to always get the newest version you can install trixi directly via git:

git clone https://github.com/MIC-DKFZ/trixi.git
cd trixi
pip install -e .

Documentation

The docs can be found here: trixi.rtfd.io

Or you can build your own docs using Sphinx.

Sphinx Setup

Install Sphinx (fixed to 1.7.0 for now because of issues with Readthedocs):
pip install sphinx==1.7.0

Generate HTML:
path/to/PROJECT/doc$ make html

index.html will be at:
path/to/PROJECT/doc/_build/html/index.html

Notes

  • Rerun make html each time existing modules are updated (this will automatically call sphinx-apidoc)
  • Do not forget indent or blank lines
  • Code with no classes or functions is not automatically captured using apidoc

Example Documentation

We use Google style docstrings:

def show_image(self, image, name, file_format=".png", **kwargs):
    """
    This function shows an image.

    Args:
        image(np.ndarray): image to be shown
        name(str): image title
    """

Examples

Examples can be found here for:

How to Cite

If you use trixi in your project, we'd appreciate a citation, for example like this

@misc{trixi2017,
  author = {Zimmerer, David and Petersen, Jens and Kรถhler, Gregor and Wasserthal, Jakob and Adler, Tim and Wirkert, Sebastian and Ross, Tobias},
  title = {trixi - Training and Retrospective Insight eXperiment Infrastructure},
  year = {2017},
  publisher = {GitHub},
  journal = {GitHub Repository},
  howpublished = {\url{https://github.com/MIC-DKFZ/trixi}},
  doi = {10.5281/zenodo.1345136}
}

More Repositories

1

nnUNet

Python
4,806
star
2

medicaldetectiontoolkit

The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.
Python
1,258
star
3

batchgenerators

A framework for data augmentation for 2D and 3D image classification and segmentation
Jupyter Notebook
1,036
star
4

nnDetection

nnDetection is a self-configuring framework for 3D (volumetric) medical object detection which can be applied to new data sets without manual intervention. It includes guides for 12 data sets that were used to develop and evaluate the performance of the proposed method.
Python
508
star
5

MedNeXt

MedNeXt is a fully ConvNeXt architecture for 3D medical image segmentation (MICCAI 2023).
Python
261
star
6

HD-BET

MRI brain extraction tool
Python
230
star
7

TractSeg

Automatic White Matter Bundle Segmentation
Python
212
star
8

napari-sam

Python
206
star
9

basic_unet_example

An example project of how to use a U-Net for segmentation on medical images with PyTorch.
Python
132
star
10

BraTS2017

Python
74
star
11

LIDC-IDRI-processing

Scripts for the preprocessing of LIDC-IDRI data
Python
71
star
12

MITK-Diffusion

MITK Diffusion - Official part of the Medical Imaging Interaction Toolkit
C++
66
star
13

mood

Repository for the Medical Out-of-Distribution Analysis Challenge.
Python
59
star
14

BodyPartRegression

Python
58
star
15

ACDC2017

Python
53
star
16

niicat

This is a tool to quickly preview nifti images on the terminal
Python
48
star
17

RegRCNN

This repository holds the code framework used in the paper Reg R-CNN: Lesion Detection and Grading under Noisy Labels. It is a fork of MIC-DKFZ/medicaldetectiontoolkit with regression capabilites.
Python
48
star
18

dynamic-network-architectures

Python
42
star
19

MultiTalent

Implemention of the Paper "MultiTalent: A Multi-Dataset Approach to Medical Image Segmentation"
Python
36
star
20

image_classification

๐ŸŽฏ Deep Learning Framework for Image Classification & Regression in Pytorch for Fast Experiments
Python
33
star
21

vae-anomaly-experiments

Python
26
star
22

Hyppopy

Hyppopy is a python toolbox for blackbox optimization. It's purpose is to offer a unified and easy to use interface to a collection of solver libraries.
Python
25
star
23

RTTB

Swiss army knife for radiotherapy analysis
C++
22
star
24

patchly

A grid sampler for larger-than-memory N-dimensional images
Python
20
star
25

probabilistic_unet

A U-Net combined with a variational auto-encoder that is able to learn conditional distributions over semantic segmentations.
Jupyter Notebook
20
star
26

image-time-series

Code for deep learning-based glioma/tumor growth models
Python
20
star
27

semantic_segmentation

Python
20
star
28

anatomy_informed_DA

Python
16
star
29

ParticleSeg3D

Python
9
star
30

gpconvcnp

Code for "GP-ConvCNP: Better Generalization for Convolutional Conditional Neural Processes on Time Series Data"
Python
8
star
31

radtract

RadTract: enhanced tractometry with radiomics-based imaging biomarkers for improved predictive modelling.
Python
8
star
32

cmdint

CmdInterface enables detailed logging of command line and python experiments in a very lightweight manner (coding wise). It wraps your command line or python function calls in a few lines of python code and logs everything you might need to reproduce the experiment later on or to simply check what you did a couple of years ago.
Python
8
star
33

generalized_yolov5

An extension of YOLOv5 to non-natural images together with 5-Fold Cross-Validation
Python
7
star
34

cOOpD

Python
7
star
35

PROUNET

Prostate U-net
Python
7
star
36

MurineAirwaySegmentation

Python
6
star
37

acvl_utils

Python
5
star
38

napari-nifti

Python
4
star
39

OverthINKingSegmenter

Python
3
star
40

agent-sam

Segment Anything model wrapper used by the Medical Imaging Interaction Toolkit (MITK).
Python
3
star
41

help_a_hematologist_out_challenge

Python
2
star
42

napari-mzarr

Python
2
star
43

perovskite-xai

Python
2
star
44

n2c2-challenge-2019

Jupyter Notebook
2
star
45

mzarr

Python
1
star
46

imlh-icml-detection-tools

Python
1
star
47

MatchPoint

MatchPoint is a translational image registration framework written in C++. It offers a standardized interface to utilize several registration algorithm resources (like ITK, plastimatch, elastix) easily in a host application.
C++
1
star