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

Add Cli option to upload annotations on task creation #1453

Closed
egrinstein opened this issue Apr 22, 2020 · 1 comment
Closed

Add Cli option to upload annotations on task creation #1453

egrinstein opened this issue Apr 22, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@egrinstein
Copy link
Contributor

Hello,

My usage of Cvat requires uploading annotations when creating jobs (for visualisation, for instance).
I have added this option into the CLI:

python cli.py create --help
usage: cli.py create [-h] [--labels LABELS] [--bug BUG]
                     [--annotation_path ANNOTATION_PATH]
                     [--annotation_format ANNOTATION_FORMAT]
                     [--cooldown_period_in_secs COOLDOWN_PERIOD_IN_SECS]
                     name {local,share,remote} resources [resources ...]

Create a new CVAT task.

positional arguments:
  name                  name of the task
  {local,share,remote}  type of files specified
  resources             list of paths or URLs

optional arguments:
  -h, --help            show this help message and exit
  --labels LABELS       string or file containing JSON labels specification
  --bug BUG             bug tracker URL
  --annotation_path ANNOTATION_PATH
                        path to annotation file
  --annotation_format ANNOTATION_FORMAT
                        format of the annotation file being uploaded, e.g.
                        CVAT XML 1.1
  --cooldown_period_in_secs COOLDOWN_PERIOD_IN_SECS
                        number of seconds to wait for the job to be created
                        until uploading the annotations

I have modified files utils/cli/definitions.py and utils/cli/core.py`. You can see the changes [here].(https://github.com/egrinstein/cvat/tree/feature/create_task_with_annotations)
If this is interesting for you, @nmanovic , how could I provide a test for this?

PS1: I have included the "cooldown_period_in_secs" arg because cvat only accepts annotations after the job is created, which seems to happen after file compression and its impossible to know using the CLI.
PS2: I have worked on this from the master branch because there seems to be a problem with the CLI in the develop branch, which I described at #1452 .

@nmanovic
Copy link
Contributor

@egrinstein , any contribution is vital for our product. We are happy to accept contributions from our community. Several comments below:

If this is interesting for you, @nmanovic , how could I provide a test for this?

Yes

PS1: I have included the "cooldown_period_in_secs" arg because cvat only accepts annotations after the job is created, which seems to happen after file compression and its impossible to know using the CLI.

You need to use REST API to check if a task is created. When you post your data, you can periodically check status of the request.

PS2: I have worked on this from the master branch because there seems to be a problem with the CLI in the develop branch, which I described at #1452 .

Need to fix develop branch. Could you please help? The master branch only for releases. The develop branch is used for integration of new changes.

@nmanovic nmanovic added the enhancement New feature or request label Apr 23, 2020
@nmanovic nmanovic added this to the Backlog milestone Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants