@ -8,6 +8,7 @@ import getpass
import json
import json
import logging
import logging
import os
import os
import textwrap
from distutils . util import strtobool
from distutils . util import strtobool
from cvat_sdk . core . proxies . tasks import ResourceType
from cvat_sdk . core . proxies . tasks import ResourceType
@ -90,10 +91,15 @@ def make_cmdline_parser() -> argparse.ArgumentParser:
#######################################################################
#######################################################################
task_create_parser = task_subparser . add_parser (
task_create_parser = task_subparser . add_parser (
" create " ,
" create " ,
description = """ Create a new CVAT task. To create a task, you need
description = textwrap . dedent (
to specify labels using the - - labels argument or
""" \
attach the task to an existing project using the
Create a new CVAT task . To create a task , you need
- - project_id argument . """ ,
to specify labels using the - - labels argument or
attach the task to an existing project using the
- - project_id argument .
"""
) ,
formatter_class = argparse . RawTextHelpFormatter ,
)
)
task_create_parser . add_argument ( " name " , type = str , help = " name of the task " )
task_create_parser . add_argument ( " name " , type = str , help = " name of the task " )
task_create_parser . add_argument (
task_create_parser . add_argument (
@ -124,38 +130,56 @@ def make_cmdline_parser() -> argparse.ArgumentParser:
dest = " status_check_period " ,
dest = " status_check_period " ,
default = 2 ,
default = 2 ,
type = float ,
type = float ,
help = """ number of seconds to wait until checking
help = textwrap . dedent (
if data compression finished ( necessary before uploading annotations ) """ ,
""" \
number of seconds to wait until checking
if data compression finished ( necessary before uploading annotations )
"""
) ,
)
)
task_create_parser . add_argument (
task_create_parser . add_argument (
" --copy_data " ,
" --copy_data " ,
default = False ,
default = False ,
action = " store_true " ,
action = " store_true " ,
help = """ set the option to copy the data, only used when resource type is
help = textwrap . dedent (
share ( default : % ( default ) s ) """ ,
""" \
set the option to copy the data , only used when resource type is
share ( default : % ( default ) s )
"""
) ,
)
)
task_create_parser . add_argument (
task_create_parser . add_argument (
" --dataset_repository_url " ,
" --dataset_repository_url " ,
default = " " ,
default = " " ,
type = str ,
type = str ,
help = (
help = textwrap . dedent (
" git repository to store annotations e.g. "
""" \
" https://github.com/user/repos [annotation/<anno_file_name.zip>] "
git repository to store annotations e . g .
https : / / github . com / user / repos [ annotation / < anno_file_name . zip > ]
"""
) ,
) ,
)
)
task_create_parser . add_argument (
task_create_parser . add_argument (
" --frame_step " ,
" --frame_step " ,
default = None ,
default = None ,
type = int ,
type = int ,
help = """ set the frame step option in the advanced configuration
help = textwrap . dedent (
when uploading image series or videos ( default : % ( default ) s ) """ ,
""" \
set the frame step option in the advanced configuration
when uploading image series or videos ( default : % ( default ) s )
"""
) ,
)
)
task_create_parser . add_argument (
task_create_parser . add_argument (
" --image_quality " ,
" --image_quality " ,
default = 70 ,
default = 70 ,
type = int ,
type = int ,
help = """ set the image quality option in the advanced configuration
help = textwrap . dedent (
when creating tasks . ( default : % ( default ) s ) """ ,
""" \
set the image quality option in the advanced configuration
when creating tasks . ( default : % ( default ) s )
"""
) ,
)
)
task_create_parser . add_argument (
task_create_parser . add_argument (
" --labels " ,
" --labels " ,
@ -201,6 +225,26 @@ def make_cmdline_parser() -> argparse.ArgumentParser:
action = " store_true " , # automatically sets default=False
action = " store_true " , # automatically sets default=False
help = """ zip chunks before sending them to the server """ ,
help = """ zip chunks before sending them to the server """ ,
)
)
task_create_parser . add_argument (
" --cloud_storage_id " ,
default = None ,
type = int ,
help = " cloud storage ID if you would like to use data from cloud storage " ,
)
task_create_parser . add_argument (
" --filename_pattern " ,
type = str ,
help = textwrap . dedent (
""" \
pattern for filtering data from the manifest file for the upload .
Only shell - style wildcards are supported :
* - matches everything
? - matches any single character
[ seq ] - matches any character in ' seq '
[ ! seq ] - matches any character not in seq
"""
) ,
)
#######################################################################
#######################################################################
# Delete
# Delete