Skip to content

Image classification

Additional image classification dataset operations.

For core dataset operations, see here.

URL#

Uses /v1/classify/datasets/ instead of /v1/datasets/, also for the core operations.

Actions#

Get Categories#

Gets the categories for each image in a dataset.

Method#

GET

URL#

/v1/classify/datasets/{PK}/categories

Parameters#
  • PK: int (primary key of the dataset)
Permissions#
Response#

A JSON object from filename to an array of categories for the file.

Get Categories For File#

Gets the categories for an image in a dataset.

Method#

GET

URL#

/v1/classify/datasets/{PK}/categories/{FILENAME}

Parameters#
  • PK: int (primary key of the dataset)
  • FILENAME: str (name of the new file)
Permissions#
Response#

A JSON array of categories for the file.

Modify Categories#

Modifies the categories for images in a dataset.

Method#

PATCH

URL#

/v1/classify/datasets/{PK}/categories

Parameters#
  • PK: int (primary key of the dataset)
Body#
  • method: str (either "add" or "remove")
  • images: array of str (the filenames of images to modify categories for)
  • categories: array of str (the categories to either add or remove from the images)
Permissions#
Response#

A JSON object from filename to the categories added to/removed from the file.

Set Categories#

Sets the categories for images in a dataset.

Method#

POST

URL#

/v1/classify/datasets/{PK}/categories

Parameters#
  • PK: int (primary key of the dataset)
Body#

A JSON object from filename to an array of categories for the file.

Permissions#
Response#

A JSON object from filename to an array of categories for the file.