kili
Kili Command line Interface
To get all the available commands, please type: kili project --help
.
Usage:
kili [OPTIONS] COMMAND [ARGS]...
Options:
Name | Type | Description | Default |
---|---|---|---|
--version |
boolean | Show the version and exit. | False |
--help |
boolean | Show this message and exit. | False |
project
Commands to interact with a Kili project
Usage:
kili project [OPTIONS] COMMAND [ARGS]...
Options:
Name | Type | Description | Default |
---|---|---|---|
--help |
boolean | Show this message and exit. | False |
create
Create a Kili project
interface must be a path pointing to your json interface file
If no interface is provided, --from-project can be used to create a new project with the json_interface of another project (assets will not be copied).
Examples
kili project create \
path/to/interface.json \
--input-type TEXT \
--title "Invoice annotation project"
kili project create \
--from-project <project_id_src> \
--input-type TEXT \
--title "Invoice annotation project"
To build a Kili project interface, please visit:
https://docs.kili-technology.com/docs/customizing-the-interface-through-json-settings
Usage:
kili project create [OPTIONS] [INTERFACE]
Options:
Name | Type | Description | Default |
---|---|---|---|
--api-key |
text | Your Kili API key. | None |
--endpoint |
text | Kili API Endpoint. | None |
--from-project |
text | project_id of another Kili project | None |
--title |
text | Project Title. | _required |
--input-type |
choice (AUDIO | IMAGE | PDF | TEXT | TIME_SERIES | VIDEO | VIDEO_LEGACY ) |
Project input data type. Please check your license to see which ones you have access to. | _required |
--description |
text | Project description. | `` |
--stdout-format |
text | Defines how the output table is formatted (see https://pypi.org/project/tabulate/, default: plain). | plain |
--help |
boolean | Show this message and exit. | False |
describe
Show project description and analytics.
Examples
kili project describe --project-id <project_id>
Usage:
kili project describe [OPTIONS] PROJECT_ID
Options:
Name | Type | Description | Default |
---|---|---|---|
--api-key |
text | Your Kili API key. | None |
--endpoint |
text | Kili API Endpoint. | None |
--help |
boolean | Show this message and exit. | False |
export
Export the Kili labels of a project to a given format.
The supported formats are: - YOLO V4, V5, V7 for object detection tasks (bounding box). - Kili (a.k.a raw) for all tasks. - COCO for object detection tasks (semantic or bounding box) - Pascal VOC (coming soon) for object detection tasks.
Examples
kili project export \
--project-id <project_id> \
--output-format coco \
--output-file /tmp/export.zip
kili project export \
--project-id <project_id> \
--output-format yolo_v5 \
--output-file /tmp/export_split.zip \
--layout split
Unsupported exports
Currently, this command does not support the export of videos that have not been cut into separated frames.
For such exports, please use the Kili UI.
Usage:
kili project export [OPTIONS]
Options:
Name | Type | Description | Default |
---|---|---|---|
--output-format |
choice (raw | kili | yolo_v4 | yolo_v5 | yolo_v7 | coco ) |
Format into which the label data will be converted | _required |
--output-file |
text | File into which the labels are saved. | _required |
--layout |
choice (split | merged ) |
Layout of the label files | merged |
--single-file |
boolean | Layout of the label files | False |
--api-key |
text | Your Kili API key. | None |
--endpoint |
text | Kili API Endpoint. | None |
--project-id |
text | Id of the project | _required |
--verbose |
boolean | Show more logs | False |
--help |
boolean | Show this message and exit. | False |
import
Add assets into a project
Files can be paths to files or to folders. You can provide several paths separated by spaces.
If no Files are provided, --from-csv can be used to import assets from a CSV file with two columns:
external_id
: external id of the asset.content
: paths to the asset file or a url hosting the asset.
Examples
kili project import \
dir1/dir2/ dir1/dir3/test1.png \
--project-id <project_id>
kili project import \
dir1/dir3/video.mp4 \
--project-id <project_id> \
--frames \
--fps 24
kili project import \
--from-csv assets_list.csv \
--project-id <project_id> \
--frames \
--fps 24
Unsupported imports
Currently, this command does not support:
- the import of videos from local frames, rich text and time series assets
- the import of assets with metadata or with a custom external_id
For such imports, please use the append_many_to_dataset
method in the Kili SDK.
Usage:
kili project import [OPTIONS] [FILES]...
Options:
Name | Type | Description | Default |
---|---|---|---|
--api-key |
text | Your Kili API key. | None |
--endpoint |
text | Kili API Endpoint. | None |
--project-id |
text | Id of the project | _required |
--from-csv |
path | path to a csv file with required columns:external_id, content required columns: | None |
--frames |
boolean | Only for a frame project, import videos as frames. The import time is longer with this option. | False |
--fps |
integer | Only for a frame project, import videos with a specific frame rate | None |
--verbose |
boolean | Show more logs | False |
--help |
boolean | Show this message and exit. | False |
label
Import labels or predictions
Files can be paths to files or to folders. You can provide several paths separated by spaces. The labels to import have to be in the Kili format and stored in a json file. File's name must be equal to asset's external_id.
If no files are provided, --from-csv can be used to import assets from a CSV file with two columns:
label_asset_external_id
: external id for which you want to import labels.label_asset_id
: asset id for which you want to import labels (mutual exclusive with the field above, and not available for predictions)path
: paths to the json files containing the json_response to upload.
Additional columns can be provided in the CSV file, see .append_labels
in the Python client
documentation:
- label_type
- seconds_to_label
- author_id
CSV file template for the raw Kili format
label_asset_external_id,path
asset1,./labels/label_asset1.json
asset2,./labels/label_asset2.json
CSV file template for a Yolo format
label_asset_external_id,path
asset1,./labels/label_asset1.txt
asset2,./labels/label_asset2.txt
Examples
To import default labels:
kili project label \
dir1/dir2/ dir1/dir3/test1.json \
--project-id <project_id>
kili project label \
--from-csv path/to/file.csv \
--project-id <project_id>
kili project label \
--from-csv path/to/file.csv \
--project-id <project_id> \
--prediction \
--model-name YOLO-run-3
kili project label \
--from-csv path/to/file.csv \
--project-id <project_id> \
--prediction \
--model-name YOLO-v5 \
--metadata-file classes.yml \
--target-job IMAGE_DETECTION_JOB \
--input-format yolo_v5
Usage:
kili project label [OPTIONS] [FILES]...
Options:
Name | Type | Description | Default |
---|---|---|---|
--api-key |
text | Your Kili API key. | None |
--endpoint |
text | Kili API Endpoint. | None |
--from-csv |
path | path to a csv file with required columns:external_id, json_response_path required columns: | None |
--project-id |
text | Id of the project | _required |
--prediction |
boolean | Tells to import labels as predictions, which means that they will appear as pre-annotations in the Kili interface | False |
--model-name |
text | Name of the model that generated predictions, if labels are sent as predictions | None |
--verbose |
boolean | Show more logs | False |
--input-format |
choice (yolo_v4 | yolo_v5 | yolo_v7 | kili | raw ) |
Format in which the labels are encoded | kili |
--metadata-file |
text | File containing format metadata (if relevant to the input format) | None |
--target-job |
text | Job name in the project where to upload the labels (if relevant to the input format) | None |
--help |
boolean | Show this message and exit. | False |
list
List your projects
Examples
kili project list --max 10 --stdout-format pretty
Usage:
kili project list [OPTIONS]
Options:
Name | Type | Description | Default |
---|---|---|---|
--api-key |
text | Your Kili API key. | None |
--endpoint |
text | Kili API Endpoint. | None |
--stdout-format |
text | Defines how the output table is formatted (see https://pypi.org/project/tabulate/, default: plain). | plain |
--max |
integer | Maximum number of project to display. | 100 |
--help |
boolean | Show this message and exit. | False |
member
Commands to interact with Kili project members
Usage:
kili project member [OPTIONS] COMMAND [ARGS]...
Options:
Name | Type | Description | Default |
---|---|---|---|
--help |
boolean | Show this message and exit. | False |
add
Add members to a Kili project
Emails can be passed directly as arguments. You can provide several emails separated by spaces.
Examples
kili project member add \
--project-id <project_id> \
--role REVIEWER \
john.doe@test.com jane.doe@test.com
kili project member add \
--project-id <project_id> \
--from-csv path/to/members.csv
kili project member add \
--project-id <project_id> \
--from-project <project_id_scr>
Usage:
kili project member add [OPTIONS] [EMAILS]...
Options:
Name | Type | Description | Default |
---|---|---|---|
--api-key |
text | Your Kili API key. | None |
--endpoint |
text | Kili API Endpoint. | None |
--project-id |
text | Id of the project | _required |
--role |
choice (ADMIN | TEAM_MANAGER | REVIEWER | LABELER ) |
Project role of the added user(s). | None |
--from-csv |
path | path to a csv file with required columns:email required columns: role | None |
--from-project |
text | project_id of another Kili project | None |
--help |
boolean | Show this message and exit. | False |
list
List the members of the project
Examples
kili project member list <project_id> --stdout-format pretty
Usage:
kili project member list [OPTIONS] PROJECT_ID
Options:
Name | Type | Description | Default |
---|---|---|---|
--api-key |
text | Your Kili API key. | None |
--endpoint |
text | Kili API Endpoint. | None |
--stdout-format |
text | Defines how the output table is formatted (see https://pypi.org/project/tabulate/, default: plain). | plain |
--help |
boolean | Show this message and exit. | False |
rm
Remove members from a Kili project
Emails can be passed directly as arguments. You can provide several emails separated by spaces.
Examples
kili project member rm \
--project-id <project_id> \
john.doe@test.com
kili project member rm \
--project-id <project_id> \
--from-csv path/to/members.csv
kili project member rm \
--project-id <project_id> \
--all
Usage:
kili project member rm [OPTIONS] [EMAILS]...
Options:
Name | Type | Description | Default |
---|---|---|---|
--api-key |
text | Your Kili API key. | None |
--endpoint |
text | Kili API Endpoint. | None |
--project-id |
text | Id of the project | _required |
--from-csv |
path | path to a csv file with required columns:email required columns: role | None |
--all |
boolean | Remove all users from project | False |
--help |
boolean | Show this message and exit. | False |
update
Update member's role of a Kili project
Emails can be passed directly as arguments. You can provide several emails separated by spaces.
Examples
kili project member update\
--project-id <project_id> \
--role REVIEWER \
john.doe@test.com
kili project member update \
--project-id <project_id> \
--from-csv path/to/members.csv
kili project member update \
--project-id <project_id> \
--from-project <project_id_scr>
Usage:
kili project member update [OPTIONS] [EMAILS]...
Options:
Name | Type | Description | Default |
---|---|---|---|
--api-key |
text | Your Kili API key. | None |
--endpoint |
text | Kili API Endpoint. | None |
--project-id |
text | Id of the project | _required |
--role |
choice (ADMIN | TEAM_MANAGER | REVIEWER | LABELER ) |
Project role of the added user(s). | None |
--from-csv |
path | path to a csv file with required columns:email required columns: role | None |
--from-project |
text | project_id of another Kili project | None |
--help |
boolean | Show this message and exit. | False |