Project Structure

In Supervisely, all data and annotations are stored inside individual projects which consist of datasets containing files and Project Meta - a collection of classes and tags.

When downloaded, each project is converted into a folder structure that includes a meta.json file containing Project Meta, and dataset folders with individual annotation files (and optionally the original data files). This organization enables seamless data transfer between Supervisely and local storage using the Supervisely Format import plugin when needed.

This structure remains the same for every type of project in Supervisely.

Project Structure System

Project structure system

Project Folder

On the top level we have Project folders, these are the elements visible on the main Supervisely dashboard. Inside them, they can contain only Datasets and Project Meta information, all other data has to be stored a level below in a Dataset. All datasets within a project have to contain content of the same category.

Project Meta

Project Meta contains essential information about the project, including Classes and Tags, which are defined project-wide and can be used for labeling in any dataset within the current project. It also includes the Project Type and Settings, which configure the labeling interface.

Datasets

Datasets are the second level folders inside the project, they host the individual data files and their annotations.

Items

Every data file in the project has to be stored inside a dataset. Each file as its own set of annotations.

Downloaded Project Structure

All projects downloaded from Supervisely maintain the same basic structure, with the contents varying based on which download option you chose.

Download Archive

When you select one of the download option, the system automatically creates an archive with the following name structure: project_name.tar

Downloaded Project

All projects downloaded from Supervisely have the following structure:

Project structure system

πŸ“‚ Root folder for the project named project name:

  • πŸ“„ meta.json file

  • πŸ“‚ Dataset folders, each named dataset_name, which contains:

    • πŸ“‚ ann folder, contains annotation files, each named source_media_file_name.json for the corresponding file

    • πŸ“‚ img (video or pointcloud) folder, contains source media

    • πŸ“‚ img_info folder, contains JSON files with representation of ImageInfo downloaded from instance

    • πŸ“‚ meta optional folder, contains corresponding JSON files with metadata for images

Project Structure Eample

The following structure is an example of a project with 2 datasets, each containing 2 images with annotations, and also meta directory with metadata for each image.

πŸ“¦ project-name
 ┣ πŸ“‚ dataset-name-001
 ┃ ┣ πŸ“‚ ann
 ┃ ┃ ┣ πŸ“„ pexels-photo-101063.png.json
 ┃ ┃ β”— πŸ“„ pexels-photo-103127.png.json
 ┃ ┣ πŸ“‚ img
 ┃ ┃ ┣ 🏞️ pexels-photo-101063.png
 ┃ ┃ β”— 🏞️ pexels-photo-103127.png
 ┃ ┣ πŸ“‚ meta
 ┃ ┃ ┣ πŸ“„ pexels-photo-101063.png.json
 ┃ ┃ β”— πŸ“„ pexels-photo-103127.png.json
 ┃ ┣ πŸ“‚ img_info
 ┃ ┃ ┣ πŸ“„ pexels-photo-101063.png.json
 ┃ ┃ β”— πŸ“„ pexels-photo-103127.png.json
 ┣ πŸ“‚ dataset-name-002
 ┃ ┣ πŸ“‚ ann
 ┃ ┃ ┣ πŸ“„ pexels-photo-100583.png.json
 ┃ ┃ β”— πŸ“„ pexels-photo-106118.png.json
 ┃ ┣ πŸ“‚ img
 ┃ ┃ ┣ 🏞️ pexels-photo-100583.png
 ┃ ┃ β”— 🏞️ pexels-photo-106118.png
 ┃ β”— πŸ“‚ meta
 ┃ ┃ ┣ πŸ“„ pexels-photo-100583.png.json
 ┃ ┃ β”— πŸ“„ pexels-photo-106118.png.json
 ┃ ┣ πŸ“‚ img_info
 ┃ ┃ ┣ πŸ“„ pexels-photo-100583.png.json
 ┃ ┃ β”— πŸ“„ pexels-photo-106118.png.json
 β”— πŸ“„ meta.json

Extended Project Structure

A project directory may contain the following folders or files:

  • πŸ“‚ blob optional folder, contains blob files that are used for optimized uploads of projects. These blob files are TAR archives with hundreds of thousands of small images.

  • πŸ“„ obj_class_to_machine_color.json - optional file for image annotation projects. Mapping between machine colors and classes in machine mask. Could be generated by applications such as Export As Masks

  • πŸ“„ key_id_map.json - optional file, created when annotating inside the Supervisely interface. Establishes correspondence between unique identifiers (keys and IDs) of items, objects, and frames where objects are located. The project file system stores these identifiers and keys on disk, which is necessary for navigation and for using the high-level API and applications.

    A dataset directory may contain the following folders or files:

    • πŸ“‚ masks_human optional folder for image annotation projects, contains .png files with RGB semantic segmentation masks where every pixel has the color of the corresponding class. Could be generated by applications such as Export As Masks

    • πŸ“‚ masks_machine optional folder for image annotation projects, contains .png files with semantic segmentation masks (machine annotations). This files should have the same name as the original images (may have a different extension). Could be generated by applications such as Export As Masks

    • πŸ“‚ masks_instances optional folder contains BW instance segmentation masks for every object on the image. Could be generated by applications such as Export As Masks

    • πŸ“„ blob_1_offsets.pkl optional pickle files, contain batches (lists) of BlobImageInfo objects, which represent file names and their offsets inside blob files. These files are used to add images to the project dataset based on their offsets.

Understanding Blob Files and Offsets for Optimized Project Handling

Supervisely provides a powerful optimization for projects containing a large number of small image files through its blob file system. Instead of handling thousands of individual files (which can lead to significant overhead in network transfers and filesystem operations), blob files consolidate many images into a single large binary file. This approach dramatically improves upload and download speeds, especially when dealing with datasets containing tens or hundreds of thousands of images.

Complementing the blob files are offset files with the suffix _offsets.pkl, which store metadata about each image's location within the blob. These files contain BlobImageInfo objects that define the byte range representing each image in the binary.

πŸ“‚ project-name
 ┣ πŸ“‚ blob
 ┃  β”— πŸ“¦ small_images.tar
 ┣ πŸ“‚ dataset-name-001
 ┃  ┣ πŸ“„ small_images_offsets.pkl
 ┃  ┣ πŸ“‚ ann
 ┃  ┃  ┣ πŸ“„ pexels-photo-101063.png.json
 ┃  ┃  ┣ πŸ“„ small-image-0000001.png.json
 ┃  ┃  ┣ ...
 ┃  ┃  β”— πŸ“„ small-image-0999999.png.json
 ┃  β”— πŸ“‚ img
 ┃     β”— 🏞️ pexels-photo-101063.png
 β”— πŸ“„ meta.json
  • To learn more about the offsets file format and how to prepare it, refer to this article: Optimized Import of Small Images

  • To export extended Supervisely format with the blob files and offsets, use the Export to Supervisely format: Blob application. ☝️ However, other applications export projects in the Supervisely format using the traditional method, downloading each image separately.

  • Importing the extended Supervisely format happens automatically in applications that previously imported projects in the Supervisely format without blobs. Such as Import Images in Supervisely Format application or Auto Import tool.

Last updated

Was this helpful?