mirror of
https://github.com/wassname/sloth.git
synced 2026-07-19 11:28:06 +08:00
document containers
This commit is contained in:
+6
-1
@@ -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
@@ -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
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -31,6 +31,7 @@ Contents
|
||||
configuration
|
||||
items
|
||||
inserters
|
||||
containers
|
||||
api
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
.. highlight:: python
|
||||
|
||||
=========
|
||||
Inserters
|
||||
=========
|
||||
|
||||
Reference in New Issue
Block a user