ultralytics / hub-sdk

SDK for Ultralytics HUB
GNU Affero General Public License v3.0
15 stars 2 forks source link


Ultralytics logo

šŸš€ Ultralytics HUB-SDK

HUB-SDK CI codecov Discord

Welcome to the Ultralytics HUB-SDK documentation! šŸ“– Our aim is to guide you through the installation process and help you get started with using HUB-SDK for your machine learning endeavors.

šŸ›  Quickstart: Installing HUB-SDK

Ready to dive into HUB-SDK? Follow these steps to set it up on your machine.

Prerequisites

Ensure you have the following requirements met before proceeding:

Installation Methods

Choose from the following options to install HUB-SDK:

Installing from PyPI

PyPI version Downloads

For the latest stable release of HUB-SDK, use PyPI by running the following command:

pip install hub-sdk

šŸš€ Usage

Let's begin using the HUB-SDK to perform CRUD operations for Models, Datasets, and Projects.

1. Import HUB-SDK

Start by importing the HUBClient from the hub_sdk module with from hub_sdk import HUBClient.

2. Authenticate with Credentials

Set your credentials using one of the following methods:

Using API Key
# Authenticate using an API key
credentials = {"api_key": "YOUR_API_KEY"}

or

Using Email and Password
# Authenticate using your email and password
credentials = {"email": "YOUR_EMAIL", "password": "YOUR_PASSWORD"}

3. Initialize the HUBClient

With your credentials ready, initialize the HUBClient:

from hub_sdk import HUBClient

# Initialize the client with your credentials
client = HUBClient(credentials)

Operations

Below are code snippets demonstrating create, read, update, and delete (CRUD) operations for Projects, Models, and Datasets.

Project Operations

Managing projects is simple:

# Manipulate a project with the given ID
project = client.project("PROJECT_ID")

# Create a new project with the specified data
create_project = project.create_project("PROJECT_DATA")

# Update the existing project with new data
update_project = project.update("UPDATE_DATA")

# Delete the project
deleted_project = project.delete()

Model Operations

Handle models effortlessly:

# Engage with a model using the given ID
model = client.model("MODEL_ID")

# Create a new model providing the necessary data
create_model = model.create_project("MODEL_DATA")

# Update the model using provided data
update_model = model.update("UPDATE_DATA")

# Remove the model from the system
deleted_model = model.delete()

Dataset Operations

Datasets operations are straightforward:

# Interact with a dataset using the specified ID
dataset = client.dataset("DATASET_ID")

# Establish a new dataset given the data
create_dataset = dataset.create_project("DATASET_DATA")

# Adjust the dataset with updated information
update_dataset = dataset.update("UPDATE_DATA")

# Erase the dataset
deleted_dataset = dataset.delete()

šŸš€ Ultralytics HUB

Experience seamless AI with Ultralytics HUB ā­, the all-in-one solution for data visualization, YOLOv5 and YOLOv8 šŸš€ model training and deployment, without any coding. Transform images into actionable insights and bring your AI visions to life with ease using our cutting-edge platform and user-friendly Ultralytics App. Start your journey for Free now!

Ultralytics HUB preview image

šŸ’” Contribute

We're thrilled to have you contribute to Ultralytics' open-source projects! Your support and contributions make a world of difference. Get involved by checking out our Contributing Guide, and share your feedback through our Survey. A massive thank you šŸ™ to everyone who contributes!

Ultralytics open-source contributors

šŸ“„ License

Ultralytics provides two types of licensing options:

šŸ¤ Contact


Ultralytics GitHub space Ultralytics LinkedIn space Ultralytics Twitter space Ultralytics YouTube space Ultralytics TikTok space Ultralytics BiliBili space Ultralytics Discord