From bcb33367bd22a0aee7970efdddbec9fe31a7a658 Mon Sep 17 00:00:00 2001 From: Alan Bi Date: Tue, 21 Jan 2020 13:05:37 -0500 Subject: [PATCH] Change API docs structure --- detecto/utils.py | 2 +- docs/api.rst | 27 --------------------------- docs/api/core.rst | 12 ++++++++++++ docs/api/index.rst | 36 ++++++++++++++++++++++++++++++++++++ docs/api/utils.rst | 7 +++++++ docs/api/visualize.rst | 7 +++++++ docs/index.rst | 3 ++- 7 files changed, 65 insertions(+), 29 deletions(-) delete mode 100644 docs/api.rst create mode 100644 docs/api/core.rst create mode 100644 docs/api/index.rst create mode 100644 docs/api/utils.rst create mode 100644 docs/api/visualize.rst diff --git a/detecto/utils.py b/detecto/utils.py index d71c7e6..0a4dd9c 100644 --- a/detecto/utils.py +++ b/detecto/utils.py @@ -171,7 +171,7 @@ def xml_to_csv(xml_folder, output_file): XML file should correspond to an image and contain the image name, image size, and the names and bounding boxes of the objects in the image, if any. Extraneous data in the XML files will simply be ignored. - See :download:`here <_static/example.xml>` for an example XML file. + See :download:`here <../_static/example.xml>` for an example XML file. For an image labeling tool that produces XML files in this format, see `LabelImg `_. diff --git a/docs/api.rst b/docs/api.rst deleted file mode 100644 index 2bce894..0000000 --- a/docs/api.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. _api: - -API Documentation -================= - -detecto.core ------------- - -.. automodule:: detecto.core - :members: - :special-members: - -.. autoclass:: detecto.core.Model - :members: - :special-members: __init__ - -detecto.utils -------------- - -.. automodule:: detecto.utils - :members: - -detecto.visualize ------------------ - -.. automodule:: detecto.visualize - :members: diff --git a/docs/api/core.rst b/docs/api/core.rst new file mode 100644 index 0000000..1cbdaea --- /dev/null +++ b/docs/api/core.rst @@ -0,0 +1,12 @@ +.. _core: + +detecto.core +============ + +.. automodule:: detecto.core + :members: + :special-members: + +.. autoclass:: detecto.core.Model + :members: + :special-members: __init__ \ No newline at end of file diff --git a/docs/api/index.rst b/docs/api/index.rst new file mode 100644 index 0000000..1fed495 --- /dev/null +++ b/docs/api/index.rst @@ -0,0 +1,36 @@ +.. _index: + +API Documentation +================= + +Click below for documentation specific to each module: + +.. toctree:: + :maxdepth: 1 + + core + utils + visualize + + +Core +---- + +The :ref:`core` module contains the central classes of the package: Dataset, +DataLoader, and Model. These are used to read in a labeled dataset and train +a functioning object detection model. + + +Utils +----- + +The :ref:`utils` module contains a variety of useful helper functions. With +it, you can read in images, convert XML files into CSV files, apply standard +transforms to images, and more. + + +Visualize +--------- + +The :ref:`visualize` module is used to display labeled images, plot +predictions, and run object detection on videos. diff --git a/docs/api/utils.rst b/docs/api/utils.rst new file mode 100644 index 0000000..0a426b1 --- /dev/null +++ b/docs/api/utils.rst @@ -0,0 +1,7 @@ +.. _utils: + +detecto.utils +============= + +.. automodule:: detecto.utils + :members: \ No newline at end of file diff --git a/docs/api/visualize.rst b/docs/api/visualize.rst new file mode 100644 index 0000000..0ffaf39 --- /dev/null +++ b/docs/api/visualize.rst @@ -0,0 +1,7 @@ +.. _visualize: + +detecto.visualize +================= + +.. automodule:: detecto.visualize + :members: diff --git a/docs/index.rst b/docs/index.rst index acf5321..9eca7f8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -37,9 +37,10 @@ API Documentation ================= .. toctree:: + :titlesonly: :maxdepth: 2 - api + api/index Indices and tables