Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed cvat section #486

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 0 additions & 99 deletions docs/source/tutorials/projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -602,105 +602,6 @@ The interpolation algorithm can also be run from sample frames kept locally, wit

All that is required is a ``<feature_hash>`` and ``object_hash`` for each object in your set of key frames.


Other Resources
===============

CVAT Integration
----------------

If you are currently using :xref:`cvat` for image and video annotations, we have made it easy to import your entire project or single tasks to |company|.
This will create the ontology and import all labels and classifications.

Exporting Your CVAT Work
^^^^^^^^^^^^^^^^^^^^^^^^
You can either export an entire project or an individual task.
Keep in mind that every new export will create an entirely new project.

Exporting from the CVAT UI
""""""""""""""""""""""""""

For project exports:

.. figure:: /images/cvat_project_export.png

Export Project.

Or for task exports:

.. figure:: /images/cvat_task_export.png

Export Task.

Then in the popup, please ensure that images are saved too:

.. figure:: /images/cvat_project_export_popup.png
:width: 450

Export Project.


Once this is downloaded, you can unzip the file to create a directory which contains all your images/videos, together with an `annotations.xml` file which contains your CVAT ontology, CVAT labels, and CVAT tags (which are the equivalent of Encord Classifications for entire images/frames).

Importing with the |sdk|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. note::
As imports can take quite some time, we recommend increasing the :class:`.EncordUserClient` request timeouts as described here :ref:`tutorials/configurations:Network configurations`.



.. tabs::

.. tab:: Code

.. literalinclude:: /code_examples/tutorials/projects/cvat_importer.py
:language: python

.. tab:: Example output

.. code-block:: python

project_hash = "0a5c5a7e-da96-44c1-a355-a53259c0e73e"
dataset_hash = "bd19ef7c-b698-434f-a7cc-d3c01fc5da3e"
encord.utilities.client_utilities.Issues(
errors=[],
warnings=[
encord.utilities.client_utilities.Issue(
issue_type='In Encord a specific label can only have one possible shape. If '
'the same label is used for multiple shapes, multiple labels need '
'to be created.',
instances=[
"The label `not_yet_annotated` was used for multiple shapes "
"`[<CvatShape.POLYGON: 'polygon'>, <CvatShape.TAG: 'tag'>]`. "
"Each shape which is translatable to Encord will lead to a "
"distinct editor entry."
]
)
],
infos=[]
)
issues = None


If the return object is a :class:`.CvatImporterSuccess`, you can open the web app and will find that the project was already added.

For possible import options and return types consult the in :meth:`code documentation <.EncordUserClient.create_project_from_cvat>`.

The :class:`Issues <.client_utilities.Issues>` Object - CVAT to Encord Import Limitations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

We encourage you to inspect the returned :class:`Issues <.client_utilities.Issues>` object closely.
This will inform you about possible limitations during the project/task import.

For example, within CVAT the same label in the ontology can be used for different shapes.
Within Encord, a label in the ontology is bound to a specific shape.
During import, the importer will detect whether the same CVAT label was used for multiple shapes and create different Encord ontology items for each of them.

There are other limitations which are documented in the :class:`Issues <.client_utilities.Issues>` object.
Please reach out to the Encord team if those need clarification.


API keys
========
We recommend using a :class:`encord.project.Project` as described in :ref:`tutorials/projects:Managing a project`.
Expand Down