2021-01-22

New Features

Updating Label Class Maps

Label Class Maps have been usually immutable once attached or created for a Project. Most changes to the existing Labels cause all sorts of issues in metrics calculations for existing Dataset or Inference Set.

Now, we support append-only updates to Label Class Maps.

Before, your code would look like below...

import aquariumlearning as al
label_class_map = al.LabelClassMap(entries=[
    al.ClassMapEntry(name="car", class_id=0),
    al.ClassMapEntry(name="van", class_id=1),
    al.ClassMapEntry(name="truck", class_id=2)
])

al_client = al.Client()

if not al_client.project_exists(aquarium_project):
    print("Creating Project")
    al_client.create_project(aquarium_project, label_class_map)

Now, we can update the Label Class Map by calling create_project on an existing project with the new Label Class Map

import aquariumlearning as al
label_class_map = al.LabelClassMap(entries=[
    al.ClassMapEntry(name="car", class_id=0),
    al.ClassMapEntry(name="van", class_id=1),
    al.ClassMapEntry(name="truck", class_id=2),
    al.ClassMapEntry(name="pedestrian", class_id=3) # New APPEND-ONLY Label Class
])

al_client = al.Client()

print("Updating Project")
al_client.create_project(aquarium_project, label_class_map)

As a reminder, this update flow will only support append-only changes.

Additional Client-side Checks

We've added error checking for a few common issues encountered in the data processing pipeline. These errors would usually take ~10 minutes to surface since they are part of the batched processing step. We now added an option to check for common error cases on the first frame locally before submitting, which should surface errors in seconds.

To enable, run create_dataset with check_first_frame=True. This will check for errors, then exit without creating the dataset.

al_client.create_dataset(
    aquarium_project, aquarium_dataset, dataset=dataset,
    wait_until_finish=True, embedding_distance_metric='cosine',
    check_first_frame=True
)

Specifically, this checks the accessibility of image URLs from Aquarium servers as well as your local machine.

  1. If the URL is formatted incorrectly, not a GS, HTTP, or HTTPS URL, returns an "invalid URL" error.

  2. If the URL is valid but inaccessible from both, it will return an "inaccessible URL" error.

  3. If the URL is valid, but accessible only from the local client, anonymous mode is assumed. In anonymous mode, Aquarium does not have access to the raw images, so we cannot compute embeddings. If no embeddings are provided, we return an error.

Hopefully, this will help speed up iteration on data integration!

App Improvements

Last updated