document containers

This commit is contained in:
Martin Baeuml
2011-05-13 11:08:14 +02:00
parent 94579ab8e2
commit 4f25efd52e
6 changed files with 31 additions and 19 deletions
+6 -1
View File
@@ -7,7 +7,7 @@ API
annotationmodel
===============
.. automodule:: annotationmodel
.. automodule:: annotations.model
.. autoclass:: AnnotationModel
:members:
:undoc-members:
@@ -36,6 +36,11 @@ annotationmodel
:members:
:undoc-members:
annotation.container
====================
.. automodule:: annotations.container
.. autoclass:: AnnotationContainer
:members:
annotationscene
===============
+3 -3
View File
@@ -110,7 +110,7 @@ The storage on disk of the labels however can be very different.
The label tool does not have *the one* in which way to store the labels. Again,
there are some default formats with which the label tool can deal out of the box (one of
which will be a yaml file, which resembles the textual representation above). However,
you are free to define your own loading and saving routines for your labels (see ***). This
allows you for example to support legacy third-party label formats without the need of converting
them first.
you are free to define your own loading and saving routines for your labels (see :doc:`Containers`). This
allows you for example to support legacy third-party label formats without the need of converting
them to yaml first.
+9 -15
View File
@@ -90,33 +90,27 @@ Defines a mapping of which inserter should be used for interactively inserting a
into the image. The default inserters allow to draw the respective shape. Read more
about how to write your own inserter in :ref:`Inserters`.
.. _LOADERS:
.. _CONTAINERS:
LOADERS
-------
CONTAINERS
----------
Default::
{
'txt': 'loaders.SimpleOneLinerTextLoader',
'yaml': 'loaders.YamlLoader',
'pickle': 'loaders.PickleLoader',
'*.txt': 'annotations.container.SimpleOneLinerTextContainer',
'*.yaml': 'annotations.container.YamlContainer',
'*.pickle': 'annotations.container.PickleContainer',
}
Defines a mapping of which loader should be used for loading a label file with the given extension.
This can of course also be a user defined loader. You can also define the class directly (instead
Defines a mapping of which container should be used for loading a label file matching the given filename pattern.
This can of course also be a user defined container. You can also define the class directly (instead
of a module path)::
{
'foo': MyFooLoader
'*.foo': MyFooContainer
}
.. todo::
What is a better name for LOADERS? SERIALIZERS? Because this class should take care of
writing the labels to the file as well.
.. _PLUGINS:
PLUGINS
+10
View File
@@ -0,0 +1,10 @@
.. highlight:: python
==========
Containers
==========
Annotation containers provide functions for loading and saving labels. You can
supply custom containers to support specific label formats.
.. todo:: write
+1
View File
@@ -31,6 +31,7 @@ Contents
configuration
items
inserters
containers
api
+2
View File
@@ -1,3 +1,5 @@
.. highlight:: python
=========
Inserters
=========