Skip to content

Latest commit

 

History

History
99 lines (70 loc) · 1.84 KB

CONTRIBUTING.md

File metadata and controls

99 lines (70 loc) · 1.84 KB

Table of Contents

Installation

Prerequisites

  • Python (3.5+)
git clone https://github.com/openvinotoolkit/datumaro

Optionally, install a virtual environment (recommended):

python -m pip install virtualenv
python -m virtualenv venv
. venv/bin/activate

Then install all dependencies:

while read -r p; do pip install $p; done < requirements.txt

If you're working inside of a CVAT environment:

. .env/bin/activate
while read -r p; do pip install $p; done < datumaro/requirements.txt

Install Datumaro:

pip install -e /path/to/the/cloned/repo/

Optional dependencies

These components are only required for plugins and not installed by default:

  • OpenVINO
  • Accuracy Checker
  • TensorFlow
  • PyTorch
  • MxNet
  • Caffe

Usage

datum --help
python -m datumaro --help
python datumaro/ --help
python datum.py --help
import datumaro

Testing

It is expected that all Datumaro functionality is covered and checked by unit tests. Tests are placed in tests/ directory.

To run tests use:

python -m unittest discover -s tests

If you're working inside of a CVAT environment, you can also use:

python manage.py test datumaro/

Design and code structure

Code style

Try to be readable and consistent with the existing codebase. The project mostly follows PEP8 with little differences. Continuation lines have a standard indentation step by default, or any other, if it improves readability. For long conditionals use 2 steps. No trailing whitespaces, 80 characters per line.

Environment

The recommended editor is VS Code with the Python plugin.