Labelbox documentation

Other resources

How to use QGIS to convert GeoTIFF to image tiles

If you have GeoTIFF files that you would like to import and label, you will need to convert them into XYZ tiles first.

To generate XYZ image tiles using the QGIS tool, follow these steps:

  1. Download and install QGIS.

  2. Open QGIS. From the Plugins menu at the top, install Lat Lon Tools.

  3. Open your GeoTIFF file in QGIS. The easiest way to do this is to find the file Finder or Explorer, right-click on the image, and select open with QGIS.

  4. From the Processing menu at the top, click Toolbox. This will open the Processing toolbox panel.

  5. In the Processing Toolbox, search for Generate XYZ tiles (Directory) and double click to open the Generate XYZ tiles window.

  6. Ensure the entire TIFF image showing in the view panel.

  7. In the Generate XYZ Tiles (Directory) window, do the following:

    1. For Extent, choose Use Map Canvas Extent.

    2. Select the Minimum zoom and Maximum zoom. We suggest starting with values of min: 10 and max: 20. depending on the size of your image, this may need to be adjusted and re-tiled.

    3. For Tile format, choose PNG.

    4. Select your Output directory and Output html directory.

    5. Select Run to process your tiles.

  8. Upload your image files to a cloud environment (AWS S3, Google Cloud Services, etc). Upload all necessary folders corresponding to zoom levels.

  9. Create your import file. See the sections below for sample JSON imports.

  10. If you choose to secure your URLs with IP whitelisting, make sure to include the Labelbox backend (35.223.142.181) so the image tiles can be rendered in the Editor. Contact Labelbox support for additional information on IP whitelisting.

  11. Go to app.labelbox.com/new-data and drag and drop your JSON file to import.

How to view video Labels in Postman

When you export your Labels, the export will contain a Label element for each video in the project. Each Label will contain a URL to an NDJSON file containing the information for the labeled frames in that video.

An easy way to access your video frame labels is in the Postman UI.

Steps:

  1. Open Postman and create a new basic API request.

  2. Copy the URL for frames and paste it as the request URL.

  3. Go to the Headers tab.

  4. Select Authorization as the key.

  5. Paste your API key as the Authorization value.

  6. Click send.

To access the URL containing the information for the labeled frames, place your API key in the authorization header. To see an example, see the authentication docs in our GraphQL section.

The endpoint this URL points to may return an HTTP 301 response. If this happens, the HTTP response will contain a Location header with the download URL.

If the label is skipped and has no data, the endpoint will return an HTTP 204 response.

"Label": {
    "frames": "<URL-TO-NDJSON-FILE>"
}

Bash example for accessing the frames:

curl -L -H "Authorization: Bearer $API_KEY"  $FRAMES_URL > $FRAMES_FILE_LOCATION

Python example for accessing the frames:

import requests

headers = {'Authorization': f"Bearer {API_KEY}"}
ndjson_response = requests.get(frames_url, headers=headers)

Each element in the NDJSON file represents a labeled frame in the video (unlabeled frames will not be included).