API description of LUNA CARS API (2.0.1)

Download OpenAPI specification:Download

The document describes the available requests and request fields of LUNA CARS API.

/version - Getting LUNA CARS API version.

/classify - Attributes recognition of one pair of vehicle and LP.

/bulk_classify - Attributes recognition of several pairs of vehicle and LP.

/detector - Vehicle and LP detection.

/redetector - Vehicle and LP redetection.

/classifiers - Getting available classifiers of Vehicle and LP.

  • Image format: JPEG or PNG encoded in Base64 without EXIF tags.
  • Maximum file size: 3 Mb.
  • Image color: Color or black and white image.
  • Image resolution:
    • Vehicle and LP detection: от 100x100 px до 1920х1080 px;
    • LP attributes recognition: от 20х50 до 1920х1080 px;
    • Vehicle attributes recognition: от 100х100 до 1920х1080 px.
  • Image composition:
    • Vehicle and LP must be fully visible (not blocked by other objects);
    • When recognizing vehicle attributes, the image should not contain more than one vehicle;
    • LP should occupy the entire area of the image when only LP attributes are recognized.

version

Get LUNA CARS API version

This method returns the version of LUNA CARS API

Responses

Response samples

Content type
application/json
{
  • "serviceVersion": "2.0.1"
}

classify

Recognize LP and vehicle attributes in one image

This method recognizes LP and vehicle attributes in one image

header Parameters
Content-Type
string
Value: "application/json"

Content type is application/json

Request Body schema: application/json
photo_ts
string

Vehicle photo in Base64 format

photo_grz
string

LP photo in Base64 format

object (classifiersList)

Array of classifiers which would be called during request. Empty classifier array enables all classification routines

Responses

Request samples

Content type
application/json
Example
{
  • "photo_ts": "Vehicle image in Base64 format",
  • "photo_grz": "LP image in Base64 format",
  • "classifiers": [
    ]
}

Response samples

Content type
application/json
{
  • "results": [
    ]
}

bulk_classify

Recognize attributes of several pairs of LP and vehicle

This method recognize attributes of several vehicles and LPs

header Parameters
Content-Type
string
Value: "application/json"

Content type is application/json

Request Body schema: application/json
object (photos)

An Array of JSON objects containing vehicle and LP images. Sending up to 100 pairs of vehicle and LP images is supported

object (classifiersList)

Array of classifiers which would be called during request. Empty classifier array enables all classification routines

Responses

Request samples

Content type
application/json
{
  • "photos": [
    ],
  • "classifiers": [
    ]
}

Response samples

Content type
application/json
{
  • "results": [
    ]
}

detector

Detect vehicle and LP position on an image

This method returns vehicle and LP coordinates

header Parameters
Content-Type
string
Value: "application/json"

Content type is application/json

Request Body schema: application/json
photo
string

Vehicle and LP photo in Base64 format

object (detectors)

Detector selection

max_detection_count
int

Maximum number of vehicles to recognize on an image

Responses

Request samples

Content type
application/json
{
  • "photo": "An image containing a vehicle and a GRZ in Base64 format",
  • "detectors": [
    ],
  • "max_detection_count": 10
}

Response samples

Content type
application/json
{
  • "results": [
    ]
}

redetector

Vehicle detection within specified frame coordinates

This method returns BBox coordinates of the vehicle found within specified frame area

header Parameters
Content-Type
string
Value: "application/json"

Content type is application/json

Request Body schema: application/json
photo
string

Vehicle photo in Base64 format

object (redetectors)

Detector selection

object (for_redetections)

Frame area (coordinates) where the vehicle should be detected

Responses

Request samples

Content type
application/json
{
  • "photo": "An image containing a vehicle in Base64 format",
  • "redetectors": [
    ],
  • "detections": [
    ]
}

Response samples

Content type
application/json
{
  • "results": [
    ]
}

classifiers

Get list of Vehicle and LP classifiers

This method returns the list of classifiers of Vehicles and LP

Responses

Response samples

Content type
application/json
{
  • "grz_classifiers": [
    ],
  • "vehicle_classifiers": [
    ]
}