The official Python SDK for Trainingset.ai.
Project description
Trainingset.ai Python SDK
Install
pip install trainingsetai
Import and Initialize a client session
from trainingsetai import TrainingsetClient
client = TrainingsetClient("api_key")
Methods
You can use any parameters from the documentation available here.
Tasks
Get tasks
You can load the tasks with get_tasks
method:
client.get_tasks({
"limit": 1
})
Create tasks
There is a method for each task type and it's very straightforward:
annotation_task = {
"attachment_url": "http://placekitten.com/1920/1080",
"instructions": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"objects_to_annotate": [{"label": "test", "color": "rgba(0, 0, 0, 0)"}]
}
client.create_box_annotation_task(annotation_task)
client.create_line_annotation_task(annotation_task)
client.create_point_annotation_task(annotation_task)
client.create_polygon_annotation_task(annotation_task)
client.create_segmentation_task(annotation_task)
client.create_point_cloud_annotation_task(annotation_task)
categorization_task = {
"attachment_url": "http://placekitten.com/1920/1080",
"instructions": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"categories": ["category1", "category2"]
}
client.create_image_categorization_task(categorization_task)
Projects
Managing projects is also a straightforward process:
client.get_projects()
client.create_project("test_project")
client.delete_project("project_id")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
trainingsetai-0.0.1.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for trainingsetai-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3a9ff413c70ae2802ef6a7204152d693b6199ca531d18875e2a985948302194 |
|
MD5 | 082bffd7e91d524813fcce7aad444d9a |
|
BLAKE2b-256 | 59e1cfdf225fd6c17a4411cb00b9d7f5560c0daa363e7fca134ba2985abc9e96 |