unetseg package

Subpackages

Submodules

unetseg.evaluate module

unetseg.postprocess module

unetseg.predict module

unetseg.skeleton module

This is a skeleton file that can serve as a starting point for a Python console script. To run this script uncomment the following lines in the [options.entry_points] section in setup.cfg:

console_scripts =
     fibonacci = unetseg.skeleton:run

Then run pip install . (or pip install -e . for editable mode) which will install the command fibonacci inside your current environment.

Besides console scripts, the header (i.e. until _logger…) of this file can also be used as template for Python modules.

Note

This skeleton file can be safely removed if not needed!

References

unetseg.skeleton.fib(n)[source]

Fibonacci example function

Parameters

n (int) – integer

Returns

n-th Fibonacci number

Return type

int

unetseg.skeleton.main(args)[source]

Wrapper allowing fib() to be called with string arguments in a CLI fashion

Instead of returning the value from fib(), it prints the result to the stdout in a nicely formated message.

Parameters

args (List[str]) – command line parameters as list of strings (for example ["--verbose", "42"]).

unetseg.skeleton.parse_args(args)[source]

Parse command line parameters

Parameters

args (List[str]) – command line parameters as list of strings (for example ["--help"]).

Returns

command line parameters namespace

Return type

argparse.Namespace

unetseg.skeleton.run()[source]

Calls main() passing the CLI arguments extracted from sys.argv

This function can be used as entry point to create console scripts with setuptools.

unetseg.skeleton.setup_logging(loglevel)[source]

Setup basic logging

Parameters

loglevel (int) – minimum loglevel for emitting messages

unetseg.train module

unetseg.utils module

Module contents