NAV Navbar
CURL HTTP

HACARUS CHECK v1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

English | 日本語

Hacarus is a provider of lightweight and explainable AI solutions for manufacturing and medical industries.

Our technology is based on Sparse Modeling, a Machine Learning technique that understands data like a human would - by its unique key features. Sparse Modeling is especially useful in resource constraint environments where computing power, cloud connection and availability of training data are limited – thanks to its lightweight design.

Our solutions can run in an offline environment on embedded systems or as a cloud module. Compared with conventional DL based approaches we are far more resource efficient and produce better results.

Visit https://hacarus.com/visual-inspection/ to learn more about Hacarus’ Visual Inspection solution or contact us to request access to our API.

Base URLs:

This Visual Inspection Api wrapper for C# is made for software engineers who want to integrate with the Hacarus Visual Inspection module through its API. The wrapper provides simple to use method calls for easy integration to your C# based applications. Supports .Net Framework 4.6.1 and .Net Core 2.0.
This Visual Inspection SDK for Python is made for software engineers who want to integrate with the Hacarus Visual Inspection module through its API. The wrapper provides simple to use method calls for easy integration to your Python based applications.

Installation

PM> Install-Package HacarusVisualInspectionApi -Version 1.1.2-beta
> pip install hacarus_visual_inspection
To install this package on your project, use this command in Package Manager Console.
To install this package on your project, use this command:
You can also add it on your project by using `Add packages`, check on the `Show prerelease packages`, and search for `HacarusVisualInspectionApi` on the nuget.org repository.

Other installation options can be found on Nuget Package Site.

Terms

A brief explanation of the terms used throughout this documentation:

Model
A model is created (or trained) by applying an algorithm to a data-set of items (also called training-data), along with the configuration of a set of parameters. After creation, the model can be used to analyze new data.

Algorithm
The machine learning code that is used to build a model – selected depending on the nature of the visual inspection task and the expected precision and performance.

Training
The process of creating a new model.

Parameter
Parameters are used to configure how an algorithm should be applied during the training. For example the minimal or maximum accepted image resolution, etc.

Item
An item represents the data of a single product that is the subject of the inspection. One item can have one or several images associated. For example: A packaging box in a storage warehouse, with 6 images for each of the 6 box sides.

Usage

To get started, you need the following:

Authentication

Scope Scope Description
all all scopes

targets

Inspection Target related operations

getInspectionTargets

Code samples

# You can also use wget
curl -X GET https://sdd-api-staging.hacarus.com/api/v1/targets/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://sdd-api-staging.hacarus.com/api/v1/targets/ HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/json

GET /api/v1/targets/

Get List of Inpection Targets

Get all inspection targets created by user

Example responses

200 Response

