/fcdensenet_pytorch

PyTorch implementation of Fully Convolutional DenseNets for Semantic Segmentation

Primary LanguagePython

PyTorch Tiramisu

A PyTorch implementation of Fully Convolutional DenseNets for semantic segmentation, as described in The One Hundred Layer Tiramisu: Fully Convolutional DenseNets for Semantic Segmentation by Jegou et. al..

Notable Changes

The original publication uses pixel-wise cross-entropy as a loss function. This implementation utilizes either the Dice loss function or the Focal Loss.

Usage

The CLI provided in main.py offers entry points for model training and mask prediction.

The CLI uses a configuration file to input most of the required parameters.

Parameters are described by calling the help function, as below.

$ python main.py -h

The configuration file can use any format supported by configargparse.

An example configuration is provided in default_config.txt.

Required parameters must be passed either in the configuration file or on the command line. Command line arguments will supercede corresponding settings in the configuration file.

Training

python main.py --command train --config $PATH_TO_CONFIG_FILE

Prediction

python main.py --command predict --config $PATH_TO_CONFIG_FILE

Development

This tool was originally a product of the Laboratory of Cell Geometry at the University of California, San Francisco.