Commit 84cb92a6 authored by Samuel GAIST's avatar Samuel GAIST

Merge branch 'small-changes' into 'master'

Make small changes in the docs

See merge request !13
parents 96e9ad36 8b664f52
Pipeline #40001 passed with stages
in 5 minutes and 16 seconds
......@@ -219,8 +219,13 @@ Here are the description for each of the fields in the example above:
* **description:** is optional and gives a short description of the algorithm.
The graphical interface of BEAT provides user-friendly editors to configure the main components of the system (for example: algorithms, data formats, etc.), which simplifies their `JSON`_ declaration definition. One needs only to declare an algorithm using the described specifications when not using this graphical interface.
.. note::
The graphical interface of BEAT provides user-friendly editors to configure
the main components of the system (for example: algorithms, data formats,
etc.), which simplifies their `JSON`_ declaration definition. One needs
only to declare an algorithm using the described specifications when not
using this graphical interface.
.. _beat-system-algorithms-definition-analyzer:
......@@ -301,7 +306,9 @@ language.
|project| treats algorithms as objects that are derived from the class
``Algorithm`` when using Python or in case of C++, they should be derived from``IAlgorithmLagacy``, ``IAlgorithmSequential``, or ``IAlgorithmAutonomous`` depending of the algorithm type. To define a new algorithm,
``Algorithm`` when using Python or in case of C++, they should be derived from
``IAlgorithmLagacy``, ``IAlgorithmSequential``, or ``IAlgorithmAutonomous``
depending of the algorithm type. To define a new algorithm,
at least one method must be implemented:
* ``process()``: the method that actually processes input and produces
......@@ -1289,8 +1296,7 @@ DataLoader
..........
Provides access to data from a group of inputs synchronized together.
See .. :py:class::DataLoader:
See :py:class:`DataLoader`.
.. _beat-system-algorithms-output:
......@@ -1578,7 +1584,7 @@ the data block on the output.
# Determine if the label has changed since the last image we processed
if inputs['labels'].data.name != self.current_label:
# Write the block of data on the output
outputs['features'].write(data, self.previous_data_index)
outputs['features'].write(self.data, self.previous_data_index)
self.data = None
# Memorize the current data index of the input list
......
......@@ -142,7 +142,7 @@ The JSON_ file for a database has three main field.
The "protocols" field is where the datasets for each protocol is defined. In the example above only one protocol is defined. Implementing a new protocol means adding a new entry to the list of protocols. Each protocol has three main component:
* **name:** The name of the protocol which is "idiap" in this case.
* **sets:** The datasets which are included in this protocol. In this case the "idiap" protocol consists of three datasets; "train", "templates", and "probes".
* **sets:** The datasets which are included in this protocol. In this case the "idiap" protocol consists of three datasets: "train", "templates", and "probes".
* **template:** A template describes the number of sets and the set-template used for each set. Different protocols can use the same template which means they can be used in any application that accepts such structure. However each set may use different ``database view`` that makes the protocols different eventually.
Each set in the list of "sets" in the above example is a dataset that is used for a particular purpose. For example in case of simple face recognition, dataset "train" is used for training a model, "templates" is used for making templates for each identity and "probes" is used to measure the performance of the system. Each set has the following components:
......@@ -160,7 +160,7 @@ Database View
-------------
A ``database view`` is a piece of code that defines how the raw data should be fed
to the system based on defined protocols. Each database view is a class that
to the system based on defined protocols. Each database view is a class that
inherits from ``beat.backend.python.database.View`` and two methods is implemented
in them: ``index()`` and ``get()``. Each database block in an experiment is assigned to
a database view.
......@@ -257,11 +257,11 @@ The dataformat for the outputs of database is defined in this method. for exampl
elif output == 'image':
return {
'value': bob.io.base.load(obj.image)
}
}
If you want to know more about the underlying source code of these two methods, you can refer to `here <https://gitlab.idiap.ch/beat/beat.backend.python/blob/master/beat/backend/python/database.py>`_
If you want to know more about the underlying source code of these two methods, you can refer to `here <https://gitlab.idiap.ch/beat/beat.backend.python/blob/master/beat/backend/python/database.py>`_
In the following we present an example of a database view that is used by a subset of ``atnt`` database:
......@@ -323,23 +323,23 @@ In the following we present an example of a database view that is used by a subs
In the example above if there are 10000 images in the dataset, there will be 10000 entries in list
returned form the ``index`` method. The BEAT platform will use this information to efficiently split
returned form the ``index`` method. The BEAT platform will use this information to efficiently split
the jobs on several machines during the experiment. It is expected that the list
is ordered in a logical order (here: entries are grouped by ``client_id``).
For each entry in the dataset (represented as a named tuple), all the necessary data is
For each entry in the dataset (represented as a named tuple), all the necessary data is
provided by ``index()``. For performance reasons, it is expected that we don’t need to instantiate ``bob.db.atnt.Database()`` anymore in the ``get()`` method. The user can put any information in the index method, except for the names that are reserved by python named tuple such as `class`. If the user wants to use such names they should add it to a dictionary before defining the index method.
.. code-block:: python
def __init__(self):
super(All, self)
super().__init__()
self.output_member_map = {'class': 'cls'}
Some information from the database can be stored directly in the ``index()``
Some information from the database can be stored directly in the ``index()``
(in the given example: ``client_id`` and ``file_id``). For others, that require
opening a file, only the filename should be defined in the ``index()`` and the file
opening a file, only the filename should be defined in the ``index()`` and the file
should be processed later in ``get()``
Once the ``database view`` is written, the user must index the database with the command-line tool:
......@@ -379,4 +379,4 @@ new evaluation protocols into the platform. Besides, at the experiment level,
this allows to re-use a toolchain on a different database, with almost no
configuration changes from the user.
.. include:: links.rst
\ No newline at end of file
.. include:: links.rst
......@@ -113,7 +113,7 @@ the declared data format:
.. code-block:: json
{
"#description": "A rectangle in an pixeled image",
"#description": "A rectangle in an image",
"x": "int32",
"y": "int32",
"width": "int32",
......@@ -250,7 +250,7 @@ and 5 columns of booleans.
arrays are implemented using :py:class:`numpy.ndarray`.
An array can have up to 32 dimensions. This number might be lower depending on the underlying programming language and methods used for producing such arrays.
An array can have up to 32 dimensions. This number might be lower depending on the underlying programming language and methods used for producing such arrays.
An array can also contain objects
(either declared inline, or using another data format):
......
doc/intro/img/beat_editor_home.png

53.1 KB | W: | H:

doc/intro/img/beat_editor_home.png

50.7 KB | W: | H:

doc/intro/img/beat_editor_home.png
doc/intro/img/beat_editor_home.png
doc/intro/img/beat_editor_home.png
doc/intro/img/beat_editor_home.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -23,11 +23,14 @@ The BEAT framework is distributed as conda packages for Linux and MacOS.
.. code:: sh
$ conda create --name beat --override-channels -c https://www.idiap.ch/software/beat/conda -c defaults python=3
$ conda create --name beat \
--override-channels \
-c https://www.idiap.ch/software/beat/conda \
-c defaults \
python=3 beat.editor
$ conda activate beat
$ conda config --env --add channels defaults
$ conda config --env --add channels https://www.idiap.ch/software/beat/conda
$ conda install beat.editor
#. Install other packages that you may need in this environment if you're running local tests. For example:
......
......@@ -128,7 +128,7 @@ experimental setup.
Design
======
The next figure shows an UML representation of main BEAT components, showing
The next figure shows a UML representation of main BEAT components, showing
some of their interaction and interdependence. Experiments use algorithms, data
sets and a toolchain in order to define a complete runnable setup. Data sets
are grouped into protocols which are, in turn, grouped into databases.
......@@ -138,7 +138,7 @@ contracting those markers, it is possible to define unique identifiers for all
objects in the platform. In the example above, you can identify some examples.
.. High-level component interaction in the BEAT platform core
.. graphviz::
.. graphviz::
digraph hierarchy {
graph [compound=true, splines=polyline]
......@@ -200,7 +200,7 @@ interface to interact with the BEAT platform efficiently.
experiments
plotters
plotterparameters
.. include:: links.rst
......@@ -89,7 +89,13 @@ Similarly to algorithms, a library consists of two folds:
def function_from_my_library(value):
return value * self.multiplier
The graphical interface of BEAT provides user-friendly editors to configure the main components of the system (for example: libraries, data formats, etc.), which simplifies their `JSON`_ declaration definition. One needs only to declare a library using the described specifications when not using this graphical interface.
..note ::
The graphical interface of BEAT provides user-friendly editors to configure
the main components of the system (for example: libraries, data formats,
etc.), which simplifies their `JSON`_ declaration definition. One needs
only to declare a library using the described specifications when not using
this graphical interface.
......
......@@ -20,4 +20,4 @@
.. _bob: https://www.idiap.ch/software/bob/docs/bob/docs/stable/bob/doc/index.html
.. _idiap: http://www.idiap.ch
.. _eigenface: https://en.wikipedia.org/wiki/Eigenface
.. _database interfaces: http://pythonhosted.org/bob/temp/bob.db.base/doc/index.html
\ No newline at end of file
.. _database interfaces: https://www.idiap.ch/software/bob/docs/bob/docs/stable/bob/bob.db.base/doc/index.html
......@@ -4,7 +4,7 @@
A Hands-On Tutorial
=====================
This section includes the user-facing guide for creating BEAT objects locally using ``beat.editor`` and ``beat.cmdline``, in the form of a tutorial.
This section includes the user-facing guide for creating BEAT objects locally using ``beat.editor`` and ``beat.cmdline``, in the form of a tutorial.
Requirements
......@@ -14,14 +14,14 @@ Requirements
* Firefox or Chrome browser.
* A **BEAT** installation: Please see :ref:`beat-installation`.
* BEAT familiarity: This guide assumes you are somewhat familiar with what BEAT is and how it works. Please see :ref:`beat-system` and refer to it if you come across an unfamiliar BEAT term or concept.
* A BEAT **prefix**: All the building blocks of BEAT is stored in a directory typically named *prefix* (see :ref:`prefix`). For the purpose of this tutorial we provide this folder. Please download the prefix folder in this `git repository <https://gitlab.idiap.ch/beat/beat.tutorial.prefix>`_ . Run any BEAT commands relating to the prefix in the top-level folder of it, next to the prefix folder.
* A BEAT **prefix**: All the building blocks of BEAT is stored in a directory typically named *prefix* (see :ref:`prefix`). For the purpose of this tutorial we provide this folder. Please download the prefix folder in this `git repository <https://gitlab.idiap.ch/beat/beat.tutorial.prefix>`_ . Run any BEAT commands relating to the prefix in the top-level folder of it, next to the prefix folder.
* To simplify code examples, we will be using `Bob`_, a free signal-processing and machine learning toolbox originally developed by the Biometrics group at `Idiap`_ Research Institute, Switzerland. Please install the packages needed for this tutorial.
.. code:: sh
$ conda activate beat
$ conda install bob bob.db.iris bob.bio.base bob.bio.face ipdb
$ conda install bob=7.0.0 bob.db.iris bob.bio.base bob.bio.face ipdb
.. _prefix:
......@@ -66,7 +66,7 @@ BEAT objects consist of two main components.
* A json file that represents the metadata of the object.
* A piece of code in the supported backend language (python or C++) that defines the behaviour of certain type of objects.
To use BEAT locally you need to be able to create and edit the mentioned components for BEAT objects, test and debug them, vialize and manage them, and finally run an experiment. These can be done using different tools in BEAT.
To use BEAT locally you need to be able to create and edit the mentioned components for BEAT objects, test and debug them, visualize and manage them, and finally run an experiment. These can be done using different tools in BEAT.
* ``beat.editor`` is a graphical web application that enables you to edit metadata and manage the objects.
* The codes can be eddited using the eidtor of your choice.
......@@ -96,9 +96,9 @@ This lists all the experiments in your prefix, and should not be empty.
Now, let's make sure ``beat.editor`` is working. Run the following: ::
$ beat editor serve
$ beat editor start &
A new tab should open up in your browser showing this:
A new application should open up showing this:
.. image:: ./img/beat_editor_home.png
......@@ -298,7 +298,7 @@ To look at an experiment's caches, use the ``beat exp caches <exp name>`` comman
To work with caches generally: ::
$ beat caches
$ beat cache
Using Debugging Strategies
--------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment