Imglabels

A service which allows to create labels on images. All Imglabels endpoints have path prefix /imglabels-service.

Get Items returns a list of items as a list of objects

GET /imglabels-service/items
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
[{
    id: 1,
    name: 'australian made'
}]

Get Objects returns a list of objects for provided ID, ID is an image file name with extension

GET /imglabels-service/objects/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string like 039994a6-9054-47a0-bda1-e4a10c238539.jpg
Example Response
{
    "size": {
        "width": 659,
        "height": 662,
        "depth": 3
    },
    "objects": [{
            "name": "australian made",
            "truncated": false,
            "difficult": 0,
            "bndbox": {
                "xmin": 162,
                "ymin": 312,
                "xmax": 197,
                "ymax": 346
            }
        }, {
            "name": "australian made",
            "truncated": false,
            "difficult": 0,
            "bndbox": {
                "xmin": 10,
                "ymin": 30,
                "xmax": 200,
                "ymax": 350
            }
        }
    ]
}

Post Objects

Create/update image's labels.

POST /imglabels-service/objects/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string like 039994a6-9054-47a0-bda1-e4a10c238539.jpg
Example request body
{
    "path": "https://cdn.shping.com/2018/10/9/039994a6-9054-47a0-bda1-e4a10c238539.jpg",
    "size": {
        "width": 659,
        "height": 662,
        "depth": 3
    },
    "objects": [{
            "name": "australian made",
            "truncated": false,
            "difficult": 0,
            "bndbox": {
                "xmin": 162,
                "ymin": 312,
                "xmax": 197,
                "ymax": 346
            }
        }, {
            "name": "australian made",
            "truncated": false,
            "difficult": 0,
            "bndbox": {
                "xmin": 10,
                "ymin": 30,
                "xmax": 20,
                "ymax": 35
            }
        }
    ]
}
Example Response
{
    "id": "039994a6-9054-47a0-bda1-e4a10c238539.jpg"
}

Get Labels Segment

Returns an archive if images which were updated in provided interval, each image has a same name XML file in the following format.

GET /imglabels-service/:start/:finish
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
start string ISO date: 2018-07-17T00:00:00Z
finish string ISO date: 2018-07-19T23:59:59Z
Example Response
<annotation>
    <filename>039994a6-9054-47a0-bda1-e4a10c238539.jpg</filename>
    <path>http://dev-cdn.shping.com/2019/01/01/039994a6-9054-47a0-bda1-e4a10c238539.jpg</path>
    <source>
        <database>imglabels</database>
    </source>
    <size>
        <width>701</width>
        <height>801</height>
        <depth>4</depth>
    </size>
    <segmented>0</segmented>
    <object>
        <name>australian made</name>
        <truncated>false</truncated>
        <difficult>2</difficult>
        <bndbox>
            <xmin>162</xmin>
            <ymin>312</ymin>
            <xmax>197</xmax>
            <ymax>346</ymax>
        </bndbox>
    </object>
    <object>
        <name>australian made</name>
        <truncated>false</truncated>
        <difficult>0</difficult>
        <bndbox>
            <xmin>10</xmin>
            <ymin>30</ymin>
            <xmax>20</xmax>
            <ymax>35</ymax>
        </bndbox>
    </object>
</annotation>

results matching ""

    No results matching ""