Export to Kili format
Code Reference
See the code reference for further details.
Compatibility
Export to Kili format is available for:
- Project type Bounding Box (
iat-rectangle) - Project type Polygon (
iat-polygon) - Project type Polyline (
iat-polyline) - Project type Graph (
iat-graph) - Project type Segmentation (
iat-segmentation) - Project type Data processing (
form) with input type:- Bounding Box (
tool-iat-rectangle) - Polygon (
tool-iat-polygon) - Polyline (
tool-iat-polyline) - Graph (
tool-iat-graph) - Segmentation (
tool-iat-segmentation)
- Bounding Box (
For Data processing project
The SDK will try to detect the input compatible with the export.
If more than one input is compatible, you must provide the input_id parameter to select the input to export.
Output
JSON file
Info
You can also set the in_memory parameter to True to make the export_tasks() function return the result as Iterable[Dict]
Usage
from isahitlab.client import IsahitLab
lab = IsahitLab()
lab.export_tasks(project_id="<project_id>", format="yolo")
You can filter the tasks with the same parameters than you can use to get tasks.
from isahitlab.client import IsahitLab
lab = IsahitLab()
lab.export_tasks(project_id="<project_id>",
format="kili",
batch_id_in=["<batch_id>"],
status_in=["complete", "reviewed"],
updated_at_gte="2024-12-25 00:00:00"
)
Use output_folder and / or output_filename to choose where to save the results.
from isahitlab.client import IsahitLab
lab = IsahitLab()
lab.export_tasks(project_id="<project_id>",
format="kili",
output_folder="./output",
output_filename="my-export.json"
)
Output name
If you set the output_filename parameter, it must end with .json
Directory tree
The SDK will automatically create the folder tree if you set an output_folder like output/my_outputs/<project_id>