API Reference

Organisation

Get data row

GET https://app.picsellia.com/api/V1/dataset/:dataset_id/:row_id

Retrieve all the informations about an asset from one of your dataset

Path Parameters

NameTypeDescription

dataset_id

string

The Id of the dataset you want to retrieve data from

Headers

NameTypeDescription

API Token

string

Request Body

NameTypeDescription

raw_id

string

id of the data

filename

string

filename of the data

{
    'id': '8e6487ae-6f23-4d62-8bdd-8c808894fbe1',
    'external_url': 'my_awesome_picture.jpg',
    'object_name': 'b5620ac0-cee8-4fd8-b81a-308657558848%5CPHOTO%20843.jpg'
    'type': 'image',
    'format': 'jpg',
    'size': 3.4,
    'import_date': '05-28-2020',
}

Projects

Create project

POST https://app.picsellia.com/api/v1/create_project

Allows you to setup a whole project at once

Headers

NameTypeDescription

API Token

string

Your personnal API token available in your profile settings/API token

Request Body

NameTypeDescription

type

string

'classification' or 'detection' or 'segmentation' depending on the task

team

object

Dictionnary with the emails of accounts you want to add on your project and the desired roles. If some of the emails doesn't exists, people will receive an invitation to join the platform and the project. { '1': { 'email': 'joe.ford@xyz.com', 'role': 'labeler' or 'reviewer' or 'manager' }, '2': { ... }, ... }

description

string

The description of your project

private

boolean

Set it to True if you want your project to be private

labels

object

{ '1': { 'label_name': 'label', 'tool': 'rectangle' or 'polygon' or 'line' or 'point' }, '2': { ... }, ... }

dataset_name

string

Name of the dataset you want to attach to your project (must be already created)

project_name

string

Must be different from your other project's names

Get project list

GET https://app.picsellia.com/api/v1/project_list

Retrieve the list of your project names and ids

Headers

NameTypeDescription

API Token

string

Your personnal API Token

{
    '1': {
        'project_name': 'my_first_project',
        'id': 'e403f741-3672-4a7a-a39d-34e8be241dd2'
    },
    '2': {
        ...
    }
}    

Get project infos

GET https://app.picsellia.com/api/v1/project_infos/:project_id

Retrieve all the informations about one of your project

Path Parameters

NameTypeDescription

project_id

string

The id of the project you want to retrieve informations from

Headers

NameTypeDescription

API Token

string

Your personnal API Token

{
    'id': 'e403f741-3672-4a7a-a39d-34e8be241dd2',
    'project_name': 'my_first_project',
    'type': segmentation,
    'dataset': {
        'dataset_id': 'a0c2b65f-6e25-445d-a423-22b7ff69f664',
        'dataset_name': 'awesome_planes'
    },
    'labels': {
        '1': {
            'label_name':  'plane',
            'tool': 'polygon'
        },
        '2': {
            'label_name':  'bird',
            'tool': 'polygon'
        }
    },
    'collaborators': {
        '1': {
            'email': 'john.doe@picsellia.com',
            'role': 'admin'
        },
    },
    'models': {
        '1': {
            'model_id': '3c36ba70-faa7-41bf-b17e-d2727d30edc0',
            'model_name': 'MaskR-CNN_plane_detection'
        },
    }
    'metrics': {
        'nb_annotations': 13200,
    }
}

Update project infos

PUT https://app.picsellia.com/api/v1/project_infos/:project_id

Update the informations (project name, description) of one of your projects

Path Parameters

NameTypeDescription

project_id

string

The ID of the project you want to update

Headers

NameTypeDescription

API Token

string

Your personnal API Token

Request Body

NameTypeDescription

description

string

The description of your project

project_name

string

The project_name you want for your project

Get project collaborators

GET https://app.picsellia.com/api/v1/project_collaborators/:project_id

Retrieve the list of collaborators for a given project

Headers

NameTypeDescription

API Token

string

{
    '1': {
        'email': 'john.doe@picsellia.com',
        'username': 'the_john',
        'role': 'manager',
        'date_joigned': '12-06-2020'
    },
    '2': {
        'email': 'gina@picsellia.com',
        'username': 'gina',
        'role': 'reviewer',
        'date_joigned': '14-06-2020'
    },
}

