Skip to main content

The official Python SDK for FastLabel API, the Data Platform for AI

Project description

FastLabel Python SDK

Installation

$ pip install fastlabel

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
from fastlabel.const import AnalysisType

# Initialize client
client = fastlabel.Client()

# Create predictions
const predictions = [
    {
        fileKey="sample1.jpg",  # file name exists in project
        labels=[
            {
                "value": "line_a",  # class value exists in 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=AnalysisType.line,    # annotation type to be analyze
    threshold=20,   # 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

fastlabel-0.1.0-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page