bm_experiments.bm_RVSS module

Benchmark for ImageJ plugin - RVSS


  1. Enter the application folder in this project:

    cd <BIRL>/applications
  2. Download Fiji -

  3. Extract the downloaded application:

  4. Try to run Fiji:


Run the basic RVSS registration with original parameters:

python bm_experiments/         -t ./data-images/pairs-imgs-lnds_histol.csv         -d ./data-images         -o ./results         -Fiji $HOME/Applications/         -cfg ./configs/ImageJ_RVSS_histol.yaml         --visual --unique


tested for version ImageJ 1.52i & 2.35

Copyright (C) 2017-2019 Jiri Borovec <>

class bm_experiments.bm_RVSS.BmRVSS(params)[source]

Bases: birl.benchmark.ImRegBenchmark

Benchmark for ImageJ plugin - RVSS no run test while this method requires manual installation of ImageJ

For the app installation details, see module details.


>>> from birl.utilities.data_io import create_folder, update_path
>>> path_out = create_folder('temp_results')
>>> fn_path_conf = lambda n: os.path.join(update_path('configs'), n)
>>> path_csv = os.path.join(update_path('data-images'), 'pairs-imgs-lnds_mix.csv')
>>> params = {'path_table': path_csv,
...           'path_out': path_out,
...           'exec_Fiji': 'ImageJ-linux64',
...           'nb_workers': 2,
...           'unique': False,
...           'path_config': fn_path_conf('ImageJ_RVSS_histol.yaml')}
>>> benchmark = BmRVSS(params)
>>> shutil.rmtree(path_out, ignore_errors=True)

initialise benchmark


params (dict) – parameters


clean unnecessarily files after the registration


item (dict) – dictionary with regist. information

Return dict

the same or updated regist. info


get registration results - warped registered images and landmarks


item (dict) – dictionary with registration params

Return dict

paths to warped images/landmarks


generate the registration command(s)


item (dict) – dictionary with registration params

Return str|list(str)

the execution commands


prepare Benchmark - copy configurations

static extend_parse(arg_parser)[source]

extent the basic arg parses by some extra required parameters

Return object

COMMAND_REGISTRATION = '%(exec_Fiji)s --headless %(path_bsh)s %(dir_input)s/ %(dir_output)s/ %(dir_output)s/ %(ref_name)s %(params)s'[source]

command for executing the image registration

COMMAND_WARP_LANDMARKS = '%(exec_Fiji)s --headless %(path_bsh)s %(source)s %(target)s %(output)s/source_landmarks.pts  %(output)s/warped_source_landmarks.pts  %(transf)s %(warp)s'[source]

command for executing the warping image and landmarks

DEFAULT_PARAMS = {'RVSS': {'featuresModelIndex': 1, 'registrationModelIndex': 3, 'shrinkingConstraint': 1}, 'SIFT': {'fdBins': 8, 'fdSize': 8, 'initialSigma': 1.6, 'maxEpsilon': 25, 'maxOctaveSize': 1024, 'minInlierRatio': 0.05, 'minOctaveSize': 64, 'modelIndex': 1, 'rod': 0.92, 'steps': 3}}[source]

default RVSS parameters

DIR_INPUTS = 'input'[source]

internal folder name for copy input image pairs

DIR_OUTPUTS = 'output'[source]

internal folder name for registration results - images and transformations

PATH_SCRIPT_REGISTRATION = '/home/docs/checkouts/'[source]

path/name of image registration script

PATH_SCRIPT_WARP_LANDMARKS = '/home/docs/checkouts/'[source]

path/name of image/landmarks warping script

REQUIRED_PARAMS = ['path_out', 'path_table', 'exec_Fiji', 'path_config'][source]

required experiment parameters

REQUIRED_PARAMS_RVSS = ('shrinkingConstraint', 'featuresModelIndex', 'registrationModelIndex')[source]

required parameters in the configuration file for RVSS