Commands
Get to know the different commands available in the Tenyks CLI
Explore what you can do with the Tenyks Command Line Interface (CLI).
CLI installation and authentication
This section assumes you have previously installed the Tenyks CLI and authenticated with your Tenyks account.
Base Command
tenyks
tenyks
Running tenyks
will display the summary of all the commands in the CLI.
Usage: tenyks [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
annotation-bbox-embedding-upload
configure
configure-aws
convert-annotations
convert-predictions
dataset-annotations-upload
dataset-class-names-upload
dataset-create
dataset-images-upload
image-embedding-upload
model-create
model-predictions-upload
prediction-bbox-embedding-upload
Running the CLI 🏃
The first line of the base command tenyks
describes the expected format for running CLI commands:
tenyks [OPTIONS] COMMAND [ARGS]...
🔨 Let's break this down:
tenyks
- The base command that starts the CLI[OPTIONS]
- Available options for eachCOMMAND
- currently
tenyks
base command has only one option:help
- but
tenyks model-create
has many more options such as--name
,--images
or--dataset_key
- currently
COMMMAND
- This tells the CLI what you want to do (e.g.configure
ormodel-create
)ARGS
- The arguments expected by eachOPTION
As an example, a command might be tenyks model-create --name "yolo_v8"
:
tenyks
is the _base command _of the CLImodel-create
is the command--name
is the option"yolo_v8"
is the argument
tenyks COMMAND help
tenyks COMMAND help
For every command you can quickly retrieve the command's summary. For example tenyks dataset-create --help
displays the following list of available options:
tenyks dataset-create --help
Usage: tenyks dataset-create [OPTIONS]
Options:
--name TEXT The name of the
dataset to be
created.
--images TEXT The path to
image folder.
--annotations TEXT The path to
image
annotation.
--annotations_format [coco|vott_csv|yolo|deepstream|classification]
The annotation
file type.
--class_names TEXT The path to
class names
file.
--max_concurrent_uploads INTEGER
Number of
concurrent
uploads.
--verbose Verbose flag.
--s3_images_uri TEXT Images bucket
uri
--s3_metadata_uri TEXT Metadata bucket
uri
--aws_access_key_id TEXT AWS access key
id
--aws_secret_access_key TEXT AWS secret
access key
--aws_region TEXT AWS region
--help Show this
message and
exit.
As demonstrated by the preceding block of code, a detailed list of all the [OPTIONS]
for the dataset-create
command is displayed.
Set Up Configuration
tenyks configure
tenyks configure
As described in the Authentication section, this command authenticates your Tenyks account using your username and your password.
Usage: tenyks configure [OPTIONS]
Options:
--api_url TEXT The tenyks api
url
--username TEXT The tenyks
username
--password TEXT The tenyks
password
--workspace_name TEXT The tenyks
workspace name
--default_task_type [object_detection]
Enter tenyks
default task
type
--help Show this
message and
exit.
tenyks configure-aws
tenyks configure-aws
This command allows you to set up your AWS S3 credentials.
Usage: tenyks configure-aws [OPTIONS]
Options:
--access_key TEXT AWS access key
--secret_key TEXT AWS secret key
--region TEXT S3 region
--help Show this message and exit.
Data Preparation
tenyks convert-annotations
tenyks convert-annotations
The goal of this command is to help you transform annotations from an input_format
to an output_format
.
Usage: tenyks convert-annotations
[OPTIONS]
Options:
--annotations TEXT The path to
image
annotations.
--input_format [coco|vott_csv|yolo|deepstream|classification]
--output_format [coco]
--images TEXT The path to
image folder.
--class_names TEXT The path to
class names
file.
--help Show this
message and
exit.
tenyks convert-predictions
tenyks convert-predictions
Similar to the command above, this command allows you to transform predictions from an input_format
to an output_format
.
Usage: tenyks convert-predictions
[OPTIONS]
Options:
--predictions TEXT The path to
image
predictions.
--input_format [coco|vott_csv|yolo|deepstream|classification]
--output_format [coco]
--images TEXT The path to
image folder.
--class_names TEXT The path to
class names
file.
--help Show this
message and
exit.
Dataset Upload
tenyks dataset-create
tenyks dataset-create
This command allows you to create a dataset.
Usage: tenyks dataset-create [OPTIONS]
Options:
--name TEXT The name of the
dataset to be
created.
--images TEXT The path to
image folder.
--annotations TEXT The path to
image
annotation.
--annotations_format [coco|vott_csv|yolo|deepstream|classification]
The annotation
file type.
--class_names TEXT The path to
class names
file.
--max_concurrent_uploads INTEGER
Number of
concurrent
uploads.
--verbose Verbose flag.
--s3_images_uri TEXT Images bucket
uri
--s3_metadata_uri TEXT Metadata bucket
uri
--aws_access_key_id TEXT AWS access key
id
--aws_secret_access_key TEXT AWS secret
access key
--aws_region TEXT AWS region
--help Show this
message and
exit.
tenyks dataset-images-upload
tenyks dataset-images-upload
After creating a dataset (see above command), this command helps us upload our raw images.
Usage: tenyks dataset-images-upload
[OPTIONS]
Options:
--dataset_key TEXT The key/ id of
dataset that has
been created.
--images TEXT The path to
image folder.
--max_concurrent_uploads INTEGER
Number of
concurrent
uploads.
--verbose Verbose flag.
--help Show this
message and
exit.
tenyks dataset-annotations-upload
tenyks dataset-annotations-upload
We can upload our dataset annotations using this command.
Usage: tenyks dataset-annotations-upload
[OPTIONS]
Options:
--dataset_key TEXT The key/ id of
dataset that has
been created.
--annotations TEXT The path to
image
annotation.
--format [coco|vott_csv|yolo|deepstream|classification]
Enter annotation
file type
--images TEXT The path to
image folder.
--class_names TEXT The path to the
class names
file.
--help Show this
message and
exit.
tenyks dataset-class-names-upload
tenyks dataset-class-names-upload
After you have uploaded your images with dataset-images-upload
and your annotations dataset-annotations-upload
, this command helps you define the classes of your dataset.
Usage: tenyks dataset-class-names-upload
[OPTIONS]
Options:
--dataset_key TEXT The key/ id of dataset that
has been created.
--class_names TEXT The path to class names
file.
--help Show this message and exit.
Model Upload
tenyks model-create
tenyks model-create
With this command we can create a model.
Usage: tenyks model-create [OPTIONS]
Options:
--name TEXT The name of the
model to be
created.
--dataset_key TEXT The key/ id of
dataset that has
been created.
--predictions TEXT The path to
model
prediction.
--predictions_format [coco|vott_csv|yolo|deepstream|classification]
The predictions
file type.
--images TEXT The path to
image folder.
Required for
some predictions
formats
--iou_threshold FLOAT RANGE IoU threshold
for model
prediction.
[0<=x<=1]
--confidence_threshold FLOAT RANGE
Confidence
threshold for
model
prediction.
[0<=x<=1]
--class_names TEXT The path to
class names
file.
--help Show this
message and
exit.
tenyks model-predictions-upload
tenyks model-predictions-upload
Having created a model, we can upload the model's predictions with this command.
Usage: tenyks model-predictions-upload
[OPTIONS]
Options:
--dataset_key TEXT The key/ id of
dataset that has
been created.
--model_key TEXT The key/ id of
model that has
been created.
--predictions TEXT The path to
prediction.
--format [coco|vott_csv|yolo|deepstream|classification]
The prediction
file type.
--images TEXT The path to
image folder.
Required for
some predictions
formats
--class_names TEXT The path to
class names
file.
--help Show this
message and
exit.
Embeddings Upload
tenyks image-embedding-upload
tenyks image-embedding-upload
This command allows us to upload embeddings for our images.
Usage: tenyks image-embedding-upload
[OPTIONS]
Options:
--dataset_key TEXT The key/ id of
dataset that has
been created.
--embeddings TEXT The path to
activations
folder.
--embedding_name TEXT A name for the
embeddings which
will be visible
in the UI
--max_concurrent_uploads INTEGER
Number of
concurrent
uploads.
--verbose Verbose flag.
--help Show this
message and
exit.
tenyks annotation-bbox-embedding-upload
tenyks annotation-bbox-embedding-upload
This command enables the uploading of embeddings for our bounding box annotations.
Usage: tenyks annotation-bbox-embedding-upload
[OPTIONS]
Options:
--dataset_key TEXT The key/ id of
dataset that has
been created.
--embeddings TEXT The path to
activations
folder.
--embedding_name TEXT A name for the
embeddings which
will be visible
in the UI
--max_concurrent_uploads INTEGER
Number of
concurrent
uploads.
--verbose Verbose flag.
--help Show this
message and
exit.
tenyks prediction-bbox-embedding-upload
tenyks prediction-bbox-embedding-upload
With this command we can upload embeddings for our bounding box predictions.
Usage: tenyks prediction-bbox-embedding-upload
[OPTIONS]
Options:
--dataset_key TEXT The key/ id of
dataset that has
been created.
--model_key TEXT The id of the
model for which
these embeddings
belong.
--embeddings TEXT The path to
activations
folder.
--embedding_name TEXT A name for the
embeddings which
will be visible
in the UI
--max_concurrent_uploads INTEGER
Number of
concurrent
uploads.
--verbose Verbose flag.
--help Show this
message and
exit.
Updated about 1 year ago
Dive into the process of beginning your interaction with the Ternyks CLI