forked from sRassmann/deeplasia-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deeplasia-api.yml
85 lines (85 loc) · 2.49 KB
/
deeplasia-api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
openapi: 3.0.3
info:
title: Deeplasia Service API
version: 0.1.0
description: This is the OpenAPI specification of the Deeplasia bone age assessment service.
license:
name: CC BY-NC-SA 4.0 DEED
url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en'
servers:
- url: 'http://localhost:8080'
description: Localhost instance.
- url: 'http://host.docker.internal:8080'
description: In case the server is running on the Docker host.
paths:
/predict:
post:
summary: Send an X-ray image with additional configurations to get a bone age prediction.
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/PredictionInput'
responses:
'200':
description: The result of the bone age prediction.
content:
application/json:
schema:
$ref: '#/components/schemas/BoneAgePrediction'
'400':
description: Bad request.
'500':
description: Internal server error.
tags:
- boneAge
components:
schemas:
BoneAgePrediction:
description: Result of a bone age prediction.
type: object
properties:
bone_age:
description: The predicted bone age in months.
type: number
format: double
example: 164.9562530517578
sex_predicted:
description: Whether the sex that was used for the prediction was also predicted or given in the configurations.
type: boolean
example: false
used_sex:
description: The sex that was used for the prediction.
type: string
enum:
- female
- male
required:
- bone_age
- sex_predicted
- used_sex
PredictionInput:
description: Input to perform a bone age prediction.
type: object
properties:
sex:
description: |
The sex of the person of whom the X-ray image was taken.
If not specified, sex is also predicted.
type: string
enum:
- female
- male
use_mask:
description: Whether to apply a mask before predicting bone age.
type: boolean
default: true
file:
description: The X-ray image.
type: string
format: binary
required:
- file
tags:
- name: boneAge
description: Everything about bone age predictions.