The official Python SDK for FastLabel API, the Data Platform for AI
Project description
FastLabel Python SDK
Installation
$ pip install --upgrade fastlabel
Python version 3.8 or greater is required
Usage
Configure API Key in environment variable.
export FASTLABEL_API_KEY="YOUR_API_KEY"
Initialize fastlabel client.
import fastlabel
client = fastlabel.Client()
Model Analysis
Upload Predictions
import fastlabel
# Initialize client
client = fastlabel.Client()
# Create predictions
predictions = [
{
"fileKey": "sample1.jpg", # file name exists in your project
"labels": [
{
"value": "line_a", # class value exists in your project
"points": [
{ "x": 10, "y": 10 },
{ "x": 20, "y": 20 },
]
},
{
"value": "line_b",
"points": [
{ "x": 30, "y": 30 },
{ "x": 40, "y": 40 },
]
}
]
}
]
# Upload predictions
client.upload_predictions(
project_id="project_id", # your fastlabel project id
analysis_type="line", # annotation type to be analyze ("bbox" or "line" are supported)
threshold=25, # IoU percentage/pixel to analyze labels. (Ex: 0 - 100)
predictions=predictions
)
API Docs
Check this for further information.
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
fastlabel-0.1.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for fastlabel-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8edc7b9f1aba8e2c8022753cab893f497da677d5d730f5ca35a769dadd32dd3 |
|
MD5 | 868a5694dd2434dc280deecd02a0aa01 |
|
BLAKE2b-256 | 09d0da110b31672a02734a5399a46d13c90f879ec64d67969b544459d05d2672 |