forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
function.yaml
132 lines (126 loc) · 6.06 KB
/
function.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
metadata:
name: tf-faster-rcnn-inception-v2-coco
namespace: cvat
annotations:
name: Faster RCNN via Tensorflow
type: detector
framework: tensorflow
spec: |
[
{ "id": 1, "name": "person", "type": "rectangle" },
{ "id": 2, "name": "bicycle", "type": "rectangle" },
{ "id": 3, "name": "car", "type": "rectangle" },
{ "id": 4, "name": "motorcycle", "type": "rectangle" },
{ "id": 5, "name": "airplane", "type": "rectangle" },
{ "id": 6, "name": "bus", "type": "rectangle" },
{ "id": 7, "name": "train", "type": "rectangle" },
{ "id": 8, "name": "truck", "type": "rectangle" },
{ "id": 9, "name": "boat", "type": "rectangle" },
{ "id":10, "name": "traffic_light", "type": "rectangle" },
{ "id":11, "name": "fire_hydrant", "type": "rectangle" },
{ "id":13, "name": "stop_sign", "type": "rectangle" },
{ "id":14, "name": "parking_meter", "type": "rectangle" },
{ "id":15, "name": "bench", "type": "rectangle" },
{ "id":16, "name": "bird", "type": "rectangle" },
{ "id":17, "name": "cat", "type": "rectangle" },
{ "id":18, "name": "dog", "type": "rectangle" },
{ "id":19, "name": "horse", "type": "rectangle" },
{ "id":20, "name": "sheep", "type": "rectangle" },
{ "id":21, "name": "cow", "type": "rectangle" },
{ "id":22, "name": "elephant", "type": "rectangle" },
{ "id":23, "name": "bear", "type": "rectangle" },
{ "id":24, "name": "zebra", "type": "rectangle" },
{ "id":25, "name": "giraffe", "type": "rectangle" },
{ "id":27, "name": "backpack", "type": "rectangle" },
{ "id":28, "name": "umbrella", "type": "rectangle" },
{ "id":31, "name": "handbag", "type": "rectangle" },
{ "id":32, "name": "tie", "type": "rectangle" },
{ "id":33, "name": "suitcase", "type": "rectangle" },
{ "id":34, "name": "frisbee", "type": "rectangle" },
{ "id":35, "name": "skis", "type": "rectangle" },
{ "id":36, "name": "snowboard", "type": "rectangle" },
{ "id":37, "name": "sports_ball", "type": "rectangle" },
{ "id":38, "name": "kite", "type": "rectangle" },
{ "id":39, "name": "baseball_bat", "type": "rectangle" },
{ "id":40, "name": "baseball_glove", "type": "rectangle" },
{ "id":41, "name": "skateboard", "type": "rectangle" },
{ "id":42, "name": "surfboard", "type": "rectangle" },
{ "id":43, "name": "tennis_racket", "type": "rectangle" },
{ "id":44, "name": "bottle", "type": "rectangle" },
{ "id":46, "name": "wine_glass", "type": "rectangle" },
{ "id":47, "name": "cup", "type": "rectangle" },
{ "id":48, "name": "fork", "type": "rectangle" },
{ "id":49, "name": "knife", "type": "rectangle" },
{ "id":50, "name": "spoon", "type": "rectangle" },
{ "id":51, "name": "bowl", "type": "rectangle" },
{ "id":52, "name": "banana", "type": "rectangle" },
{ "id":53, "name": "apple", "type": "rectangle" },
{ "id":54, "name": "sandwich", "type": "rectangle" },
{ "id":55, "name": "orange", "type": "rectangle" },
{ "id":56, "name": "broccoli", "type": "rectangle" },
{ "id":57, "name": "carrot", "type": "rectangle" },
{ "id":58, "name": "hot_dog", "type": "rectangle" },
{ "id":59, "name": "pizza", "type": "rectangle" },
{ "id":60, "name": "donut", "type": "rectangle" },
{ "id":61, "name": "cake", "type": "rectangle" },
{ "id":62, "name": "chair", "type": "rectangle" },
{ "id":63, "name": "couch", "type": "rectangle" },
{ "id":64, "name": "potted_plant", "type": "rectangle" },
{ "id":65, "name": "bed", "type": "rectangle" },
{ "id":67, "name": "dining_table", "type": "rectangle" },
{ "id":70, "name": "toilet", "type": "rectangle" },
{ "id":72, "name": "tv", "type": "rectangle" },
{ "id":73, "name": "laptop", "type": "rectangle" },
{ "id":74, "name": "mouse", "type": "rectangle" },
{ "id":75, "name": "remote", "type": "rectangle" },
{ "id":76, "name": "keyboard", "type": "rectangle" },
{ "id":77, "name": "cell_phone", "type": "rectangle" },
{ "id":78, "name": "microwave", "type": "rectangle" },
{ "id":79, "name": "oven", "type": "rectangle" },
{ "id":80, "name": "toaster", "type": "rectangle" },
{ "id":81, "name": "sink", "type": "rectangle" },
{ "id":83, "name": "refrigerator", "type": "rectangle" },
{ "id":84, "name": "book", "type": "rectangle" },
{ "id":85, "name": "clock", "type": "rectangle" },
{ "id":86, "name": "vase", "type": "rectangle" },
{ "id":87, "name": "scissors", "type": "rectangle" },
{ "id":88, "name": "teddy_bear", "type": "rectangle" },
{ "id":89, "name": "hair_drier", "type": "rectangle" },
{ "id":90, "name": "toothbrush", "type": "rectangle" }
]
spec:
description: Faster RCNN from Tensorflow Object Detection API
runtime: 'python:3.6'
handler: main:handler
eventTimeout: 30s
build:
image: cvat.tf.faster_rcnn_inception_v2_coco
baseImage: tensorflow/tensorflow:2.1.1
directives:
preCopy:
- kind: RUN
value: apt install curl
- kind: WORKDIR
value: /opt/nuclio
postCopy:
- kind: RUN
value:
curl -O http://download.tensorflow.org/models/object_detection/faster_rcnn_inception_v2_coco_2018_01_28.tar.gz &&
tar -xzf faster_rcnn_inception_v2_coco_2018_01_28.tar.gz && rm faster_rcnn_inception_v2_coco_2018_01_28.tar.gz
- kind: RUN
value: ln -s faster_rcnn_inception_v2_coco_2018_01_28 faster_rcnn
- kind: RUN
value: pip install pillow pyyaml
triggers:
myHttpTrigger:
maxWorkers: 2
kind: 'http'
workerAvailabilityTimeoutMilliseconds: 10000
attributes:
maxRequestBodySize: 33554432 # 32MB
platform:
attributes:
restartPolicy:
name: always
maximumRetryCount: 3
mountMode: volume