Update project collaborators

PUT https://app.picsellia.com/api/v1/project_collaborators/:project_id

Update the list of collaborators on a given project

Path Parameters

NameTypeDescription

project_id

string

The Id of your project

Headers

NameTypeDescription

API Token

string

Request Body

NameTypeDescription

collaborators

object

An object containing the updated list of collaborators for this project. { '1': { 'email': 'john.doe@picsellia.com', 'role': 'admin' }, '2': { 'email': 'gina@picsellia.com', 'role': 'reviewer' }, '3': { 'email': 'emma@picsellia.com', 'role': 'manager' }, }

Update project labels

PUT https://app.picsellia.com/api/v1/project_labels/:project_id

Update the label list of a given project

Path Parameters

NameTypeDescription

project_id

string

The Id of your project

Headers

NameTypeDescription

API Token

string

Request Body

NameTypeDescription

labels

object

An object containing the updated list of your project's labels. { '1': { 'label_name': 'plane', 'type': 'polygon' }, '1': { 'label_name': 'bird', 'type': 'polygon' }, '3': { 'label_name': 'wind-turbine', 'type': 'polygon' }, }

Set project automations

PUT https://app.picsellia.com/api/v1/project_auto/:project_id

Attach the labels of your project to the labelmap of a chosen pre-trained network to enable the 'pre-annotation' in our annotation interface (The default network is Mask R-CNN trained on COCO).

Path Parameters

NameTypeDescription

project_id

string

The Id of your project

Headers

NameTypeDescription

API Token

string

Request Body

NameTypeDescription

model_id

string

The Id of the pre-trained model you want to associate your labels to.

labels

object

An object containing the list of your project's labels and the associated pre-annotation label. { '1': { 'label_name': 'plane', 'link_with': 'plane' }, '2': { 'label_name': 'bird', 'link_with': 'bird' } }

The model that you want to associate to your labels must be already attached to your project !

See Attach a model to my project

Set project Questions & Answers

PUT https://app.picsellia.com/api/v1/project_qa/:project_id

Allows you to setup the Questions & Answers feature for your project. There is 4 different type of answers available : - Text answer : The user will answer the question via a text input - Value selection answer : The user will answer the question by choosing a value in a selection menu - Multiple Choice answer : The user will answer the question by checking some checkboxes - Range answer : The user will answer the question by moving a cursor in the desired range You can setup an image-level Q&A, which means that the questions are asked relatively to the image, and you can also set shape-level Q&A where every question will be asked for each drawn shapes.

Path Parameters

NameTypeDescription

project_id

string

The Id of your project

Headers

NameTypeDescription

API Token

string

Request Body

NameTypeDescription

shape_qa

object

Same as image_qa but will be asked for every shapes

image_qa

object

The image level Q&A { '1': { 'question': 'What is the person doing ?', 'type': 'text' }, '2': { 'question': 'How many people are in the image ?', 'type': 'range', 'min': 0, 'max': 50 } '3': { 'question': 'Level of brightness ?', 'type': 'choice', 'values': [0,1,2,3,4] } '4': { 'question': 'What emotions is the most probable?', 'type': 'mc', 'values': ['sadness','anger','happiness','surprise','joy'] } }

Get project stats

GET https://app.picsellia.com/api/v1/project_stats/:project_id

Retrieve the current state and statistics of a given project

Path Parameters

NameTypeDescription

project_id

string

The Id of your project

Headers

NameTypeDescription

API Token

string