{
  "data": [
    {
      "preprocessing": [
        {
          "active": true,
          "name": "string",
          "config": "string"
        }
      ],
      "name": "string",
      "target_id": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK InspectionTargetListWrapper
default Default Default error response BaseError

getInspectionTargetById

Code samples

# You can also use wget
curl -X GET https://sdd-api-staging.hacarus.com/api/v1/targets/{target_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://sdd-api-staging.hacarus.com/api/v1/targets/{target_id} HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/json

GET /api/v1/targets/{target_id}

Get Inspection Target by ID

Get a single inspection target using the inspection target ID.

Parameters

Name In Type Required Description
target_id path string true none

Example responses

200 Response

{
  "data": {
    "preprocessing": [
      {
        "active": true,
        "name": "string",
        "config": "string"
      }
    ],
    "name": "string",
    "target_id": 0
  }
}

Responses

Status Meaning Description Schema
200 OK OK InspectionTargetWrapper
default Default Default error response BaseError

setInspectionTargetById

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/targets/{target_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/targets/{target_id} HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/json

POST /api/v1/targets/{target_id}

Set Default Inspection Target by ID

Set the default inspection target using the inspection target ID.

Parameters

Name In Type Required Description
target_id path string true none

Example responses

200 Response

{
  "data": {
    "preprocessing": [
      {
        "active": true,
        "name": "string",
        "config": "string"
      }
    ],
    "name": "string",
    "target_id": 0
  }
}

Responses

Status Meaning Description Schema
200 OK OK InspectionTargetWrapper
default Default Default error response BaseError

getModelResults

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/targets/model/results \
  -H 'Accept: application/octet-stream' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/targets/model/results HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/octet-stream

POST /api/v1/targets/model/results

Parameters

Name In Type Required Description
model_ids query array[string] false none

Example responses

200 Response

422 Response

{
  "errors": {
    "message": [
      {
        "key": "string",
        "errors": [
          "string"
        ]
      }
    ],
    "status": 0,
    "detail": "string",
    "source": {
      "pointer": "string"
    },
    "title": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK CSV file containing the model/s results string
422 Unprocessable Entity Unprocessable Entity BaseError

algorithms

Algorithm related operations

Get Algorithms

Code samples

# You can also use wget
curl -X GET https://sdd-api-staging.hacarus.com/api/v1/algorithms/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://sdd-api-staging.hacarus.com/api/v1/algorithms/ HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/json

GET /api/v1/algorithms/

Get List of Algorithms

Example responses

200 Response

{
  "data": [
    {
      "type": "string",
      "algorithm_id": "string",
      "version": "string",
      "updated_at": "2022-03-03T06:48:30Z",
      "file_name": "string",
      "class_name": "string",
      "parameters": [
        {
          "value": "string",
          "data_type": "string",
          "algorithm_id": "string",
          "updated_at": "2022-03-03T06:48:30Z",
          "algorithm_parameter_id": 0,
          "display_name": "string",
          "range_lower": "string",
          "created_at": "2022-03-03T06:48:30Z",
          "model_parameter": true,
          "name": "string",
          "range_upper": "string"
        }
      ],
      "created_at": "2022-03-03T06:48:30Z",
      "name": "string",
      "attribute": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK AlgorithmWithParameterListWrapper
default Default Default error response BaseError

getAlgorithmById

Code samples

# You can also use wget
curl -X GET https://sdd-api-staging.hacarus.com/api/v1/algorithms/{algorithm_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://sdd-api-staging.hacarus.com/api/v1/algorithms/{algorithm_id} HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/json

GET /api/v1/algorithms/{algorithm_id}

Get Algorithm by ID

Get a single algorithm by ID

Parameters

Name In Type Required Description
algorithm_id path string true none

Example responses

200 Response

{
  "data": {
    "type": "string",
    "algorithm_id": "string",
    "version": "string",
    "updated_at": "2022-03-03T06:48:30Z",
    "file_name": "string",
    "class_name": "string",
    "parameters": [
      {
        "value": "string",
        "data_type": "string",
        "algorithm_id": "string",
        "updated_at": "2022-03-03T06:48:30Z",
        "algorithm_parameter_id": 0,
        "display_name": "string",
        "range_lower": "string",
        "created_at": "2022-03-03T06:48:30Z",
        "model_parameter": true,
        "name": "string",
        "range_upper": "string"
      }
    ],
    "created_at": "2022-03-03T06:48:30Z",
    "name": "string",
    "attribute": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK AlgorithmWithParameterWrapper
default Default Default error response BaseError

Train

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/algorithms/{algorithm_id}/train \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/algorithms/{algorithm_id}/train HTTP/1.1
Host: sdd-api-staging.hacarus.com
Content-Type: application/json
Accept: application/json

POST /api/v1/algorithms/{algorithm_id}/train

Train

Body parameter

{
  "name": "string",
  "item_ids": [
    "string"
  ],
  "override_params": [
    {
      "algorithm_parameter_id": 0,
      "value": "string"
    }
  ]
}

Parameters

Name In Type Required Description
body body TrainRequest true none
algorithm_id path string true none

Example responses

200 Response

{
  "data": {
    "algorithm_type": "string",
    "image_url": "string",
    "algorithm_id": "string",
    "version": "string",
    "ok_img_count": 0,
    "precision": 0,
    "recall": 0,
    "status_text": "string",
    "active": true,
    "training_time": 0,
    "updated_at": "2022-03-03T06:48:30Z",
    "ng_img_count": 0,
    "context_id": 0,
    "model_id": "string",
    "stats": {
      "accuracy": 0,
      "precision": {
        "projected": 0,
        "computed": 0
      },
      "recall": {
        "projected": 0,
        "computed": 0
      }
    },
    "created_at": "2022-03-03T06:48:30Z",
    "status": "string",
    "name": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK HModelWrapper
422 Unprocessable Entity Unprocessable Entity BaseError
default Default Default error response BaseError

models

Model related operations

Get Models

Code samples

# You can also use wget
curl -X GET https://sdd-api-staging.hacarus.com/api/v1/models/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://sdd-api-staging.hacarus.com/api/v1/models/ HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/json

GET /api/v1/models/

Get List of Models

Parameters

Name In Type Required Description
algorithm_id query string false none

Example responses

200 Response

{
  "data": [
    {
      "algorithm_type": "string",
      "image_url": "string",
      "algorithm_id": "string",
      "version": "string",
      "ok_img_count": 0,
      "precision": 0,
      "recall": 0,
      "status_text": "string",
      "active": true,
      "training_time": 0,
      "updated_at": "2022-03-03T06:48:30Z",
      "ng_img_count": 0,
      "context_id": 0,
      "model_id": "string",
      "stats": {
        "accuracy": 0,
        "precision": {
          "projected": 0,
          "computed": 0
        },
        "recall": {
          "projected": 0,
          "computed": 0
        }
      },
      "created_at": "2022-03-03T06:48:30Z",
      "status": "string",
      "name": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK HModelListWrapper
422 Unprocessable Entity Unprocessable Entity BaseError
default Default Default error response BaseError

deleteModels

Code samples

# You can also use wget
curl -X DELETE https://sdd-api-staging.hacarus.com/api/v1/models/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://sdd-api-staging.hacarus.com/api/v1/models/ HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/json

DELETE /api/v1/models/

Delete Models

Delete models by id (list)

Parameters

Name In Type Required Description
model_ids query array[string] false none

Example responses

200 Response

{
  "data": {
    "model_ids": [
      "string"
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK OK ModelIdsQueryWrapper
422 Unprocessable Entity Unprocessable Entity BaseError
default Default Default error response BaseError

getModelById

Code samples

# You can also use wget
curl -X GET https://sdd-api-staging.hacarus.com/api/v1/models/{model_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://sdd-api-staging.hacarus.com/api/v1/models/{model_id} HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/json

GET /api/v1/models/{model_id}

Get Model by ID

Get a single model by ID

Parameters

Name In Type Required Description
model_id path string true none

Example responses

200 Response

{
  "data": {
    "algorithm_type": "string",
    "image_url": "string",
    "algorithm_id": "string",
    "version": "string",
    "ok_img_count": 0,
    "precision": 0,
    "recall": 0,
    "status_text": "string",
    "active": true,
    "training_time": 0,
    "updated_at": "2022-03-03T06:48:30Z",
    "ng_img_count": 0,
    "context_id": 0,
    "model_id": "string",
    "stats": {
      "accuracy": 0,
      "precision": {
        "projected": 0,
        "computed": 0
      },
      "recall": {
        "projected": 0,
        "computed": 0
      }
    },
    "created_at": "2022-03-03T06:48:30Z",
    "status": "string",
    "name": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK HModelWrapper
default Default Default error response BaseError

exportModelsWithId

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/models/export \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/zip' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/models/export HTTP/1.1
Host: sdd-api-staging.hacarus.com
Content-Type: application/json
Accept: application/zip

POST /api/v1/models/export

Export models

Export models given the Id

Body parameter

{
  "model_ids": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body ModelIdsQuery true none

Example responses

200 Response

422 Response

{
  "errors": {
    "message": [
      {
        "key": "string",
        "errors": [
          "string"
        ]
      }
    ],
    "status": 0,
    "detail": "string",
    "source": {
      "pointer": "string"
    },
    "title": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Zip file containing the model/s string
422 Unprocessable Entity Unprocessable Entity BaseError

importModels

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/models/import \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/models/import HTTP/1.1
Host: sdd-api-staging.hacarus.com
Content-Type: multipart/form-data
Accept: application/json

POST /api/v1/models/import

Import models

Import models from the zip file

Body parameter

models: string

Parameters

Name In Type Required Description
body body ImportModels true none

Example responses

200 Response

{
  "data": [
    {
      "algorithm_type": "string",
      "image_url": "string",
      "algorithm_id": "string",
      "version": "string",
      "ok_img_count": 0,
      "precision": 0,
      "recall": 0,
      "status_text": "string",
      "active": true,
      "training_time": 0,
      "updated_at": "2022-03-03T06:48:30Z",
      "ng_img_count": 0,
      "context_id": 0,
      "model_id": "string",
      "stats": {
        "accuracy": 0,
        "precision": {
          "projected": 0,
          "computed": 0
        },
        "recall": {
          "projected": 0,
          "computed": 0
        }
      },
      "created_at": "2022-03-03T06:48:30Z",
      "status": "string",
      "name": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK HModelListWrapper
422 Unprocessable Entity Unprocessable Entity BaseError
default Default Default error response BaseError

setModelPredictParameters

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/models/{model_id}/update_predict_parameters \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/models/{model_id}/update_predict_parameters HTTP/1.1
Host: sdd-api-staging.hacarus.com
Content-Type: application/json
Accept: application/json

POST /api/v1/models/{model_id}/update_predict_parameters

Set Prediction Parameters

Updates predict parameters

Body parameter

{
  "threshold": 0,
  "ignore_outer": "string",
  "min_detected_area": 0
}

Parameters

Name In Type Required Description
body body UpdatePredictParameters true none
model_id path string true none

Example responses

200 Response

{
  "data": {
    "threshold": 0,
    "ignore_outer": "string",
    "min_detected_area": 0
  }
}

Responses

Status Meaning Description Schema
200 OK OK UpdatePredictParametersResponseWrapper
400 Bad Request Invalid parameters BaseError
default Default Default error response BaseError

setModelPredictCallback

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/models/{model_id}/update_predict_callback \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/models/{model_id}/update_predict_callback HTTP/1.1
Host: sdd-api-staging.hacarus.com
Content-Type: application/json
Accept: application/json

POST /api/v1/models/{model_id}/update_predict_callback

Set Prediction Callback URL

Updates the callback URL for prediction. Once this endpoint has been set, a successful prediction will do a POST or GET operation to the callback URL with the data PredictionItemCallbackResponse

Body parameter

{
  "callback_url": "string",
  "callback_method": "string"
}

Parameters

Name In Type Required Description
body body UpdatePredictCallback true none
model_id path string true none

Example responses

200 Response

{
  "data": {
    "callback_url": "string",
    "callback_method": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK UpdatePredictCallbackResponseWrapper
400 Bad Request Invalid parameters BaseError
default Default Default error response BaseError

predictItems

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/models/{model_id}/predict \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/models/{model_id}/predict HTTP/1.1
Host: sdd-api-staging.hacarus.com
Content-Type: application/json
Accept: application/json

POST /api/v1/models/{model_id}/predict

Predict Items

Predict items in the background

Body parameter

{
  "item_ids": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body Predict true none
model_id path string true The model id, set to "active" to use current active model

Example responses

200 Response

{
  "data": {
    "model_version": "string",
    "item_ids": [
      "string"
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK OK PredictItemsResponseWrapper
400 Bad Request model_id not found BaseError
404 Not Found item_id not found BaseError
425 Unknown The server is busy processing requests. Try again in a while. BaseError
default Default Default error response BaseError

items

Item related operations

getItemsByType

Code samples

# You can also use wget
curl -X GET https://sdd-api-staging.hacarus.com/api/v1/items/?item_type=string \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://sdd-api-staging.hacarus.com/api/v1/items/?item_type=string HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/json

GET /api/v1/items/

Get List of Items

Returns items based on given item_type (prediction, training)

Parameters

Name In Type Required Description
count query integer(int32) false none
page query integer(int32) false none
model_id query string false none
item_type query string true none

Example responses

200 Response

{
  "data": {
    "end_page": 0,
    "current_page": 0,
    "count_per_page": 0,
    "items": [
      {
        "active": true,
        "is_training_data": true,
        "user_assessment": {
          "result": "string",
          "annotations": [
            {
              "y_min": 0,
              "x_max": 0,
              "y_max": 0,
              "label": 0,
              "defect_size": 0,
              "created_at": "2022-03-03T06:48:30Z",
              "x_min": 0,
              "annotation_id": 0,
              "notes": "string"
            }
          ],
          "label": "string",
          "images": [
            {
              "url": "string",
              "width": 0,
              "file_size": 0,
              "height": 0,
              "name": "string"
            }
          ]
        },
        "images": [
          {
            "url": "string",
            "width": 0,
            "file_size": 0,
            "height": 0,
            "name": "string"
          }
        ],
        "item_id": "string",
        "assessments": [
          {
            "annotations": [
              {
                "y_min": 0,
                "x_max": 0,
                "y_max": 0,
                "label": 0,
                "defect_size": 0,
                "created_at": "2022-03-03T06:48:30Z",
                "x_min": 0,
                "annotation_id": 0,
                "notes": "string"
              }
            ],
            "label": "string",
            "images": [
              {
                "url": "string",
                "width": 0,
                "file_size": 0,
                "height": 0,
                "name": "string"
              }
            ],
            "anomaly_score": "string",
            "model_id": "string",
            "detected_objects": 0,
            "detection_accuracy": 0,
            "result": "string"
          }
        ],
        "status": "string",
        "name": "string"
      }
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK OK GetItemsResponseWrapper
422 Unprocessable Entity Unprocessable Entity BaseError
default Default Default error response BaseError

Add Item

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/items/ \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/items/ HTTP/1.1
Host: sdd-api-staging.hacarus.com
Content-Type: multipart/form-data
Accept: application/json

POST /api/v1/items/

Add Item

Body parameter

files:
  - string
training: true
good: true
model_id: string

Parameters

Name In Type Required Description
body body AddItemRequest true none

Example responses

201 Response

{
  "data": {
    "item_ids": [
      "string"
    ]
  }
}

Responses

Status Meaning Description Schema
201 Created CREATED AddItemResponseWrapper
422 Unprocessable Entity Unprocessable Entity BaseError
default Default Default error response BaseError

delItem

Code samples

# You can also use wget
curl -X DELETE https://sdd-api-staging.hacarus.com/api/v1/items/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

DELETE https://sdd-api-staging.hacarus.com/api/v1/items/ HTTP/1.1
Host: sdd-api-staging.hacarus.com
Content-Type: application/json
Accept: application/json

DELETE /api/v1/items/

Body parameter

{
  "item_ids": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body DelItemRequest true none

Example responses

422 Response

{
  "errors": {
    "message": [
      {
        "key": "string",
        "errors": [
          "string"
        ]
      }
    ],
    "status": 0,
    "detail": "string",
    "source": {
      "pointer": "string"
    },
    "title": "string"
  }
}

Responses

Status Meaning Description Schema
422 Unprocessable Entity Unprocessable Entity BaseError

getItemById

Code samples

# You can also use wget
curl -X GET https://sdd-api-staging.hacarus.com/api/v1/items/{item_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://sdd-api-staging.hacarus.com/api/v1/items/{item_id} HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/json

GET /api/v1/items/{item_id}

Get Item by Id

Get specific item and annotations

Parameters

Name In Type Required Description
show_assessments query boolean false none
show_annotations query boolean false none
model_id query string false none
item_id path string true none

Example responses

200 Response

{
  "data": {
    "active": true,
    "is_training_data": true,
    "user_assessment": {
      "result": "string",
      "annotations": [
        {
          "y_min": 0,
          "x_max": 0,
          "y_max": 0,
          "label": 0,
          "defect_size": 0,
          "created_at": "2022-03-03T06:48:30Z",
          "x_min": 0,
          "annotation_id": 0,
          "notes": "string"
        }
      ],
      "label": "string",
      "images": [
        {
          "url": "string",
          "width": 0,
          "file_size": 0,
          "height": 0,
          "name": "string"
        }
      ]
    },
    "images": [
      {
        "url": "string",
        "width": 0,
        "file_size": 0,
        "height": 0,
        "name": "string"
      }
    ],
    "item_id": "string",
    "assessments": [
      {
        "annotations": [
          {
            "y_min": 0,
            "x_max": 0,
            "y_max": 0,
            "label": 0,
            "defect_size": 0,
            "created_at": "2022-03-03T06:48:30Z",
            "x_min": 0,
            "annotation_id": 0,
            "notes": "string"
          }
        ],
        "label": "string",
        "images": [
          {
            "url": "string",
            "width": 0,
            "file_size": 0,
            "height": 0,
            "name": "string"
          }
        ],
        "anomaly_score": "string",
        "model_id": "string",
        "detected_objects": 0,
        "detection_accuracy": 0,
        "result": "string"
      }
    ],
    "status": "string",
    "name": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK ItemWrapper
422 Unprocessable Entity Unprocessable Entity BaseError

annotate

Code samples

# You can also use wget
curl -X PATCH https://sdd-api-staging.hacarus.com/api/v1/items/{item_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://sdd-api-staging.hacarus.com/api/v1/items/{item_id} HTTP/1.1
Host: sdd-api-staging.hacarus.com
Content-Type: application/json
Accept: application/json

PATCH /api/v1/items/{item_id}

Body parameter

{
  "annotations": [
    {
      "x_max": 0,
      "x_min": 0,
      "y_max": 0,
      "y_min": 0,
      "label": 0,
      "notes": "string"
    }
  ]
}

Parameters

Name In Type Required Description
body body AnnotateItemRequest true none
item_id path string true none

Example responses

422 Response

{
  "errors": {
    "message": [
      {
        "key": "string",
        "errors": [
          "string"
        ]
      }
    ],
    "status": 0,
    "detail": "string",
    "source": {
      "pointer": "string"
    },
    "title": "string"
  }
}

Responses

Status Meaning Description Schema
202 Accepted ACCEPTED None
422 Unprocessable Entity Unprocessable Entity BaseError
default Default Default error response BaseError

utils

Support and utility functions

setLicense

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/utils/ \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/utils/ HTTP/1.1
Host: sdd-api-staging.hacarus.com
Content-Type: multipart/form-data
Accept: application/json

POST /api/v1/utils/

Body parameter

license_data: string

Parameters

Name In Type Required Description
body body License true none

Example responses

200 Response

{
  "data": {
    "license_expiry": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK LicenseResponseWrapper
422 Unprocessable Entity Unprocessable Entity BaseError
default Default Default error response BaseError

getLogs

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/utils/debug \
  -H 'Accept: application/octet-stream' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/utils/debug HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/octet-stream

POST /api/v1/utils/debug

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK ZIP file containing the debug logs string

getHashId

Code samples

# You can also use wget
curl -X POST https://sdd-api-staging.hacarus.com/api/v1/utils/node_hash \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://sdd-api-staging.hacarus.com/api/v1/utils/node_hash HTTP/1.1
Host: sdd-api-staging.hacarus.com
Accept: application/json

POST /api/v1/utils/node_hash

Example responses

200 Response

{
  "data": {
    "hash_id": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK LicenseHashResponseWrapper
default Default Default error response BaseError

token

API authentication operations

login

Code samples

LoginParams loginParams = new LoginParams(
  clientId: "client id",
  clientSecret: "client secret",
  grantType: "client_credentials"
);
var resp = instance.Login(loginParams);

POST /api/auth/token

Authorization

Returns the access token

Body parameter

{
  "grant_type": "client_credentials",
  "client_secret": "client_secret",
  "client_id": "client_id"
}

Parameters

Name In Type Required Description
body body LoginParams true none

Example responses

200 Response

{
  "access_token": "access_token"
}

Responses

Status Meaning Description Schema
200 OK Successful login LoginResponse
401 Unauthorized Invalid credentials BaseError
default Default default error handler BaseError

Schemas

KeyValueError

{
  "key": "string",
  "errors": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
key string false none Error key
errors [string] false none none

ErrorSource

{
  "pointer": "string"
}

Properties

Name Type Required Restrictions Description
pointer string false none Endpoint errored

Error

{
  "message": [
    {
      "key": "string",
      "errors": [
        "string"
      ]
    }
  ],
  "status": 0,
  "detail": "string",
  "source": {
    "pointer": "string"
  },
  "title": "string"
}

Properties

Name Type Required Restrictions Description
message [KeyValueError] false none none
status integer(int32) false none Error status code
detail string false none Error Details
source ErrorSource false none Error Source
title string false none Error Title

BaseError

{
  "errors": {
    "message": [
      {
        "key": "string",
        "errors": [
          "string"
        ]
      }
    ],
    "status": 0,
    "detail": "string",
    "source": {
      "pointer": "string"
    },
    "title": "string"
  }
}

Properties

Name Type Required Restrictions Description
errors Error false none none

LoginResponse

{
  "access_token": "access_token"
}

response object of login

Properties

Name Type Required Restrictions Description
access_token string true none none

LoginParams

{
  "grant_type": "client_credentials",
  "client_secret": "client_secret",
  "client_id": "client_id"
}

login parameters

Properties

Name Type Required Restrictions Description
client_id string true none none
client_secret string true none none
grant_type string true none none

Preprocessing

{
  "active": true,
  "name": "string",
  "config": "string"
}

Properties

Name Type Required Restrictions Description
active boolean¦null false none none
name string true none none
config string¦null false none none

InspectionTarget

{
  "preprocessing": [
    {
      "active": true,
      "name": "string",
      "config": "string"
    }
  ],
  "name": "string",
  "target_id": 0
}

Properties

Name Type Required Restrictions Description
preprocessing [Preprocessing] false none none
name string false none none
target_id integer(int32) false none none

InspectionTargetListWrapper

{
  "data": [
    {
      "preprocessing": [
        {
          "active": true,
          "name": "string",
          "config": "string"
        }
      ],
      "name": "string",
      "target_id": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
data [InspectionTarget] false none none

InspectionTargetWrapper

{
  "data": {
    "preprocessing": [
      {
        "active": true,
        "name": "string",
        "config": "string"
      }
    ],
    "name": "string",
    "target_id": 0
  }
}

Properties

Name Type Required Restrictions Description
data InspectionTarget false none none

AlgorithmParameter

{
  "value": "string",
  "data_type": "string",
  "algorithm_id": "string",
  "updated_at": "2022-03-03T06:48:30Z",
  "algorithm_parameter_id": 0,
  "display_name": "string",
  "range_lower": "string",
  "created_at": "2022-03-03T06:48:30Z",
  "model_parameter": true,
  "name": "string",
  "range_upper": "string"
}

Properties

Name Type Required Restrictions Description
value string¦null false none none
data_type string false none none
algorithm_id string true none none
updated_at string(date-time) true none none
algorithm_parameter_id integer(int32) false none none
display_name string¦null false none none
range_lower string¦null false none none
created_at string(date-time) true none none
model_parameter boolean¦null false none none
name string true none none
range_upper string¦null false none none

AlgorithmWithParameter

{
  "type": "string",
  "algorithm_id": "string",
  "version": "string",
  "updated_at": "2022-03-03T06:48:30Z",
  "file_name": "string",
  "class_name": "string",
  "parameters": [
    {
      "value": "string",
      "data_type": "string",
      "algorithm_id": "string",
      "updated_at": "2022-03-03T06:48:30Z",
      "algorithm_parameter_id": 0,
      "display_name": "string",
      "range_lower": "string",
      "created_at": "2022-03-03T06:48:30Z",
      "model_parameter": true,
      "name": "string",
      "range_upper": "string"
    }
  ],
  "created_at": "2022-03-03T06:48:30Z",
  "name": "string",
  "attribute": "string"
}

Properties

Name Type Required Restrictions Description
type string false none none
algorithm_id string true none none
version string¦null false none none
updated_at string(date-time) true none none
file_name string true none none
class_name string true none none
parameters [AlgorithmParameter] false none none
created_at string(date-time) true none none
name string true none none
attribute string false none none

AlgorithmWithParameterListWrapper

{
  "data": [
    {
      "type": "string",
      "algorithm_id": "string",
      "version": "string",
      "updated_at": "2022-03-03T06:48:30Z",
      "file_name": "string",
      "class_name": "string",
      "parameters": [
        {
          "value": "string",
          "data_type": "string",
          "algorithm_id": "string",
          "updated_at": "2022-03-03T06:48:30Z",
          "algorithm_parameter_id": 0,
          "display_name": "string",
          "range_lower": "string",
          "created_at": "2022-03-03T06:48:30Z",
          "model_parameter": true,
          "name": "string",
          "range_upper": "string"
        }
      ],
      "created_at": "2022-03-03T06:48:30Z",
      "name": "string",
      "attribute": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
data [AlgorithmWithParameter] false none none

AlgorithmWithParameterWrapper

{
  "data": {
    "type": "string",
    "algorithm_id": "string",
    "version": "string",
    "updated_at": "2022-03-03T06:48:30Z",
    "file_name": "string",
    "class_name": "string",
    "parameters": [
      {
        "value": "string",
        "data_type": "string",
        "algorithm_id": "string",
        "updated_at": "2022-03-03T06:48:30Z",
        "algorithm_parameter_id": 0,
        "display_name": "string",
        "range_lower": "string",
        "created_at": "2022-03-03T06:48:30Z",
        "model_parameter": true,
        "name": "string",
        "range_upper": "string"
      }
    ],
    "created_at": "2022-03-03T06:48:30Z",
    "name": "string",
    "attribute": "string"
  }
}

Properties

Name Type Required Restrictions Description
data AlgorithmWithParameter false none none

OverrideParam

{
  "algorithm_parameter_id": 0,
  "value": "string"
}

Properties

Name Type Required Restrictions Description
algorithm_parameter_id integer(int32) false none none
value string false none none

TrainRequest

{
  "name": "string",
  "item_ids": [
    "string"
  ],
  "override_params": [
    {
      "algorithm_parameter_id": 0,
      "value": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
name string false none none
item_ids [string] false none none
override_params [OverrideParam] false none none

HModelPrecision

{
  "projected": 0,
  "computed": 0
}

Properties

Name Type Required Restrictions Description
projected number¦null false none none
computed number¦null false none none

HModelStats

{
  "accuracy": 0,
  "precision": {
    "projected": 0,
    "computed": 0
  },
  "recall": {
    "projected": 0,
    "computed": 0
  }
}

Properties

Name Type Required Restrictions Description
accuracy number¦null false none none
precision HModelPrecision false none none
recall HModelPrecision false none none

HModel

{
  "algorithm_type": "string",
  "image_url": "string",
  "algorithm_id": "string",
  "version": "string",
  "ok_img_count": 0,
  "precision": 0,
  "recall": 0,
  "status_text": "string",
  "active": true,
  "training_time": 0,
  "updated_at": "2022-03-03T06:48:30Z",
  "ng_img_count": 0,
  "context_id": 0,
  "model_id": "string",
  "stats": {
    "accuracy": 0,
    "precision": {
      "projected": 0,
      "computed": 0
    },
    "recall": {
      "projected": 0,
      "computed": 0
    }
  },
  "created_at": "2022-03-03T06:48:30Z",
  "status": "string",
  "name": "string"
}

Properties

Name Type Required Restrictions Description
algorithm_type string true none none
image_url string¦null false none none
algorithm_id string true none none
version string true none none
ok_img_count integer(int32) false none none
precision number¦null false none none
recall number¦null false none none
status_text string¦null false none none
active boolean¦null false none none
training_time integer(int32)¦null false none none
updated_at string(date-time) true none none
ng_img_count integer(int32) false none none
context_id integer(int32) true none none
model_id string true none none
stats HModelStats false none none
created_at string(date-time) true none none
status string false none none
name string true none none

HModelWrapper

{
  "data": {
    "algorithm_type": "string",
    "image_url": "string",
    "algorithm_id": "string",
    "version": "string",
    "ok_img_count": 0,
    "precision": 0,
    "recall": 0,
    "status_text": "string",
    "active": true,
    "training_time": 0,
    "updated_at": "2022-03-03T06:48:30Z",
    "ng_img_count": 0,
    "context_id": 0,
    "model_id": "string",
    "stats": {
      "accuracy": 0,
      "precision": {
        "projected": 0,
        "computed": 0
      },
      "recall": {
        "projected": 0,
        "computed": 0
      }
    },
    "created_at": "2022-03-03T06:48:30Z",
    "status": "string",
    "name": "string"
  }
}

Properties

Name Type Required Restrictions Description
data HModel false none none

HModelListWrapper

{
  "data": [
    {
      "algorithm_type": "string",
      "image_url": "string",
      "algorithm_id": "string",
      "version": "string",
      "ok_img_count": 0,
      "precision": 0,
      "recall": 0,
      "status_text": "string",
      "active": true,
      "training_time": 0,
      "updated_at": "2022-03-03T06:48:30Z",
      "ng_img_count": 0,
      "context_id": 0,
      "model_id": "string",
      "stats": {
        "accuracy": 0,
        "precision": {
          "projected": 0,
          "computed": 0
        },
        "recall": {
          "projected": 0,
          "computed": 0
        }
      },
      "created_at": "2022-03-03T06:48:30Z",
      "status": "string",
      "name": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
data [HModel] false none none

ModelIdsQuery

{
  "model_ids": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
model_ids [string] false none none

ModelIdsQueryWrapper

{
  "data": {
    "model_ids": [
      "string"
    ]
  }
}

Properties

Name Type Required Restrictions Description
data ModelIdsQuery false none none

ImportModels

{
  "models": "string"
}

Properties

Name Type Required Restrictions Description
models string(binary) false none none

UpdatePredictParameters

{
  "threshold": 0,
  "ignore_outer": "string",
  "min_detected_area": 0
}

Properties

Name Type Required Restrictions Description
threshold number(float) false none none
ignore_outer string false none none
min_detected_area number(float) false none none

UpdatePredictParametersResponse

{
  "threshold": 0,
  "ignore_outer": "string",
  "min_detected_area": 0
}

Properties

Name Type Required Restrictions Description
threshold number(float) false none none
ignore_outer string false none none
min_detected_area number(float) false none none

UpdatePredictParametersResponseWrapper

{
  "data": {
    "threshold": 0,
    "ignore_outer": "string",
    "min_detected_area": 0
  }
}

Properties

Name Type Required Restrictions Description
data UpdatePredictParametersResponse false none none

UpdatePredictCallback

{
  "callback_url": "string",
  "callback_method": "string"
}

Properties

Name Type Required Restrictions Description
callback_url string false none The callback URL that HACARUS CHECK will call to send prediction details after a prediction call has been completed.
callback_method string false none The method in which the callback will be called. Valid values are 'post' and 'get'

UpdatePredictCallbackResponse

{
  "callback_url": "string",
  "callback_method": "string"
}

Properties

Name Type Required Restrictions Description
callback_url string false none none
callback_method string false none none

UpdatePredictCallbackResponseWrapper

{
  "data": {
    "callback_url": "string",
    "callback_method": "string"
  }
}

Properties

Name Type Required Restrictions Description
data UpdatePredictCallbackResponse false none none

Predict

{
  "item_ids": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
item_ids [string] false none none

PredictItemsResponse

{
  "model_version": "string",
  "item_ids": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
model_version string false none none
item_ids [string] false none none

PredictItemsResponseWrapper

{
  "data": {
    "model_version": "string",
    "item_ids": [
      "string"
    ]
  }
}

Properties

Name Type Required Restrictions Description
data PredictItemsResponse false none none

Annotation

{
  "y_min": 0,
  "x_max": 0,
  "y_max": 0,
  "label": 0,
  "defect_size": 0,
  "created_at": "2022-03-03T06:48:30Z",
  "x_min": 0,
  "annotation_id": 0,
  "notes": "string"
}

Properties

Name Type Required Restrictions Description
y_min number¦null false none none
x_max number¦null false none none
y_max number¦null false none none
label integer(int32)¦null false none none
defect_size number¦null false none none
created_at string(date-time) true none none
x_min number¦null false none none
annotation_id integer(int32) false none none
notes string¦null false none none

ItemImageMeta

{
  "url": "string",
  "width": 0,
  "file_size": 0,
  "height": 0,
  "name": "string"
}

Properties

Name Type Required Restrictions Description
url string false none none
width integer(int32) false none none
file_size integer(int32) false none none
height integer(int32) false none none
name string false none none

AssessmentItem

{
  "result": "string",
  "annotations": [
    {
      "y_min": 0,
      "x_max": 0,
      "y_max": 0,
      "label": 0,
      "defect_size": 0,
      "created_at": "2022-03-03T06:48:30Z",
      "x_min": 0,
      "annotation_id": 0,
      "notes": "string"
    }
  ],
  "label": "string",
  "images": [
    {
      "url": "string",
      "width": 0,
      "file_size": 0,
      "height": 0,
      "name": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
result string false none none
annotations [Annotation] false none none
label string false none none
images [ItemImageMeta] false none none

AssessmentItem1

{
  "annotations": [
    {
      "y_min": 0,
      "x_max": 0,
      "y_max": 0,
      "label": 0,
      "defect_size": 0,
      "created_at": "2022-03-03T06:48:30Z",
      "x_min": 0,
      "annotation_id": 0,
      "notes": "string"
    }
  ],
  "label": "string",
  "images": [
    {
      "url": "string",
      "width": 0,
      "file_size": 0,
      "height": 0,
      "name": "string"
    }
  ],
  "anomaly_score": "string",
  "model_id": "string",
  "detected_objects": 0,
  "detection_accuracy": 0,
  "result": "string"
}

Properties

Name Type Required Restrictions Description
annotations [Annotation] false none none
label string false none none
images [ItemImageMeta] false none none
anomaly_score string false none none
model_id string false none none
detected_objects integer(int32)¦null false none none
detection_accuracy integer(int32)¦null false none none
result string false none none

Item

{
  "active": true,
  "is_training_data": true,
  "user_assessment": {
    "result": "string",
    "annotations": [
      {
        "y_min": 0,
        "x_max": 0,
        "y_max": 0,
        "label": 0,
        "defect_size": 0,
        "created_at": "2022-03-03T06:48:30Z",
        "x_min": 0,
        "annotation_id": 0,
        "notes": "string"
      }
    ],
    "label": "string",
    "images": [
      {
        "url": "string",
        "width": 0,
        "file_size": 0,
        "height": 0,
        "name": "string"
      }
    ]
  },
  "images": [
    {
      "url": "string",
      "width": 0,
      "file_size": 0,
      "height": 0,
      "name": "string"
    }
  ],
  "item_id": "string",
  "assessments": [
    {
      "annotations": [
        {
          "y_min": 0,
          "x_max": 0,
          "y_max": 0,
          "label": 0,
          "defect_size": 0,
          "created_at": "2022-03-03T06:48:30Z",
          "x_min": 0,
          "annotation_id": 0,
          "notes": "string"
        }
      ],
      "label": "string",
      "images": [
        {
          "url": "string",
          "width": 0,
          "file_size": 0,
          "height": 0,
          "name": "string"
        }
      ],
      "anomaly_score": "string",
      "model_id": "string",
      "detected_objects": 0,
      "detection_accuracy": 0,
      "result": "string"
    }
  ],
  "status": "string",
  "name": "string"
}

Properties

Name Type Required Restrictions Description
active boolean false none none
is_training_data boolean false none none
user_assessment AssessmentItem false none none
images [ItemImageMeta] false none none
item_id string false none none
assessments [AssessmentItem1] false none none
status string false none none
name string false none none

GetItemsResponse

{
  "end_page": 0,
  "current_page": 0,
  "count_per_page": 0,
  "items": [
    {
      "active": true,
      "is_training_data": true,
      "user_assessment": {
        "result": "string",
        "annotations": [
          {
            "y_min": 0,
            "x_max": 0,
            "y_max": 0,
            "label": 0,
            "defect_size": 0,
            "created_at": "2022-03-03T06:48:30Z",
            "x_min": 0,
            "annotation_id": 0,
            "notes": "string"
          }
        ],
        "label": "string",
        "images": [
          {
            "url": "string",
            "width": 0,
            "file_size": 0,
            "height": 0,
            "name": "string"
          }
        ]
      },
      "images": [
        {
          "url": "string",
          "width": 0,
          "file_size": 0,
          "height": 0,
          "name": "string"
        }
      ],
      "item_id": "string",
      "assessments": [
        {
          "annotations": [
            {
              "y_min": 0,
              "x_max": 0,
              "y_max": 0,
              "label": 0,
              "defect_size": 0,
              "created_at": "2022-03-03T06:48:30Z",
              "x_min": 0,
              "annotation_id": 0,
              "notes": "string"
            }
          ],
          "label": "string",
          "images": [
            {
              "url": "string",
              "width": 0,
              "file_size": 0,
              "height": 0,
              "name": "string"
            }
          ],
          "anomaly_score": "string",
          "model_id": "string",
          "detected_objects": 0,
          "detection_accuracy": 0,
          "result": "string"
        }
      ],
      "status": "string",
      "name": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
end_page integer(int32) false none none
current_page integer(int32) false none none
count_per_page integer(int32) false none none
items [Item] false none none

GetItemsResponseWrapper

{
  "data": {
    "end_page": 0,
    "current_page": 0,
    "count_per_page": 0,
    "items": [
      {
        "active": true,
        "is_training_data": true,
        "user_assessment": {
          "result": "string",
          "annotations": [
            {
              "y_min": 0,
              "x_max": 0,
              "y_max": 0,
              "label": 0,
              "defect_size": 0,
              "created_at": "2022-03-03T06:48:30Z",
              "x_min": 0,
              "annotation_id": 0,
              "notes": "string"
            }
          ],
          "label": "string",
          "images": [
            {
              "url": "string",
              "width": 0,
              "file_size": 0,
              "height": 0,
              "name": "string"
            }
          ]
        },
        "images": [
          {
            "url": "string",
            "width": 0,
            "file_size": 0,
            "height": 0,
            "name": "string"
          }
        ],
        "item_id": "string",
        "assessments": [
          {
            "annotations": [
              {
                "y_min": 0,
                "x_max": 0,
                "y_max": 0,
                "label": 0,
                "defect_size": 0,
                "created_at": "2022-03-03T06:48:30Z",
                "x_min": 0,
                "annotation_id": 0,
                "notes": "string"
              }
            ],
            "label": "string",
            "images": [
              {
                "url": "string",
                "width": 0,
                "file_size": 0,
                "height": 0,
                "name": "string"
              }
            ],
            "anomaly_score": "string",
            "model_id": "string",
            "detected_objects": 0,
            "detection_accuracy": 0,
            "result": "string"
          }
        ],
        "status": "string",
        "name": "string"
      }
    ]
  }
}

Properties

Name Type Required Restrictions Description
data GetItemsResponse false none none

PredictionItemCallbackResponse

{
  "items": [
    {
      "active": true,
      "is_training_data": true,
      "user_assessment": {
        "result": "string",
        "annotations": [
          {
            "y_min": 0,
            "x_max": 0,
            "y_max": 0,
            "label": 0,
            "defect_size": 0,
            "created_at": "2022-03-03T06:48:30Z",
            "x_min": 0,
            "annotation_id": 0,
            "notes": "string"
          }
        ],
        "label": "string",
        "images": [
          {
            "url": "string",
            "width": 0,
            "file_size": 0,
            "height": 0,
            "name": "string"
          }
        ]
      },
      "images": [
        {
          "url": "string",
          "width": 0,
          "file_size": 0,
          "height": 0,
          "name": "string"
        }
      ],
      "item_id": "string",
      "assessments": [
        {
          "annotations": [
            {
              "y_min": 0,
              "x_max": 0,
              "y_max": 0,
              "label": 0,
              "defect_size": 0,
              "created_at": "2022-03-03T06:48:30Z",
              "x_min": 0,
              "annotation_id": 0,
              "notes": "string"
            }
          ],
          "label": "string",
          "images": [
            {
              "url": "string",
              "width": 0,
              "file_size": 0,
              "height": 0,
              "name": "string"
            }
          ],
          "anomaly_score": "string",
          "model_id": "string",
          "detected_objects": 0,
          "detection_accuracy": 0,
          "result": "string"
        }
      ],
      "status": "string",
      "name": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
items [Item] false none none

PredictionItemCallbackWrapper

{
  "data": {
    "items": [
      {
        "active": true,
        "is_training_data": true,
        "user_assessment": {
          "result": "string",
          "annotations": [
            {
              "y_min": 0,
              "x_max": 0,
              "y_max": 0,
              "label": 0,
              "defect_size": 0,
              "created_at": "2022-03-03T06:48:30Z",
              "x_min": 0,
              "annotation_id": 0,
              "notes": "string"
            }
          ],
          "label": "string",
          "images": [
            {
              "url": "string",
              "width": 0,
              "file_size": 0,
              "height": 0,
              "name": "string"
            }
          ]
        },
        "images": [
          {
            "url": "string",
            "width": 0,
            "file_size": 0,
            "height": 0,
            "name": "string"
          }
        ],
        "item_id": "string",
        "assessments": [
          {
            "annotations": [
              {
                "y_min": 0,
                "x_max": 0,
                "y_max": 0,
                "label": 0,
                "defect_size": 0,
                "created_at": "2022-03-03T06:48:30Z",
                "x_min": 0,
                "annotation_id": 0,
                "notes": "string"
              }
            ],
            "label": "string",
            "images": [
              {
                "url": "string",
                "width": 0,
                "file_size": 0,
                "height": 0,
                "name": "string"
              }
            ],
            "anomaly_score": "string",
            "model_id": "string",
            "detected_objects": 0,
            "detection_accuracy": 0,
            "result": "string"
          }
        ],
        "status": "string",
        "name": "string"
      }
    ]
  }
}

Properties

Name Type Required Restrictions Description
data PredictionItemCallbackResponse false none none

AddItemRequest

{
  "files": [
    "string"
  ],
  "training": true,
  "good": true,
  "model_id": "string"
}

Properties

Name Type Required Restrictions Description
files [string] false none none
training boolean true none none
good boolean false none none
model_id string false none none

AddItemResponse

{
  "item_ids": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
item_ids [string] false none none

AddItemResponseWrapper

{
  "data": {
    "item_ids": [
      "string"
    ]
  }
}

Properties

Name Type Required Restrictions Description
data AddItemResponse false none none

DelItemRequest

{
  "item_ids": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
item_ids [string] false none none

ItemWrapper

{
  "data": {
    "active": true,
    "is_training_data": true,
    "user_assessment": {
      "result": "string",
      "annotations": [
        {
          "y_min": 0,
          "x_max": 0,
          "y_max": 0,
          "label": 0,
          "defect_size": 0,
          "created_at": "2022-03-03T06:48:30Z",
          "x_min": 0,
          "annotation_id": 0,
          "notes": "string"
        }
      ],
      "label": "string",
      "images": [
        {
          "url": "string",
          "width": 0,
          "file_size": 0,
          "height": 0,
          "name": "string"
        }
      ]
    },
    "images": [
      {
        "url": "string",
        "width": 0,
        "file_size": 0,
        "height": 0,
        "name": "string"
      }
    ],
    "item_id": "string",
    "assessments": [
      {
        "annotations": [
          {
            "y_min": 0,
            "x_max": 0,
            "y_max": 0,
            "label": 0,
            "defect_size": 0,
            "created_at": "2022-03-03T06:48:30Z",
            "x_min": 0,
            "annotation_id": 0,
            "notes": "string"
          }
        ],
        "label": "string",
        "images": [
          {
            "url": "string",
            "width": 0,
            "file_size": 0,
            "height": 0,
            "name": "string"
          }
        ],
        "anomaly_score": "string",
        "model_id": "string",
        "detected_objects": 0,
        "detection_accuracy": 0,
        "result": "string"
      }
    ],
    "status": "string",
    "name": "string"
  }
}

Properties

Name Type Required Restrictions Description
data Item false none none

RequestAnnotation

{
  "x_max": 0,
  "x_min": 0,
  "y_max": 0,
  "y_min": 0,
  "label": 0,
  "notes": "string"
}

Properties

Name Type Required Restrictions Description
x_max integer(int32)¦null false none none
x_min integer(int32)¦null false none none
y_max integer(int32)¦null false none none
y_min integer(int32)¦null false none none
label integer(int32)¦null false none none
notes string false none none

AnnotateItemRequest

{
  "annotations": [
    {
      "x_max": 0,
      "x_min": 0,
      "y_max": 0,
      "y_min": 0,
      "label": 0,
      "notes": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
annotations [RequestAnnotation] false none none

License

{
  "license_data": "string"
}

Properties

Name Type Required Restrictions Description
license_data string(binary) false none none

LicenseResponse

{
  "license_expiry": "string"
}

Properties

Name Type Required Restrictions Description
license_expiry string false none none

LicenseResponseWrapper

{
  "data": {
    "license_expiry": "string"
  }
}

Properties

Name Type Required Restrictions Description
data LicenseResponse false none none

LicenseHashResponse

{
  "hash_id": "string"
}

Properties

Name Type Required Restrictions Description
hash_id string false none none

LicenseHashResponseWrapper

{
  "data": {
    "hash_id": "string"
  }
}

Properties

Name Type Required Restrictions Description
data LicenseHashResponse false none none

Algorithm V0.7.29

Algorithm overview

Algorithm details

Reconstructor Inspection

An unsupervised learning model that learns only from “OK” images (good samples, without defects, annotations). At the time of prediction, a reconstruction error is calculated and abnormality defection is performed based on the magnitude. The model can learn global texture of images.

Parameter Variable name Type: Range Default Impact on processing time Impact on accuracy Remarks
Model sizetrain_sizeint : [1, inf]10000large -> largelarge -> large 
Minimum inspection sizemin_inspection_size(int, int) : 0~height, 0~width(8, 8)large -> large-(4, 4) or (8, 8) or (16, 16) are empirically good.
Minimum inspection step sizemin_inspection_stepint : [1, inf]4large -> smalllarge -> small"A divisor of min_inspection_size is desirable. 1 is the most computationally intensive, but the most efficient."
Dimension of featuren_componentsint : [1, inf]10large -> largelarge->more tolerantIf the dimension of the feature amount is large, even complex objects can be reconstructed.
Number of algorithm iterationsmax_iterInt : [1, inf]10large -> large-If the amount is too small, the performance will be degraded, but if it is somewhat large, the performance will not change much. Number of algorithm iterations
Reconstruction error thresholdreconstruct_threshfloat : [0, inf]2-large->more tolerantA threshold for reconstruction error, about 1.5 to 3 is empirically good
Threshold of anomalythresholdfloat : [0, inf]0.1-large->more tolerant 
Width from the perimeter to be ignoredignore_outer(int, int) : 0~height, 0~width(0,0)--"The width of the ignored area from the perimeter. Use values up to the number of vertical and horizontal pixels in the image."
Minimum detection sizemin_detected_areaFloat : [1, inf]0--Threshold of area of detected rectangle
Anomaly range anomaly_range (float, float) : 0 to 1, 0 to 1 (0, 1) - - Range used to normalize the heatmap colors in heatmap images across results.

Local Pattern Inspection

An unsupervised learning model that learns only from “OK” images (good samples, without defects, annotations). The model can learn local structure of images. Hence, the position alignment is required (minor gap is allowed), and the size of all images must be the same. Misalignment and rotation might be a cause of misclassification.

Parameter Variable name Type: Range Default Impact on processing time Impact on accuracy Remarks
Minimum inspection sizemin_inspection_size(int, int) : 0~height, 0~width(32, 32)large -> large-(16, 16) or (32, 32) or (64, 64) are empirically good.
Minimum inspection step sizemin_inspection_stepint : [1, inf]16large -> smalllarge -> smallHalf or quarter of min_inspection_size is desirable.
Threshold of anomalythresholdfloat : [0, inf]0.001-large->more tolerant 
Width from the perimeter to be ignoredignore_outer(int, int) : 0~height, 0~width(0,0)--"The width of the ignored area from the perimeter. Use values up to the number of vertical and horizontal pixels in the image."
Minimum detection sizemin_detected_areaFloat : [1, inf]0--Threshold of area of detected rectangle
Anomaly range anomaly_range (float, float) : 0 to 1, 0 to 1 (0, 1) - - Range used to normalize the heatmap colors in heatmap images across results.

Pattern Matching

We calculate the golden image from “OK” images (good samples, without defects, no annotation required) and compare it to reference. Hence, the position alignment is required (position variation is not allowed), and the size of all images must be the same. Misalignment and rotation might be a cause of misclassification.

Parameter Variable name Type: Range Default Impact on processing time Impact on accuracy Remarks
Minimum inspection size min_inspection_size (int, int) : 0~height, 0~width (16, 16) large -> large - (16, 16) or (32, 32) or (64, 64) are empirically good.
Minimum inspection step size min_inspection_step int : [1, inf] 4 large -> small Half or quarter of min_inspection_size is desirable.
Threshold of anomaly threshold float : [0, inf] 0.1 - large->more tolerant
Width from the perimeter to be ignored ignore_outer (int, int) : 0~height, 0~width (0,0) - - The width of the ignored area from the perimeter. Use values up to the number of vertical and horizontal pixels in the image.
Minimum detection size min_detected_area float : [1, inf] 0 - - Threshold of area of detected rectangle
Anomaly range anomaly_range (float, float) : 0 to 1, 0 to 1 (0, 1) - - Range used to normalize the heatmap colors in heatmap images across results.

Pattern Sample Inspection (Beta)

A new, generic inspection algorithm that can handle inspection objects with different placement or rotation. We have seen good inspection results and very high inspection accuracy even with difficult inspection targets across customer projects.

Parameter Variable name Type: Range Default Impact on processing time Impact on accuracy Remarks
Model type model_type int : [0, 1] 0 small -> large - 0 will use a small model. 1 will use a larger model.
Number of Features num_features int : n 100 large -> large - 100-n are empirically good.
Threshold of anomaly threshold float : [0, inf] 0.1 - large->more tolerant
Width from the perimeter to be ignored ignore_outer (int, int) : 0~height, 0~width (0,0) - - The width of the ignored area from the perimeter. Use values up to the number of vertical and horizontal pixels in the image.
Minimum detection size min_detected_area float : [1, inf] 0 - - Threshold area of detected rectangle
Anomaly range anomaly_range (float, float) : 0 to 1, 0 to 1 (0, 1) - - Range used to normalize the heatmap colors in heatmap images across results.

C# SDK

Open

Python SDK

Open