-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Open API Documentation for Object Detection Endpoints (#846)
* added object-detection.yaml and endpoints folder * renamed endpoints folder to train and added object-detection.yaml to openapi.yaml * added train tag * added parameters data to openapi.yaml * fixed location of required: true * changed tags to train * changed summary to object detection * added documentation for transforms * changed problem type to detection type * added notification phone number and email to review --------- Co-authored-by: Austin Tsang <[email protected]>
- Loading branch information
1 parent
c6c0b19
commit 55dab2d
Showing
2 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
post: | ||
summary: Object Detection | ||
description: API Endpoint to create an object-detection trainspace. | ||
tags: | ||
- train | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- uid | ||
- dataset_data | ||
- name | ||
- parameters_data | ||
- review_data | ||
properties: | ||
uid: | ||
type: string | ||
description: User ID | ||
dataset_data: | ||
type: object | ||
description: Image to run detection on | ||
name: | ||
type: string | ||
description: Name of the trainspace | ||
review_data: | ||
type: object | ||
description: Phone number and email of the user | ||
properties: | ||
notification_phone_number: | ||
type: string | ||
description: Phone number of the user | ||
notification_email: | ||
type: string | ||
description: Email of the user | ||
parameters_data: | ||
type: object | ||
description: Parameters for the detection | ||
properties: | ||
detection_type: | ||
type: string | ||
description: Type of detection | ||
detection_problem_type: | ||
type: string | ||
description: Type of detection problem | ||
transforms: | ||
type: array | ||
description: Transforms to apply to the image | ||
items: | ||
type: object | ||
description: Transform to apply to the image | ||
properties: | ||
value: | ||
type: string | ||
description: Type of transform to apply | ||
parameters: | ||
type: array | ||
description: Parameters for the transform | ||
|
||
example: | ||
uid: "1234" | ||
dataset_data: { "name": "image.jpg" } | ||
name: "trainspace" | ||
review_data: | ||
{ | ||
"notification_phone_number": "1234567890", | ||
"notification_email": "[email protected]", | ||
} | ||
parameters_data: | ||
{ | ||
"problem_type": "rekognition", | ||
"detection_problem_type": "labels", | ||
"transforms": [{ "value": "Resize", "parameters": [100, 100] }], | ||
} | ||
required: true | ||
responses: | ||
"200": | ||
description: Trainspace created successfully | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
message: | ||
type: string | ||
example: "success" | ||
trainspace_id: | ||
type: string | ||
example: "1234" | ||
"400": | ||
description: Trainspace Creation didn't go through successfully. This is usually something wrong with your code | ||
"401": | ||
description: User is not authenticated | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
error: | ||
type: string | ||
example: "User is not authenticated" |