{
    "labels": ["motor", "bus", "awning-tricycle", "tricycle", "truck", "van", "car", "bicycle", "people", "pedestrian", "others"], 
    "label_variance": 43.3, 
    "predicted_time": 0, 
    "time_per_image": [3, 17, 11, 14, 21, 3, 24, 3, 1, 15, 6, 22, 7, 16, 3, 7, 5, 23], 
    "assets_per_image": [127.0, 77.0, 48.0, 115.0, 113.0, 140.0, 115.0, 136.0, 164.0, 31.0], 
    "images_remaining": 0, 
    "total_time_spent": "", 
    "labels_per_classe": [1637.0, 20.0, 204.0, 266.0, 111.0, 286.0, 2144.0, 214.0, 1830.0, 2329.0, 6.0], 
    "nb_images_annotated": 150, 
    "average_time_by_image": 239.6, 
    "mean_assets_per_images": 60.31333333333333, 
    "percentage_advancement": 100, 
    "total_labels_submitted": 9047
}

Attach model to project

POST https://app.picsellia.com/api/v1/attach_model/project_id/model_id

Attach a CNN model to your project to perform transfert learning of

Path Parameters

NameTypeDescription

model_id

string

id of your model

project_id

string

id of your project

"Model attached"

Delete project

DELETE https://app.picsellia.com/api/v1/delete_project/project_id

Delete a project

Path Parameters

NameTypeDescription

project_id

string

id of the project

"Project deleted"

Detach model from project

PUT https://app.picsellia.com/api/v1/delete_project/project_id/model_id

Detach a model from a project

Path Parameters

NameTypeDescription

model_id

string

project_id

string

id of the project

"Model detached"

Check connection

GET https://app.picsellia.com/sdk/check_connection

This endpoint allows you to check connection with our Backend and assert your Token is valid.

{"project_id": (uuid) id of the project}

GET

Path Parameters

NameTypeDescription

string

Models

Get model list

GET https://app.picsellia.com/api/v1/models_list

Retrieve the list of all the models attached to a project or created where you are manager level

Request Body

NameTypeDescription

string

Name of your model or desired name for model creation

{
        '0': {
            'model_id' : id
            'model_name':  'Awesome model',
            'model_type': 'classification', 'segmentation', 'detection',
            'tags' : ["...", "...", "coco"]
            'used_in': {
                  '0': {
                  'project_id': id,
                  'project_name': 'Awesome model',
                  'project_type': 'classification', 'segmentation', 'detection',
                  },
                  '1': {
                  ...
                  }
            },
            'predictable' : True or False,
            'trainable' : True or False,
            },
            
        '1': {
            ...
        }
    
    
}

Delete a Model

DELETE https://app.picsellia.com/api/v1/delete_model/model_id

Path Parameters

NameTypeDescription

model_id

string

id of the model

"Model deleted"

Get model infos

GET https://app.picsellia.com/api/v1/model_infos/model_id

Path Parameters

NameTypeDescription

model_id

string

id of the model

{'model_id' : id,
 'model_name': name,
 'model_type': type,
 'tags': [ "..", "...", ],
 'description': '...',
 'private' : True or False,
 'trainable': True of False,
 'predicatble': True of False,
 'paper_link' :'',
 'github_link': '',
 'performances': {
 
             ...
                 },
 'labels' : {
 ...
 }
 'used_in': { 
             '0' : {
               'project_id' : id,
               'project_name': name,
               },
             '1' : {
             
             ...
             
             },
             },
 }'
           
             

Update model infos

PUT https://app.picsellia.com/api/v1/model_infos/model_id

Path Parameters

NameTypeDescription

model_id

string

id of the model

Request Body

NameTypeDescription

string

github_link

string

git repo of your model

paper_link

string

scientific paper link of the model

private

boolean

set True for private model, false for public

tags

array

array of tags in string format

description

string

description of the model

model_name

string

new_name of the model

Delete experiment

DELETE https://app.picsellia.com/api/v1/delete_experiments/project_id/model_id/training_id

Method to delete a version of an experiment

Path Parameters

NameTypeDescription

project_id

string

id of the project

training_id

integer

id of the experiments

model_id

string

id of the model

Annotations

A range of annotation

GET https://app.picsellia.com/api/v1/annotations/project_id

This allow you to retrieve annotations for a range of images.

Path Parameters

NameTypeDescription

project_id

string

id of the project

Request Body

NameTypeDescription

range

array

