LION.evaluation.methods

Reconstruction methods as one call: measurements -> images.

method(x, operator) turns anything that reconstructs into a function run(y), with run.record describing it (for test records and to know when two evaluations ran the same method):

  • a LIONmodel: run as its solvers run it (model_forward: its initial reconstruction, the operator’s default (FDK for CT) unless set, first for image-domain models, and its normalisation);

  • a model’s file ("model", .json, .pt): the model with its weights; if its training record names a solver with its own way of reconstructing (e.g. Noise2Inverse’s), that solver’s;

  • a reconstructor’s file (reconstructor.save): the reconstructor, with its model loaded from its file;

  • a solver: its own reconstruction (solver._forward);

  • a reconstructor (PnP, LearnedRegularizerReconstructor): its reconstruct, recorded as its spec (operator, parameters) and its model;

  • a function f(y, operator), e.g. fdk, or functools.partial(tv_min, lam=...).

baseline(operator) is what methods are compared with: the operator’s default reconstruction.

Functions

baseline(operator)

The classical reconstruction methods are compared with, as a function f(y, operator): the operator's default reconstruction (Operator.default_reconstruction_fn): FDK for CT, the inverse for an operator that has one.

method(x[, operator, allow])

x as one call run(y) -> images (see the module docstring), with run.record describing it.


LION.evaluation.methods.baseline(operator)[source]

The classical reconstruction methods are compared with, as a function f(y, operator): the operator’s default reconstruction (Operator.default_reconstruction_fn): FDK for CT, the inverse for an operator that has one. Without one, give it yourself.

LION.evaluation.methods.method(x, operator=None, *, allow=())[source]

x as one call run(y) -> images (see the module docstring), with run.record describing it. operator: the operator models and functions need (e.g. the CT operator for FDK).