Projections

1. Use-case

Projections have been built with multimodality and multi-layer data in mind; it is particularly useful for handling images with a specific or non-trivial extension (ex: HDF5, TIFF...).

🚧

Projections are only available for images. Videos are not supported.

For example, let's say that you want to detect objects on a conveyor belt, and to achieve this, you have one camera that simultaneously captures an RGB image and an infrared image.

We will assume that these two images might have different dimensions, although they have the same aspect ratio.

As you can only "see" the RGB copy of the image, that's the one you are going to annotate, but maybe you want to train your model using those annotations and the infrared images?

You could even want to visualize a "transformed" copy of your infrared image by remapping the channels in the RGB space (just like we do with satellite images).

This is where Projections are useful; this is the system that allows you to link several visualizations of the same Data together, so you can, for example, switch between them during annotation, or from the Data panel of the Details view.

Each Data always has its main file related, and then this Data can have as many Projections as you want, knowing that each Projection must have a name.

Visualizing Projections of a given Data

🚧

You will only see the Projections that are "visualizable" (e.g. in the RGB space), but other Projections still exist and are attached to the original Data

📘

Projection display in the Grid view

You can register Projection names at the Organization level so they're proposed by default in your data grids, detailed here. Any name is available except "RGB", which is reserved by Picsellia. This must be done from the Organization Settings in the Projection Names tab.

Register a Projection name at the Organization level

As soon as the Projection name is registered at the Organization level you'll be able to select the Projection name to use in the Grid view using the Showing button, this works across any data visualization places across the Picsellia platform.

Showing a given Projection in the Grid view

Please also note that registering a Projection name at the Organization level only aims at enabling the Projection switch in the Grid view, it is not blocking or mandatory at all to use the Projection system.


🚧

Projection dimensions

Please note that if the dimensions of the Projections are not the same as the main image, the annotation will be blocked on the Projections with different dimensions.

2. Create a Projection

A. Manually using the SDK

The simplest and most flexible way to create a Projection is using our Python SDK.

The process looks like this

from picsellia import Client

client = Client()

datalake = client.get_datalake()
data = datalake.upload_data("my_NIR_data.tiff")

datalake.create_projection(data, name="RGB", path="my_rgb_data.jpg")

And that's it! You will now be able to access your RGB data once in the annotation tool, but retrieve the NIR data for training ✅

💡

We can also link your original Data to a file that is already in your Cloud Storage, you would only have to provide the object-name of this file and its dimension.

from picsellia.types.schemas import CloudObject, CloudProjectionObject

datalake = client.get_datalake()
datalake.import_cloud_projections(
    cloud_projections={
        "/bucket/path/object-1.jpg": [
            {
                "name": "view",
                "object_name": "/bucket/path/object-1-projection.jpg",
            }
        ],
        "/bucket/path/object-2.jpg": [
            CloudProjectionObject(
                name="pr1",
                object_name="/bucket/path/object-2-projection.jpg",
            )
        ],
    }
)

B. Automatically when uploading Data

When working with non-RGB Data, there is often a simple transform that can allow you to convert it to an RGB copy.

The code responsible for this transform can be integrated into the platform by our team, so it is executed automatically when you upload the Data.

This way you don't have to compute and upload the Projection yourself.

📘

This is what we do to compute the small thumbnails of your RGB images that you see everywhere in the platform (they actually are an RGB Projection of your Data)


Did this page help you?