desired range ( [0, 15])

 { 
 '0': {
      "internal_picture_id": (uuid) id of the related image,
      "nb_labels": (int) nb of objects in the pic,
      "time_spent": (float) time spend to annotate the pic in sec,
      "QandA" :  {
      
      }
      "annotations": (list(dic))
       [
         {
           "type": (str) type of label -> rectangle/polygon
           "label": (str) label given to shape,
           "polygon": {"geometry": [{"x": (int) x, "y": (int) y}, ...,]
              # each dict in geometry is a point of the polygon
                # if no polygon have been done, list is empty
           "rectangle": {
                         "height": (int) h,
                         "width": (int) w,
                         "top": (int) x,
                         "left": (int) y,
                       }
          },
         ...,
      ]
   },
   
    '1' : {
    
     ...
     
      },
   } 

annotations

POST https://app.picsellia.com/sdk/upload_annotations

Request Body

NameTypeDescription

format

string

format type ("picsellia" of "other")

{"message": "Annotation uploaded"}

Training logs

POST https://app.picsellia.com/sdk/post_logs

The endpoints allow you to post the repartition of your train test ensemble to visualize it on the Platform.

Request Body

NameTypeDescription

training_id

integer

version of your experiments

network_id

string

id of your network

logs

object

(dict) logs from tfevents converted to dict

{"message" : "Metrics saved"}

Preview results

POST https://app.picsellia.com/sdk/post_preview

This endpoint allow you to post visual results of your experiments

Request Body

NameTypeDescription

training_id

integer

version of your experiments

network_id

string

id of your Model

urls

array

(str) url to your example results

Dataset

Create Dataset

POST https://app.picsellia.com/api/v1/create_dataset

API endpoint to create a Dataset

Request Body

NameTypeDescription

private

boolean

True for private, False for Public

description

string

Description of the Dataset

dataset_name

string

Desired name of the dataset

{"dataset_id": id}p

Get dataset list

GET https://app.picsellia.com/api/v1/dataset_list

Get the list of all the dataset of the project you are working on

Headers

NameTypeDescription

token

string

Auth token

{
   '0': {
    'dataset_id': id,
    'dataset_name': 'my awesome dataset',
    'dataset_size': 1000,
    'created_by': 'Username',
    'description': 'bla bla bla',
    'used_in': {
       '0': {
            'project_id': id,
            'project_name': 'awesome project 1',
            'project_type': 'classification', ' 
             }
    },
   },
   '1': {
      ...
   }
}

Dataset infos

GET https://app.picsellia.com/api/v1/dataset_info/dataset_id

Retrieve the information related to a dataset

Path Parameters

NameTypeDescription

dataset_id

string

id of the dataset

{ "dataset_id": id,
  "dataset_name": "awesome dataset",
  "dataset_size": 1000,
  "description": "bla bla bla",
  "used_in": {
    "0": {
    "project_id": id,
    "project_name": "awesome project",
    },
    "1" : {
      ...
      },
    },
}

Update dataset infos

PUT https://app.picsellia.com/api/v1/dataset_info/dataset_id

Update dataset infos

Path Parameters

NameTypeDescription

dataset_id

string

id of the dataset

Request Body

NameTypeDescription

description

string

new description

dataset_name

string

new name

"Info updated"

Delete Dataset

DELETE https://app.picsellia.com/api/v1/dataset/dataset_id

Path Parameters

NameTypeDescription

dataset_id

string

id of the dataset to delete

Retrieve info of a range of raw data

GET https://app.picsellia.com/api/v1/raw_data/dataset_id

Path Parameters

NameTypeDescription

dataset_id

string

id of the dataset

Request Body

NameTypeDescription

range

array

range of index to retrieve ([0:50]) for example

{
    "0" : {
    "id": id of the raw data,
    "external_url": url,
    "shape": [x,y],
          },
          
    "1" : {
       ...
    },
    
    ...
    
  }

Raw data

DELETE https://app.picsellia.com/api/v1/raw_data/dataset_id

you can delete a raw data either by providing its filename of the id of the datat

Path Parameters

NameTypeDescription

dataset_id

string

id of the data

Request Body

NameTypeDescription

filename

string

name of the picture to delete

raw_id

string

id of the raw data

Last updated