๐Ÿ“œ
Developer Documentation
  • ๐Ÿ‘‹EyePop.ai Introduction
  • ๐ŸŽฏGetting Started
    • ๐Ÿ‘จโ€๐Ÿ’ปPop Quick Start
    • ๐Ÿ’ชLow Code Examples
  • ๐Ÿ—๏ธAPI Key
  • ๐Ÿท๏ธFinding People & Objects
  • SDKs
    • โ˜๏ธReact/Node SDK
      • Render 2D (Visualization)
    • ๐ŸPython SDK
  • Self Service Training
    • Dataset SDK (Node)
    • ๐Ÿ‹๏ธHow To Train a Model
      • Defining Your Computer Vision Model
      • Example Use Case: Detecting Eyeglasses
      • Preparing & Uploading Data
      • Using EyePop.aiโ€™s AutoLabeler
      • Human Review
      • Data Augmentation Setup
      • Training in Progress
      • Deployment
        • Deploy to Windows Runtime
      • Previewing Results
      • Iterative Training
      • Deep Dives (FAQ)
  • EyePop.ai Visual Intelligence
    • Reports
Powered by GitBook
On this page
  • ๐Ÿ”ง Getting Started
  • ๐Ÿ“ฆ Dataset Creation
  • ๐Ÿ–ผ๏ธ Asset Upload
  • ๐Ÿท๏ธ Asset Labeling
  • ๐ŸŽ›๏ธ Augmentation Configuration (Optional)
  • ๐Ÿš€ Start Model Training
  1. Self Service Training

Dataset SDK (Node)

This guide walks through the programmatic steps to build and train a model using the EyePop.ai Node SDK. Youโ€™ll learn how to create a dataset, upload and label assets, configure augmentations, and launch trainingโ€”all using API calls.

๐Ÿ”ง Getting Started

EyePop.ai offers a Node SDK to make it easy to work with datasets, assets, annotations, and model training.

Install the SDK:

npm install --save @eyepop.ai/eyepop

Initialize the SDK:

import { EyePopClient } from '@eyepop.ai/eyepop';

const client = new EyePopClient({ apiKey: 'YOUR_API_KEY' });

๐Ÿ“ฆ Dataset Creation

A dataset acts as the core container for your modelโ€™s training data. It defines the type of model youโ€™re training (object or classification) and includes the labels youโ€™ll be teaching it to recognize.

Example:

const dataset = await client.createDataset(
  'Accessories Demo',
  ['eye glasses', 'handbag', 'earrings', 'shoes'], // Labels
  ['object'] // Tags: 'object' for object detection, 'classification' for classification
);

๐Ÿ–ผ๏ธ Asset Upload

You can upload image files to your dataset. These are the raw assets that will be labeled and used during model training.

Example:

const result = await client.uploadAsset(datasetUUID, datasetVersion, file, file.name);
console.log(result.uuid); // Uploaded asset's UUID

๐Ÿท๏ธ Asset Labeling

There are two primary ways to label data:

1. Classification

Assign a single label to the entire image.

Example:

const classificationLabel = {
  type: 'ground_truth',
  user_review: 'approved',
  annotation: {
    source_width: 1024,
    source_height: 768,
    classes: [
      { classLabel: 'eye glasses' },
    ]
  }
};

await client.updateAssetGroundTruth(assetUUID, datasetUUID, datasetVersion, classificationLabel)

2. Object Detection

Label specific regions within the image using bounding boxes.

Example:

const objectDetectionLabel = {
  type: 'ground_truth',
  user_review: 'approved',
  annotation: {
    source_width: 1024,
    source_height: 768,
    objects: [
      {
        classLabel: 'handbag',
        x: 100, 
        y: 150, 
        width: 200, 
        height: 100
      }
    ]
  }
};

await client.updateAssetGroundTruth(assetUUID, datasetUUID, datasetVersion, objectDetectionLabel);

โš ๏ธ Auto-labeling is currently managed internally and is not exposed via API at this time.


๐ŸŽ›๏ธ Augmentation Configuration (Optional)

Before training, you can configure augmentation parameters like confidence threshold and candidate labels. This helps the model generalize better to new data.

Example:

const augmentationIntent = {
         "noise_level": "small",
         "upside_down_ok": true,
         "color_important": true,
         "exists_outdoors": false,
         "weather_allowed": false,
         "rotation_allowed": "medium",
         "occlusion_allowed": false,
         "camera_motion_important": false
}         

๐Ÿš€ Start Model Training

Once your dataset is ready and labeled, kick off model training. EyePop.ai will automatically choose the appropriate model type (object detection or classification) based on the dataset tags.

Example:

const modelData = {
  name: "Accessory Model",
  description: "This is my new model",
  task: 'object_detection', // or 'image_classification'
  pretrained_model_uuid: pretrainedModelUUID, // optional model to start training from - useful for iterative training
  extra_params: {
    trainer: {
      preprocessor: {
        augment_intent: { } // your selected augmentations
      }
    }
  }
};

const model = await client.createModel(datasetUUID, datasetVersion, modelData, true);
console.log(model.uuid); // New model UUID

PreviousPython SDKNextHow To Train a Model

Last updated 26 days ago