forked from JiahuiYu/generative_inpainting
-
Notifications
You must be signed in to change notification settings - Fork 3
/
swagger.yaml
79 lines (62 loc) · 2.34 KB
/
swagger.yaml
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
openapi: 3.0.0
info:
title: Generative Inpainting
description: |
This API is about Genarative Inpainting opensource project.
You can erase something from an image and fill it with the surrounding.
You can test Generative Inpainting in API or **[Web Server](https://master-generative-inpainting-woomurf.endpoint.ainize.ai/)**.
Original Repo of project : [https://github.com/JiahuiYu/generative_inpainting](https://github.com/JiahuiYu/generative_inpainting)
---
How to use:
* Prepare image which marked to erase points in image with white. -> image
* Prepare image which have only white points to erase with alpha channel (PNG) -> mask
* Enter image and mask.
* Enter model name (places2 or celeba).
* Execute and wait some time.
* If you use web server above, you can use this api more easier.
version: "0.1"
license:
name: "Attribution-NonCommercial 4.0 International"
servers:
- url: https://master-generative-inpainting-woomurf.endpoint.ainize.ai/
paths:
/inpainting:
post:
requestBody:
required: true
description: |
Enter image and mask.
Enter model name (places2 or celeba).
[sample image](https://raw.githubusercontent.com/woomurf/generative_inpainting/master/examples/places2/case1_input.png)
[sample mask](https://raw.githubusercontent.com/woomurf/generative_inpainting/master/examples/places2/case1_mask.png)
content:
multipart/form-data:
schema:
type: object
properties:
image:
type: string
format: binary
mask:
type: string
format: binary
model:
type: string
default: places2
required:
- image
- mask
responses:
'200':
description: success
content:
images/*:
schema:
type: string
format: binary
'400':
description: Bad Request
'429':
description: Too Many Requests
'500':
description: Server side error