Skip to main content

ConfusionFlow Banner

ConfusionFlow is a visualization tool distributed as Python package that enables more nuanced monitoring of a neural network's training process.

  • track and visualize the model performance of different timepoints (i.e., epochs) and dataset folds and compare different runs (e.g., different hyperparameter configurations).
  • we provide wrappers for exporting performance logs in the required format.

ConfusionFlow is in an early-preview alpha. Expect some bugs and rough edges.

ConfusionFlow Teaser

Demo

Try the latest stable release of ConfusionFlow with several example logs for the CIFAR-10 dataset: http://confusionflow.caleydoapp.org

Additional Information

ConfusionFlow was developed as a visualization tool to provide users with more feedback while developing or tuning neural network based classifiers. Performance monitoring often only utilizes simple line charts (one would for example plot the model loss and accuracy) which might easily miss many details and changes in the model's error structure.

While the errors for a specific model state (e.g., at a certain epoch) can be represented as a confusion matrix, it is difficult to compare multiple confusion matrices or track changes over time. ConfusionFlow visualizes model confusion over multiple model states and lets users compare different folds (e.g., train vs test set) or different hyperparameter configurations.

To the best of our knowledge there are still no other tools with similar functionality.

Limitations

Number of classes

Due to screenspace limitations the system is currently limited to around 10 classes. We are aware that we will not be able to handle datasets at ImageNet scale BUT those datesets are not very common, as they are usually very expensive to obtain. A large percentage of classification problems range around 10 or less classes where ConfusionFlow can provide additional feedback.

Runtime overhead

Logging the performance for multiple folds every epoch might severely slowdown the time to convergence (especially when creating logs for the complete train and test sets). While logging on a minibatch level might provide additional information, it also severely slows down the training even further. It is possible to alleviate this problem by persisting model checkpoints and creating the performance logs on different machines. However, this also involves a lot of engineering effort and will not be supported by ConfusionFlow in the near future.

Installation

Confusionflow can be either downloaded directly from PyPI via pip install confusionflow or by cloning and installing the repository directly from source:

From Source

First make sure you have node installed (required for building the UI component).

Clone and install the repository:

git clone https://github.com/confusionflow/confusionflow
cd confusionflow
python setup.py install

Development

If you want develop ConfusionFlow locally run:

python setup.py build_ui develop

Getting Started

As a first step you need to create some logs before you can start analyzing. Have a look at the examples folder and run one of the examples. The each example will create a new subdirectory logs where the performance logs will be stored.

You then can start the ConfusionFlow UI via:

confusionflow --logdir `<path_to_logdir>`

Usage Examples

tf.keras

torch

If you are using your own datasets you have to create a dataset-configuration first. We provide some example configurations for some popular datasets in examples/dataset-templates which should help you getting started.

Docker

You can also run ConfusionFlow via Docker. For more information please see the documentation.

Logging

We provide simple wrappers for Tensorflow Keras API as well as Pytorch for logging confusion matrices and exporting them in the format required by ConfusionFlow. For more information please consult the logging documentation.

Log Directory Layout

<logdir>
├── datasets                    <--- dataset config files
│   ├── mnist.json
│   └── index.json
├── foldlogdata                 <--- foldlog data
│   ├── example_log_mnist_train_data.json
│   └── example_log_mnist_test_data.json
├── foldlog                     <--- foldlog specifications
│   ├── example_log_mnist_train.json
│   └── example_log_mnist_test.json
├── runs                        <--- run specifications
│   ├── example_log.json
│   └── index.json
└── views                       <--- view specifications (currently unsused)

Documentation

The latest documentation can be viewed on docs.confusionflow.org

API

The Python package includes a simple Flask based server that implements the current API. The current API definition can be found in tools/swagger/api.yml and can be viewed using the Swagger Editor.

ConfusionFlow UI

The ConfusionFlow UI is currently developed at Caleydo/confusionflow-ui.

The Team

ConfusionFlow is a research project of the Institute of Computer Graphics at Johannes Kepler University Linz in collaboration with the IBM Visual AI Lab. ConfusionFlow is currently maintained by Peter Ruch and Holger Stitz.

Feedback

We would be really grateful for any feedback via the repository's issues section.

Getting Involved

Metadata

Release files for confusionflow 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for confusionflow 0.1.3
File Size Uploaded Provenance Actions
confusionflow-0.1.3.tar.gz 2.1 MB Without provenance Details for confusionflow-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for confusionflow 0.1.3
File Interpreter ABI Platform Actions
confusionflow-0.1.3-py2.py3-none-any.whl Python 2, Python 3 none any Details for confusionflow-0.1.3-py2.py3-none-any.whl

Total release size: 4.2 MB

Release files / confusionflow-0.1.3.tar.gz

Download URL confusionflow-0.1.3.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
4572731dbb9b721e5034e32e1bacf0c9792ff17132a3c728b18cda834effe58c
BLAKE2b-256 checksum
How to use checksums
e40c268a114769882e4ee61243d94a921a7efa5cd77275a8feb4aa97faa3db0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Release files / confusionflow-0.1.3-py2.py3-none-any.whl

Download URL confusionflow-0.1.3-py2.py3-none-any.whl
Size 2.1 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fb5f80fe98a9cb724e9cfaa4a661c09a2e7e74d245114741fd09fd3605089e13
BLAKE2b-256 checksum
How to use checksums
33e5c9755d551274296d75a26294894de8e3002dfaeb086767a193db364d55b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Security for confusionflow 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page