The Custom Tags - Amazon Rekognition API allows you to build Projects to classify or detect custom objects in your content.
{
"id": "5df434f8031fdd45f669e39b42f2221a",
"name": "foo",
"description": "my model",
"arn": "an amazon resource number",
"type": "detection",
"created_at": "2019-12-14T01:03:52.454906Z",
"updated_at": "2019-12-14T01:03:52.454906Z",
"needs_training": false,
"needs_labeling": false,
"num_files": 10,
"num_labeled_files": 8,
"num_labels": 20,
"num_project_versions": 2,
"num_unlabeled_files": 2
}
id
- (string) The projects’s unique identifiername
- (string) The name of the projectdescription
- (string) A brief description of the projectarn
- (string) The AWS ARN that identifies the project at AWStype
- (string) The model’s type. One of classification
, detection
, or imported
created_at
- (string) The timestamp when the project was created or importedupdated_at
- (string) The timestamp when the project was last updatedneeds_training
- (bool) Whether or not the project needs to be retrained. This will be true when new labels are added to the project, labels are added or removed to/from files, or files are removed from the project.needs_labeling
- (bool) Whether or not any unlabeled images exist in the project. This will be true when at least one image in the project doesn’t have any labels applied to it.num_files
- (int) The number of non-deleted files associated with the project.num_labels
- (int) The number of labels associated with the project.num_labeled_files
- (int) The number of files that have labels applied to them within the project.num_project_versions
- (int) The number of project versions associated with the project.num_unlabeled_files
- (int) The number of files that do not have labels applied to them within the project.{
"project": {
"id": "5df434f8031fdd45f669e39b42f2221a",
"name": "foo",
"description": "my model",
"arn": "an amazon resource number",
"type": "detection",
"created_at": "2019-12-14T01:03:52.454906Z",
"updated_at": "2019-12-14T01:03:52.454906Z",
"needs_training": false,
"needs_labeling": false
},
"groups": [
"group1",
"group2"
],
}
project
- Project - A Project modelgroups
- []string - A list of group ids assigned to the project{
"name": "some name",
"arn": "some amazon resource number"
}
name
- (string) The name of the projectarn
- (string) The Amazon Resource Number that uniquely identifies the project at AWS{
"id": "somelabelid",
"project_id": "abc123",
"name": "Blue Jay",
"deleted": false,
"num_files": 10,
"num_instances": 20,
"created_at": "2020-01-22T19:52:10.509479Z",
"updated_at": "2020-01-22T19:52:10.509479Z"
}
id
- (string) The label’s unique identifierproject_id
- (string) The project identifier to which this label belongsname
- (string) The name of the labeldeleted
- (bool) Whether or not this label has been deletednum_files
- (int) The number of distinct files this label has been applied tonum_instances
- (int) The number of distinct instances of this labelcreated_at
- (string) The timestamp of when this label was createdupdated_at
- (string) The timestamp of when this label was last modified{
"label": {
"id": "somelabelid",
"project_id": "abc123",
"name": "Blue Jay",
"deleted": false,
"created_at": "2020-01-22T19:52:10.509479Z",
"updated_at": "2020-01-22T19:52:10.509479Z"
}
}
label
- (Label) A label object{
"id": "5e30b6461f16430821a56f3239b56326",
"project_id": "p1234",
"mime_type": "image/jpeg",
"deleted": false,
"created_at": "2020-01-28T22:31:35.035882Z",
"original_width": 1080,
"original_height": 1080,
"large_width": 1000,
"large_height": 1000,
"small_width": 200,
"small_height": 200
}
id
- (string) The file’s unique identifierproject_id
- (string) The project’s unique identifier to which this file belongsmime_type
- (string) The mime type of the originally uploaded filedeleted
- (string) Whether or not this file has been deletedcreated_at
- (string) The timestamp when this file was uploadedoriginal_width
- (int) The width of the originally uploaded imageoriginal_height
- (int) The height of the originally uploaded imagelarge_width
- (int) The width of the large
size imagelarge_height
- (int) The height of the large
size imagesmall_width
- (int) The width of the small
size imagesmall_height
- (int) The height of the small
size image{
"file": {
"created_at": "2020-02-28T17:55:22.071366Z",
"deleted": false,
"filename": "f1.jpg",
"id": "f1",
"large_height": 600,
"large_width": 800,
"mime_type": "image/jpeg",
"original_height": 600,
"original_width": 800,
"project_id": "p1234",
"small_height": 600,
"small_width": 800
},
"labels": [
{
"label": {
"created_at": "2020-02-28T17:52:53.252489Z",
"deleted": false,
"id": "l1",
"name": "Cat",
"num_files": 2,
"num_instances": 2,
"project_id": "p1234",
"updated_at": "2020-02-28T17:52:53.252489Z"
},
"label_instances": [
{
"file_id": "f1",
"label_id": "l1",
"top": 0.15567766,
"left": 0.3922065,
"width": 0.284666,
"height": 0.2930403
}
]
},
{
"label": {
"created_at": "2020-02-28T17:52:53.252489Z",
"deleted": false,
"id": "l2",
"name": "Dog",
"num_files": 1,
"num_instances": 2,
"project_id": "p1234",
"updated_at": "2020-02-28T17:52:53.252489Z"
},
"label_instances": [
{
"file_id": "f1",
"label_id": "l2",
"top": 0.15567766,
"left": 0.3922065,
"width": 0.284666,
"height": 0.2930403
}
]
}
]
}
file
- (File) A file modellabels
- ([]LabelInstanceInfo) A list of LabelInstanceInfo models which represent a list of labels applied to this modelA LabelInstance is an instance of a label as applied to a specific file. It can contain a bounding box depending on the project’s type.
{
"label_id": "somelabelid",
"file_id": "somefileid",
"top": 0.15567766,
"left": 0.3922065,
"width": 0.284666,
"height": 0.2930403
}
label_id
- (string) A label identifierfile_id
- (string) A file identifiertop
- (float) The top coordinate of the bounding box as a ratio of overall image heightleft
- (float) The left coordinate of the bounding box as a ratio of overall image widthwidth
- (float) The width of the bounding box as a ratio of the overall image widthheight
- (float) The height of the bounding box as a ratio of the overall image height{
"label_instances": [
{
"file_id": "f1",
"label_id": "l1"
}
],
"label": {
"id": "l1",
"project_id": "p1234",
"name": "Cat",
"deleted": false,
"num_files": 2,
"num_instances": 2,
"created_at": "2020-02-28T17:52:53.252489Z",
"updated_at": "2020-02-28T17:52:53.252489Z"
}
}
label_instances
- ([]LabelInstance) A list of label instanceslabel
- (Label) The label that is associated with the label_instances
{
"message": "some error message",
"type": "an error category"
}
message
- (string) An error messagetype
- (string) An error category. One of NotFound
, Forbidden
, or InternalServerError
{
"error": {
"message": "some error message",
"type": "an error category"
},
"object": {
"id": "somelabelid",
"project_id": "abc123",
"name": "Blue Jay",
"deleted": false,
"created_at": "2020-01-22T19:52:10.509479Z",
"updated_at": "2020-01-22T19:52:10.509479Z"
}
}
error
- (BulkResponseError) An error object. Will be omitted if an error did not occurobject
- (Label) A label object. Will be omitted if an error occured{
"id": "pv1",
"arn": "arn:aws:rekognition:us-west-2:913397769129:project/Arthur/version/v0/1575184617111",
"project_id": "p1234",
"name": "v0",
"notes": "initial version",
"active": true,
"created_at": "2020-02-07T22:32:35.276407Z",
"heartbeat": "2020-02-07T22:32:35.276407Z"
}
id
- (string) The project version’s unique identifierarn
- (string) The ARN that uniquely identifies this model at AWSproject_id
- (string) The unique id of the project this version belongs toname
- (string) The auto-generated name assigned to this version of the modelnotes
- (string) The notes assigned to this model at creation timeactive
- (bool) Whether or not this project version is the active version. Only one project version can be active at a timecreated_at
- (string) The timestamp of when the project version was createdheartbeat
- (string) The last received heartbeat of the project versionThe TrainingInfo model returns some info from training the project version.
{
"billable_training_time_seconds": 4089,
"f1_score": 0.7576923370361328,
"evaluation_results": {
"AggregatedEvaluationResults": {
"AveragePrecision": 0.7361307559327361,
"AverageRecall": 0.8666666666666667,
"F1Score": 0.7576923076923077,
"Precision": 0.8190476190476191,
"Recall": 0.7333333333333334
},
"EvaluationDetails": {
"EvaluationEndTimestamp": "2019-12-01T07:26:05.467607",
"Labels": [
"Arthur",
"Buster",
"Francine"
],
"NumberOfTestingImages": 14,
"NumberOfTrainingImages": 52,
"ProjectVersionArn": "arn:aws:rekognition:us-west-2:913397769129:project/Arthur/version/v0/1575184617111"
},
"LabelEvaluationResults": [
{
"Label": "Francine",
"Metrics": {
"F1Score": 0.923076923076923,
"Precision": 0.8571428571428571,
"Recall": 1,
"Threshold": 0.80989
},
"NumberOfTestingImages": 14
},
{
"Label": "Arthur",
"Metrics": {
"F1Score": 0.7499999999999999,
"Precision": 1,
"Recall": 0.6,
"Threshold": 0.85915
},
"NumberOfTestingImages": 14
},
{
"Label": "Buster",
"Metrics": {
"F1Score": 0.6,
"Precision": 0.6,
"Recall": 0.6,
"Threshold": 0.88773
},
"NumberOfTestingImages": 14
}
],
"Version": 1
}
}
billable_training_time_seconds
- (int) The amount of time (in seconds) that it took to train the model and that will be billed to the accountf1_score
- (float) The overall f1 score of the modelevaluation_results.AggregatedEvaluationResults
- Contains statistics on the overall performance of this version of the modelevaluation_results.EvaluationDetails
- Gives a summary of the training[]evaluation_results.LabelEvaluationResults
- Gives a breakdown of the training statistics for each label{
"project_version": {
"id": "pv1",
"arn": "arn:aws:rekognition:us-west-2:913397769129:project/Arthur/version/v0/1575184617111",
"project_id": "p1234",
"name": "v0",
"notes": "initial version",
"active": true,
"created_at": "2020-02-07T22:32:35.276407Z",
"heartbeat": "2020-02-07T22:32:35.276407Z"
},
"status": "STOPPED",
"training_info": {
"billable_training_time_seconds": 4089,
"f1_score": 0.7576923370361328,
"evaluation_results": {
"AggregatedEvaluationResults": {
"AveragePrecision": 0.7361307559327361,
"AverageRecall": 0.8666666666666667,
"F1Score": 0.7576923076923077,
"Precision": 0.8190476190476191,
"Recall": 0.7333333333333334
},
"EvaluationDetails": {
"EvaluationEndTimestamp": "2019-12-01T07:26:05.467607",
"Labels": [
"Arthur",
"Buster",
"Francine"
],
"NumberOfTestingImages": 14,
"NumberOfTrainingImages": 52,
"ProjectVersionArn": "arn:aws:rekognition:us-west-2:913397769129:project/Arthur/version/v0/1575184617111"
},
"LabelEvaluationResults": [
{
"Label": "Francine",
"Metrics": {
"F1Score": 0.923076923076923,
"Precision": 0.8571428571428571,
"Recall": 1,
"Threshold": 0.80989
},
"NumberOfTestingImages": 14
},
{
"Label": "Arthur",
"Metrics": {
"F1Score": 0.7499999999999999,
"Precision": 1,
"Recall": 0.6,
"Threshold": 0.85915
},
"NumberOfTestingImages": 14
},
{
"Label": "Buster",
"Metrics": {
"F1Score": 0.6,
"Precision": 0.6,
"Recall": 0.6,
"Threshold": 0.88773
},
"NumberOfTestingImages": 14
}
],
"Version": 1
}
}
}
project_version
- (ProjectVersion) A ProjectVersion modelstatus
- (string) The current state the model is in. One of TRAINING_IN_PROGRESS
, TRAINING_COMPLETED
, TRAINING_FAILED
, STARTING
, RUNNING
, FAILED
, STOPPING
, STOPPED
, DELETING
training_info
- (TrainingInfo) A TrainingInfo model that captures some of the results from training the model. Will only be present if the model was successfully trainedGET /api/data/v3/customtags/amazonrek/projects?limit={limit}&page-token={page-token}
limit
- (int) Optional. Number of projects to return. Min: 1. Max: 1000. Default: 10.page-token
- (string) Optional. The token to retrieve another page of results.{
"projects": [
{
"project": {
"id": "5df434f8031fdd45f669e39b42f2221a",
"name": "foo",
"description": "my model",
"arn": "an amazon resource number",
"type": "detection",
"created_at": "2019-12-14T01:03:52.454906Z",
"updated_at": "2019-12-14T01:03:52.454906Z",
"needs_training": false,
"needs_labeling": false
},
"groups": [
"group1",
"group2"
],
}
...
],
"next_page": "{next page token}",
"previous_page": "{previous page token}"
}
projects
- []ProjectInfo A list of ProjectInfo objects.next_page
- (string) The token to retrieve a subsequent page of results. If this is an empty string, there are no additional pages of results.previous_page
- (string) The token to retrieve the previous page of results. If this is an empty string, you are on the first page of results.POST /api/data/v3/customtags/amazonrek/projects
{
"name": "My Cats Model",
"description": "some description",
"type": "detection",
}
name
- (string) Required. Human-readable name of the projectdescription
- (string) Required. Human-readable description of the projecttype
- (string) Required. Either classification
or detection
Expect a 201 status code:
{
"project": {
"id": "5df434f8031fdd45f669e39b42f2221a",
"name": "My Cats Model",
"description": "some description",
"arn": "an amazon resource number",
"type": "detection",
"created_at": "2019-12-14T01:03:52.454906Z",
"updated_at": "2019-12-14T01:03:52.454906Z",
"needs_training": false,
"needs_labeling": false
}
}
project
- Project - A Project modelOnly the description
field of a Project is mutable.
PATCH /api/data/v3/customtags/amazonrek/projects/{id}
{
"description": "some new description",
}
id
- (string) Required. The unique identifier of the projectdescription
- (string) Required. Human-readable description of the projectExpect a 200 status code:
{
"project": {
"id": "5df434f8031fdd45f669e39b42f2221a",
"name": "My Cats Model",
"description": "some new description",
"arn": "an amazon resource number",
"type": "detection",
"created_at": "2019-12-12T01:03:52.454906Z",
"updated_at": "2019-12-14T01:09:17.123445Z",
"needs_training": false,
"needs_labeling": false
}
}
project
- Project - A Project modelPOST /api/data/v3/customtags/amazonrek/projects/import
{
"arn": "an amazon project arn",
}
arn
- (string) Required. An AWS Rekognition Custom Labels Project ARN. Must exist in AWS.Expect a 201 status code:
{
"project": {
"id": "5df434f8031fdd45f669e39b42f2221a",
"name": "My Cats Model",
"description": "some description",
"arn": "an amazon project arn number",
"type": "imported",
"created_at": "2019-12-14T01:03:52.454906Z",
"updated_at": "2019-12-14T01:03:52.454906Z",
"needs_training": false,
"needs_labeling": false
}
}
project
- Project - A Project modelThis endpoint will show you any projects that exist in AWS that haven’t been imported into Curio. This endopoint will 404 if project imports are disabled.
GET /api/data/v3/customtags/amazonrek/projects/import
arn
- (string) Required. An AWS Rekognition Custom Labels Project ARN. Must exist in AWS.Expect a 200 status code:
{
"projects": [
{
"name": "Cats",
"arn": "an amazon project arn number",
},
{
"name": "Dogs",
"arn": "another amazon project arn number",
}
]
}
projects
- []ExistingProject - A list of ExistingProject modelsUse this endpoint to pull in any project versions associated with a Project that were created after the project was originally imported. This endpoint will 404 if project imports are disabled.
POST /api/data/v3/customtags/amazonrek/projects/{id}/import-project-versions
id
- (string) Required. The Project’s unique identifier.A successful response will return a 204 status code.
GET /api/data/v3/customtags/amazonrek/projects/{id}
id
- (string) Required. The unique identifier of the projectExpect a 200 status code:
{
"project": {
"id": "5df434f8031fdd45f669e39b42f2221a",
"name": "My Cats Model",
"description": "some description",
"arn": "an amazon project arn number",
"type": "imported",
"created_at": "2019-12-14T01:03:52.454906Z",
"updated_at": "2019-12-14T01:03:52.454906Z",
"needs_training": false,
"needs_labeling": false
}
}
project
- Project - A Project modelPOST /api/data/v3/customtags/amazonrek/projects/{id}/groups
{
"ids": ["group1", "group2", ..., "groupN"]
}
id
- (string) Required. The unique identifier of the projectids
- ([]string) Required. The list of group identifiers to add to the projectExpect a 204 status code.
DELETE /api/data/v3/customtags/amazonrek/projects/{id}/groups
{
"ids": ["group1", "group2", ..., "groupN"]
}
id
- (string) Required. The unique identifier of the projectids
- ([]string) Required. The list of group identifiers to remove from the projectExpect a 204 status code.
This action will add and remove user groups associated with a project. For example, if a project has group1
and group2
already added to it, and a replace is called with a list of groups (group1
, group3
), then group2
will be removed from the project and group3
will be added to the project.
PUT /api/data/v3/customtags/amazonrek/projects/{id}/groups
{
"ids": ["group1", "group2", ..., "groupN"]
}
id
- (string) Required. The unique identifier of the projectids
- ([]string) Required. The list of group identifiers to remove from the projectExpect a 204 status code.
POST /api/data/v3/customtags/amazonrek/projects/{id}/labels
{
"names": ["the first label name", "the second label name"]
}
id
- (string) Required. The unique identifier of the projectnames
- ([]string) Required. The names of the label to create. Labels are case insensitive and must be unique per projectExpect a 201 status code plus the following response body:
{
"labels": [
{
"id": "label1",
"project_id": "abc123",
"name": "the first label name",
"deleted": false,
"created_at": "2020-01-22T19:52:10.509479Z",
"updated_at": "2020-01-22T19:52:10.509479Z"
},
{
"id": "label2",
"project_id": "abc123",
"name": "the second label name",
"deleted": false,
"created_at": "2020-01-22T19:52:10.509479Z",
"updated_at": "2020-01-22T19:52:10.509479Z"
},
]
}
labels
- ([]Label) A list of Label objectsDELETE /api/data/v3/customtags/amazonrek/labels/{id}
id
- (string) The unique identifier of the labelExpect a 204 response.
PATCH /api/data/v3/customtags/amazonrek/labels/{id}
{
"name": "the label name",
"deleted": false
}
id
- (string) The unique identifier of the labelname
- (string) Optional. The name of the label to create. Labels are case insensitive and must be unique per projectdeleted
- (string) Optional. Whether or not the label has been deleted. By setting this to false
you can un-delete a previously deleted labelOne of name
or deleted
must be specified in the request.
Expect a 200 response code with an update Label model in the response body.
GET /api/data/v3/customtags/amazonkrek/projects/{project_id}/labels?deleted={deleted}&limit={limit}&page-token={page-token}
project_id
- (string) The project’s unique identifierdeleted
- (bool) Optional. Default: false. Returns only deleted or non-deleted labelslimit
- (int) Optional. Default: 10. Maximum: 1000. The number of labels to return per pagepage-token
- (string) Optional. The token to retrieve another page of results{
"labels": [
{
"label": {
"id": "somelabelid",
"project_id": "abc123",
"name": "Blue Jay",
"deleted": false,
"created_at": "2020-01-22T19:52:10.509479Z",
"updated_at": "2020-01-22T19:52:10.509479Z"
}
}
...
],
"next_page": "{next page token}",
"previous_page": "{previous page token}"
}
labels
- ([]LabelInfo) a list of LabelInfo modelsnext_page
- (string) The token to retrieve a subsequent page of results. If this is an empty string, there are no additional pages of resultsprevious_page
- (string) The token to retrieve the previous page of results. If this is an empty string, you are on the first page of resultsGET /api/data/v3/customtags/amazonrek/labels/{id}
id
- (string) The unique identifier of the labelExpect a 200 response code with a Label model in the response body.
This endpoint allows you to read multiple labels in a single request.
POST /api/data/v3/customtags/amazonrek/labels/bulk/read
{
"ids": ["id1", "id2", ... "idN"]
}
ids
- ([]string) Required. The list of label identifiers to retrieve{
"has_errors": false,
"results": {
"id1": {
"error": {
"message": "some error message",
"type": "an error category"
},
"object": {
"id": "id1",
"project_id": "abc123",
"name": "Blue Jay",
"deleted": false,
"created_at": "2020-01-22T19:52:10.509479Z",
"updated_at": "2020-01-22T19:52:10.509479Z"
}
},
"id2": {
"error": {
"message": "some error message",
"type": "an error category"
},
"object": {
"id": "id2",
"project_id": "abc123",
"name": "Robin",
"deleted": false,
"created_at": "2020-01-22T19:52:10.509479Z",
"updated_at": "2020-01-22T19:52:10.509479Z"
}
}
}
}
has_errors
- (bool) An indicator that one or more ids has an errorresults
- (map[string]BulkLabelRead) A map of responses for each id in the requestPOST /api/data/v3/customtags/amazonrek/projects/{id}/files
To upload a file, POST a multipart form requst to the above address. The file should be included in the file
parameter. Files must be a minimum of 64 pixels wide by 64 pixels high, maximum of 4096 pixels wide by 4096 pixels tall, and the aspect ratio must not exceed a maximum of 4:1. Files must be in either JPEG or PNG format.
Expect a 201 response with a File model in the body of the response
{
"id": "5e30b6461f16430821a56f3239b56326",
"project_id": "p1234",
"mime_type": "image/jpeg",
"deleted": false,
"created_at": "2020-01-28T22:31:35.035882Z",
"original_width": 1080,
"original_height": 1080,
"large_width": 1000,
"large_height": 1000,
"small_width": 200,
"small_height": 200
}
DELETE /api/data/v3/customtags/amazonrek/files/{id}
id
- The unique identifier of the fileExpect a 204 response.
GET /api/data/v3/customtags/amazonrek/files/{id}
id
- The unique identifier of the fileExpect a 200 response with a FileInfo model in the body of the response.
{
"file": {
"created_at": "2020-02-28T17:55:22.071366Z",
"deleted": false,
"filename": "f1.jpg",
"id": "f1",
"large_height": 600,
"large_width": 800,
"mime_type": "image/jpeg",
"original_height": 600,
"original_width": 800,
"project_id": "p1234",
"small_height": 600,
"small_width": 800
},
"labels": [
{
"label": {
"created_at": "2020-02-28T17:52:53.252489Z",
"deleted": false,
"id": "l1",
"name": "Cat",
"num_files": 2,
"num_instances": 2,
"project_id": "p1234",
"updated_at": "2020-02-28T17:52:53.252489Z"
},
"label_instances": [
{
"file_id": "f1",
"label_id": "l1"
}
]
},
{
"label": {
"created_at": "2020-02-28T17:52:53.252489Z",
"deleted": false,
"id": "l2",
"name": "Dog",
"num_files": 1,
"num_instances": 2,
"project_id": "p1234",
"updated_at": "2020-02-28T17:52:53.252489Z"
},
"label_instances": [
{
"file_id": "f1",
"label_id": "l2"
},
{
"file_id": "f1",
"label_id": "l2"
}
]
}
]
}
GET /api/data/v3/customtags/amazonrek/files/{id}/{size}
id
- The id of the filesize
- One of original
, large
, or small
Expect a 200 response with the correct Content-Type
header (either image/jpeg
or image/png
depending on the original uploaded content type), and the binary image data in the body of the response.
GET /api/data/v3/customtags/amazonrek/projects/{id}/files?limit={limit}&page-token={page-token}&unlabeled={unlabeled}&label_id={label_id}
unlabeled
- (bool) Optional. If not set, returns all non-deleted files. If set to true
, only returns files that do not have any labels applied to them. If set to false
, returns files that have one or more labels applied to them.label_id
- (string) Optional. If set, only files with the specified label_id
will be returned.limit
- (int) Optional. Default: 10. Maximum: 1000. The number of labels to return per pagepage-token
- (string) Optional. The token to retrieve another page of results{
"files": [
{
"file": {
"id": "5e30b6461f16430821a56f3239b56326",
"project_id": "p1234",
"mime_type": "image/jpeg",
"deleted": false,
"created_at": "2020-01-28T22:31:35.035882Z",
"original_width": 1080,
"original_height": 1080,
"large_width": 1000,
"large_height": 1000,
"small_width": 200,
"small_height": 200
},
"labels": [
{
"label_id": "somelabelid",
"file_id": "5e30b6461f16430821a56f3239b56326",
"top": 0.15567766,
"left": 0.3922065,
"width": 0.284666,
"height": 0.2930403,
},
...
]
}
...
],
"next_page": "{next page token}",
"previous_page": "{previous page token}"
}
files
- ([]FileInfo) a list of FileInfo modelsnext_page
- (string) The token to retrieve a subsequent page of results. If this is an empty string, there are no additional pages of resultsprevious_page
- (string) The token to retrieve the previous page of results. If this is an empty string, you are on the first page of resultsYou can search files based on their original filename. The search looks for partial matches in a case-insensitive manner.
Example: You uploaded “foo.jpg” and “FOO.png” and then searched for “foo”. You would get back a set of results containing both files.
POST /api/data/v3/customtags/amazonrek/projects/{id}/files/search?limit={limit}&page-token={page-token}
{
"query": "foo"
}
query
- (string) Required. The search string. Must be a minimum of two characterslimit
- (int) Optional. Default: 10. Maximum: 1000. The number of labels to return per pagepage-token
- (string) Optional. The token to retrieve another page of results{
"files": [
{
"file": {
"id": "5e30b6461f16430821a56f3239b56326",
"project_id": "p1234",
"mime_type": "image/jpeg",
"deleted": false,
"created_at": "2020-01-28T22:31:35.035882Z",
"original_width": 1080,
"original_height": 1080,
"large_width": 1000,
"large_height": 1000,
"small_width": 200,
"small_height": 200
},
"labels": [
{
"label_id": "somelabelid",
"file_id": "5e30b6461f16430821a56f3239b56326",
"top": 0.15567766,
"left": 0.3922065,
"width": 0.284666,
"height": 0.2930403,
},
...
]
}
...
],
"next_page": "{next page token}",
"previous_page": "{previous page token}"
}
files
- ([]FileInfo) a list of FileInfo modelsnext_page
- (string) The token to retrieve a subsequent page of results. If this is an empty string, there are no additional pages of resultsprevious_page
- (string) The token to retrieve the previous page of results. If this is an empty string, you are on the first page of resultsThis endpoint will allow you to replace labels on a file. All existing labels on the file are deleted and labels from the request will be added.
PUT /api/data/v3/customtags/amazonrek/files/{id}/label
{
"labels": [
{
"label_id": "somelabelid",
"top": 0.15567766,
"left": 0.3922065,
"width": 0.284666,
"height": 0.2930403,
},
...
]
}
id
- (string) The unique identifier of the filelabels
- []Object:label_id
- (string) Required. The id of the labeltop
- (float) Required if the project type is detection
. If the project type is not detection
, omit this key from the request. The top coordinate of the bounding box as a ratio of overall image heightleft
- (float) Required if the project type is detection
. If the project type is not detection
, omit this key from the request. The left coordinate of the bounding box as a ratio of overall image widthwidth
- (float) Required if the project type is detection
. If the project type is not detection
, omit this key from the request. The width of the bounding box as a ratio of the overall image widthheight
- (float) Required if the project type is detection
. If the project type is not detection
, omit this key from the request. The height of the bounding box as a ratio of the overall image heightExpect a 200 response with a FileInfo model in the body of the response.
{
"file": {
"id": "f1",
"project_id": "p1234",
"mime_type": "image/jpeg",
"filename": "f1.jpg",
"deleted": false,
"created_at": "2020-02-28T17:55:22.071366Z",
"original_width": 800,
"original_height": 600,
"large_width": 800,
"large_height": 600,
"small_width": 800,
"small_height": 600
},
"labels": [
{
"label_instances": [
{
"file_id": "f1",
"label_id": "l2"
}
],
"label": {
"id": "l2",
"project_id": "p1234",
"name": "Dog",
"deleted": false,
"num_files": 1,
"num_instances": 1,
"created_at": "2020-02-28T17:52:53.252489Z",
"updated_at": "2020-02-28T17:52:53.252489Z"
}
}
]
}
Creating a project version initiates the training of a model. This process can take several hours to complete and incurs cost.
POST /api/data/v3/customtags/amazonrek/projects/{id}/projectversions
{
"notes": "some notes"
}
id
- (string) The unique identifier of the project for which you want to create a new project versionnotes
- (string) A description of this version of the project. Perhaps you added new training data, a new label, etc.A successful response will issue an HTTP 201 status code and a ProjectVersion model in the body of the response.
GET /api/data/v3/customtags/amazonrek/projectversions/{id}
id
- (string) The project version unique identifierA successful response will issue an HTTP 200 status code and a ProjectVersionInfo model in the response body.
GET /api/data/v3/customtags/amazonrek/projects/{id}/projectversions?limit={limit}&page-token={page-token}
id
- (string) The id of the projectlimit
- (int) Optional. Default: 10. Maximum: 100. The number of project versions to return per pagepage-token
- (string) Optional. The token to retrieve another page of results{
"project_versions": [
{
"project_version": {
"id": "pv1",
"arn": "arn:aws:rekognition:us-west-2:913397769129:project/Arthur/version/v0/1575184617111",
"project_id": "p1234",
"name": "v0",
"notes": "initial version",
"active": true,
"created_at": "2020-02-07T22:32:35.276407Z",
"heartbeat": "2020-02-07T22:32:35.276407Z"
},
"status": "STOPPED",
"training_info": {
"billable_training_time_seconds": 4089,
"f1_score": 0.7576923370361328,
}
}
],
"next_page": "",
"previous_page": ""
}
project_versions
- ([]ProjectVersionInfo) An array of ProjectVersion models. Note that while this endpoint will return some of the training_info
fields, it will not return the evaluation_results
object even if it is available. Use the Project version read endpoint to get the detailed evaluation_results
object for a project version.next_page
- (string) The token to retrieve a subsequent page of results. If this is an empty string, there are no additional pages of results.previous_page
- (string) The token to retrieve the previous page of results. If this is an empty string, you are on the first page of results.Activating a project version approves that specific version of the project for use when analying your content.
POST /api/data/v3/customtags/amazonrek/projectversions/{id}/activate
id
- (string) The project version unique identifierA successful response will issue an HTTP 204 status code and an empty response body.
This documentation is generated from the latest version of GrayMeta Platform. For documentation relevant to your own deployed version, please use the documentation inside the application.
© 2021 GrayMeta, Inc.