GithubHelp home page GithubHelp logo

cvat-api-script's Introduction

CVAT API Script

Purpose

Making automatic transactions over csv in CVAT.

Config File

includes:
• [server]
  ◦ host=
  ◦ port=
• [log]
  ◦ log_file=True
• [user]
  ◦ username=
  ◦ password=

  • Server information is required to access CVAT.
  • If log_file is True, logs will be saved to the file. If false, it will not be saved to the file.
  • Username and password are required to log in. This section will be blank at first. If this part is empty, these will be requested on the console.

Csv File Format

In the first line of the file, these headings should be “Organization, Project, TaskName, UploadType, UploadPath, Assignee, JobStage, JobState”. The entered information should not be wrong, this information is checked with the check() command.

Script Commands

There are 6 main commands in total. These are as follows:

1. Check

python3 cvat_script.py check_csv <csv_file>

Purpose

It checks whether the contents of the csv_file file whose path is given are in the appropriate format. If the format is correct, the message format True is returned. If false, it lists where the errors are.

How It Works

If there is missing information in the given csv file, it gives the warning "{index}. row is empty or wrong", this is not an error. Checks whether the information in the Organization, Project, TaskName, Assigne columns is in CVAT. If there is no information available, it will throw an error.

NOTE

This process works automatically on every command.

2. List:

python3 cvat_script.py list

Purpose

It outputs the current status of all tasks in csv format.
This command works with 6 different parameters. These:

2.1. --organization

python3 cvat_script.py list --organization <organization_name>

Purpose: Generates the current status of all tasks with the same organization as <organization_name> in csv format.

2.2. --project

python3 cvat_script.py list --project <project_name>

Purpose: Generates the current status of all tasks with the same project as <project_name> in csv format.

2.3. --jobstage

python3 cvat_script.py list --jobstage <jobstage>

Purpose: Generates the current status of all tasks with the same jobstage as in csv format.

2.4. --jobstate

python3 cvat_script.py list --jobstate <jobstate>

Purpose: Generates the current status of all tasks with the same jobstate as in csv format.

2.5. --andor

python3 cvat_script.py list  --andor <and_or>

for example:

python3 cvat_script.py list --jobstate in_progress --project project_name --andor or

Purpose: It allows multiple filters to be used as OR or AND. Default: and

2.6. --o

python3 cvat_script.py list  -o <csv_file>

for example:

python3 cvat_script.py list --jobstate in_progress --project project_name --andor or

Purpose: Specifies the path to save the csv file. Default: output.csv

3. Create

python3 cvat_script.py create <csv_file>

Purpose

It checks whether the task of each line in the given csv file is open, updates the status if it is open, and opens the task if it is not open.

Note

It does not check the TaskName part when checking. Additionally, it checks UploadPath, UploadType, JobStage and JobState.

4. Update

python3 cvat_script.py update <csv_file>

Purpose

It checks the status of task of each line in the given csv file, updates it if it will be updated, does not open the task if it is not open. It just performs the update operation.

Note

While checking, it additionally checks JobStage and JobState.

5. Export

python3 cvat_script.py export <csv_file> --format <format_type>

Purpose

It exports the annotations of each task in the given csv file in the given format.

Default (--format): PASCAL_VOC_1.1

6. Upload

python3 cvat_script.py upload <csv_file> --annotation <annotation_file> --format <format_type>

Purpose

It imports the annotations of each task in the given csv file in the given format.

Default (--format): PASCAL_VOC_1.1

NOTE

It compares the names of the folders under the path (<annotation_file>) given with the Annotation file and the TaskNames in the csv file.

cvat-api-script's People

Contributors

talhabacak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.