Commit 500296b7 authored by André Anjos's avatar André Anjos 💬

Explain how to change baselines; how to run RoI evaluations

parent 82ceffb4
Pipeline #5265 passed with stages
in 17 minutes and 31 seconds
......@@ -245,4 +245,124 @@ Wide Line Detector Histogram Eq. 00:04 00:01 00:01 02:04 00:06
======================== ================= ====== ====== ====== ====== ======
Modifying Baseline Experiments
It is fairly easy to modify baseline experiments available in this package. To
do so, you must copy the configuration files for the given baseline you want to
modify, edit them to make the desired changes and run the experiment again.
For example, suppose you'd like to change the protocol on the Vera Fingervein
database and use the protocol ``full`` instead of the default protocol ``nom``.
First, you identify where the configuration file sits:
.. code-block:: sh
$ ./bin/ -tc -p
- X.Y.Z @ /path/to/
+ mc -->
+ parallel -->
+ rlt -->
+ utfvp -->
+ verafinger -->
+ wld -->
The listing above tells the ``verafinger`` configuration file sits on the
file ``/path/to/``. In
order to modify it, make a local copy. For example:
.. code-block:: sh
$ cp /path/to/
$ # edit, change the value of "protocol" to "full"
Also, don't forget to change all relative module imports (such as ``from
..database.verafinger import Database``) to absolute imports (e.g. ``from import Database``). This will make the
configuration file work irrespectively of its location w.r.t. ````.
The final version of the modified file could look like this:
.. code-block:: python
from import Database
database = Database(original_directory='/where/you/have/the/raw/files',
original_extension='.png', #don't change this
protocol = 'full'
Now, re-run the experiment using your modified database descriptor:
.. code-block:: sh
$ ./bin/ ./ wld -vv
Notice we replace the use of the registered configuration file named
``verafinger`` by the local file ````. This makes the program
```` take that into consideration instead of the original file.
Other Resources
This package contains other resources that can be used to evaluate different
bits of the vein processing toolchain.
Region of Interest Goodness of Fit
Automatic region of interest (RoI) finding and cropping can be evaluated using
a couple of scripts available in this package. The program ````
compares two sets of ``preprocessed`` images and masks, generated by
*different* preprocessors (see
:py:class:``) and calculates a few
metrics to help you determine how both techniques compare. Normally, the
program is used to compare the result of automatic RoI to manually annoted
regions on the same images. To use it, just point it to the outputs of two
experiments representing the manually annotated regions and automatically
extracted ones. E.g.:
.. code-block:: sh
$ ./bin/ ~/verafinger/mc_annot/preprocessed ~/verafinger/mc/preprocessed
Jaccard index: 9.60e-01 +- 5.98e-02
Intersection ratio (m1): 9.79e-01 +- 5.81e-02
Intersection ratio of complement (m2): 1.96e-02 +- 1.53e-02
Values printed by the script correspond to the `Jaccard index`_
(:py:func:``), as well as the
intersection ratio between the manual and automatically generated masks
(:py:func:``) and the ratio to
the complement of the intersection with respect to the automatically generated
(:py:func:``). You
can use the option ``-n 5`` to print the 5 worst cases according to each of the
You can use the program ```` to display the images after the
preprocessing step using:
.. code-block:: sh
$ ./bin/ /path/to/verafinger/mc/preprocessed/098-F/098_R_1.hdf5 --save=example.png
$ # open example.png
And you should be able to view an image like this (example taken from the Vera
fingervein database, using the automatic annotator):
.. figure:: img/vein-mask.*
:scale: 50%
Example RoI overlayed on finger vein image of the Vera fingervein database,
as produced by the script ````.
.. include:: links.rst
......@@ -24,3 +24,4 @@
.. _dependencies:
.. _mailing list:!forum/bob-devel
.. _jaccard index:
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment