forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
function-gpu.yaml
135 lines (130 loc) · 5.83 KB
/
function-gpu.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
metadata:
name: tf-matterport-mask-rcnn
namespace: cvat
annotations:
name: Mask RCNN via Tensorflow
type: detector
framework: tensorflow
spec: |
[
{ "id": 0, "name": "BG", "type": "mask" },
{ "id": 1, "name": "person", "type": "mask" },
{ "id": 2, "name": "bicycle", "type": "mask" },
{ "id": 3, "name": "car", "type": "mask" },
{ "id": 4, "name": "motorcycle", "type": "mask" },
{ "id": 5, "name": "airplane", "type": "mask" },
{ "id": 6, "name": "bus", "type": "mask" },
{ "id": 7, "name": "train", "type": "mask" },
{ "id": 8, "name": "truck", "type": "mask" },
{ "id": 9, "name": "boat", "type": "mask" },
{ "id": 10, "name": "traffic_light", "type": "mask" },
{ "id": 11, "name": "fire_hydrant", "type": "mask" },
{ "id": 12, "name": "stop_sign", "type": "mask" },
{ "id": 13, "name": "parking_meter", "type": "mask" },
{ "id": 14, "name": "bench", "type": "mask" },
{ "id": 15, "name": "bird", "type": "mask" },
{ "id": 16, "name": "cat", "type": "mask" },
{ "id": 17, "name": "dog", "type": "mask" },
{ "id": 18, "name": "horse", "type": "mask" },
{ "id": 19, "name": "sheep", "type": "mask" },
{ "id": 20, "name": "cow", "type": "mask" },
{ "id": 21, "name": "elephant", "type": "mask" },
{ "id": 22, "name": "bear", "type": "mask" },
{ "id": 23, "name": "zebra", "type": "mask" },
{ "id": 24, "name": "giraffe", "type": "mask" },
{ "id": 25, "name": "backpack", "type": "mask" },
{ "id": 26, "name": "umbrella", "type": "mask" },
{ "id": 27, "name": "handbag", "type": "mask" },
{ "id": 28, "name": "tie", "type": "mask" },
{ "id": 29, "name": "suitcase", "type": "mask" },
{ "id": 30, "name": "frisbee", "type": "mask" },
{ "id": 31, "name": "skis", "type": "mask" },
{ "id": 32, "name": "snowboard", "type": "mask" },
{ "id": 33, "name": "sports_ball", "type": "mask" },
{ "id": 34, "name": "kite", "type": "mask" },
{ "id": 35, "name": "baseball_bat", "type": "mask" },
{ "id": 36, "name": "baseball_glove", "type": "mask" },
{ "id": 37, "name": "skateboard", "type": "mask" },
{ "id": 38, "name": "surfboard", "type": "mask" },
{ "id": 39, "name": "tennis_racket", "type": "mask" },
{ "id": 40, "name": "bottle", "type": "mask" },
{ "id": 41, "name": "wine_glass", "type": "mask" },
{ "id": 42, "name": "cup", "type": "mask" },
{ "id": 43, "name": "fork", "type": "mask" },
{ "id": 44, "name": "knife", "type": "mask" },
{ "id": 45, "name": "spoon", "type": "mask" },
{ "id": 46, "name": "bowl", "type": "mask" },
{ "id": 47, "name": "banana", "type": "mask" },
{ "id": 48, "name": "apple", "type": "mask" },
{ "id": 49, "name": "sandwich", "type": "mask" },
{ "id": 50, "name": "orange", "type": "mask" },
{ "id": 51, "name": "broccoli", "type": "mask" },
{ "id": 52, "name": "carrot", "type": "mask" },
{ "id": 53, "name": "hot_dog", "type": "mask" },
{ "id": 54, "name": "pizza", "type": "mask" },
{ "id": 55, "name": "donut", "type": "mask" },
{ "id": 56, "name": "cake", "type": "mask" },
{ "id": 57, "name": "chair", "type": "mask" },
{ "id": 58, "name": "couch", "type": "mask" },
{ "id": 59, "name": "potted_plant", "type": "mask" },
{ "id": 60, "name": "bed", "type": "mask" },
{ "id": 61, "name": "dining_table", "type": "mask" },
{ "id": 62, "name": "toilet", "type": "mask" },
{ "id": 63, "name": "tv", "type": "mask" },
{ "id": 64, "name": "laptop", "type": "mask" },
{ "id": 65, "name": "mouse", "type": "mask" },
{ "id": 66, "name": "remote", "type": "mask" },
{ "id": 67, "name": "keyboard", "type": "mask" },
{ "id": 68, "name": "cell_phone", "type": "mask" },
{ "id": 69, "name": "microwave", "type": "mask" },
{ "id": 70, "name": "oven", "type": "mask" },
{ "id": 71, "name": "toaster", "type": "mask" },
{ "id": 72, "name": "sink", "type": "mask" },
{ "id": 73, "name": "refrigerator", "type": "mask" },
{ "id": 74, "name": "book", "type": "mask" },
{ "id": 75, "name": "clock", "type": "mask" },
{ "id": 76, "name": "vase", "type": "mask" },
{ "id": 77, "name": "scissors", "type": "mask" },
{ "id": 78, "name": "teddy_bear", "type": "mask" },
{ "id": 79, "name": "hair_drier", "type": "mask" },
{ "id": 80, "name": "toothbrush", "type": "mask" }
]
spec:
description: Mask RCNN optimized for GPU
runtime: 'python:3.6'
handler: main:handler
eventTimeout: 30s
env:
- name: MASK_RCNN_DIR
value: /opt/nuclio/Mask_RCNN
build:
image: cvat.tf.matterport.mask_rcnn:latest-gpu
baseImage: tensorflow/tensorflow:1.15.5-gpu-py3
directives:
postCopy:
- kind: WORKDIR
value: /opt/nuclio
- kind: RUN
value: apt update && apt install --no-install-recommends -y git curl
- kind: RUN
value: git clone --depth 1 https://github.com/matterport/Mask_RCNN.git
- kind: RUN
value: curl -L https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5 -o Mask_RCNN/mask_rcnn_coco.h5
- kind: RUN
value: pip3 install numpy cython pyyaml keras==2.1.0 scikit-image Pillow
triggers:
myHttpTrigger:
maxWorkers: 1
kind: 'http'
workerAvailabilityTimeoutMilliseconds: 10000
attributes:
maxRequestBodySize: 33554432 # 32MB
resources:
limits:
nvidia.com/gpu: 1
platform:
attributes:
restartPolicy:
name: always
maximumRetryCount: 3
mountMode: volume