-
Notifications
You must be signed in to change notification settings - Fork 0
/
function.yaml
76 lines (70 loc) · 2.32 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
metadata:
name: openvino-omz-semantic-segmentation-adas-0001
namespace: cvat
annotations:
name: Semantic segmentation for ADAS
type: detector
framework: openvino
spec: |
[
{ "id": 0, "name": "road" },
{ "id": 1, "name": "sidewalk" },
{ "id": 2, "name": "building" },
{ "id": 3, "name": "wall" },
{ "id": 4, "name": "fence" },
{ "id": 5, "name": "pole" },
{ "id": 6, "name": "traffic light" },
{ "id": 7, "name": "traffic sign" },
{ "id": 8, "name": "vegetation" },
{ "id": 9, "name": "terrain" },
{ "id": 10, "name": "sky" },
{ "id": 11, "name": "person" },
{ "id": 12, "name": "rider" },
{ "id": 13, "name": "car" },
{ "id": 14, "name": "truck" },
{ "id": 15, "name": "bus" },
{ "id": 16, "name": "train" },
{ "id": 17, "name": "motorcycle" },
{ "id": 18, "name": "bicycle" },
{ "id": 19, "name": "ego-vehicle" },
{ "id": 20, "name": "background" }
]
spec:
description: Segmentation network to classify each pixel into typical 20 classes for ADAS
runtime: 'python:3.6'
handler: main:handler
eventTimeout: 30s
env:
- name: NUCLIO_PYTHON_EXE_PATH
value: /opt/nuclio/common/openvino/python3
build:
image: cvat/openvino.omz.intel.semantic-segmentation-adas-0001
baseImage: openvino/ubuntu18_dev:2020.2
directives:
preCopy:
- kind: USER
value: root
- kind: WORKDIR
value: /opt/nuclio
- kind: RUN
value: ln -s /usr/bin/pip3 /usr/bin/pip
- kind: RUN
value: /opt/intel/openvino/deployment_tools/open_model_zoo/tools/downloader/downloader.py --name semantic-segmentation-adas-0001 -o /opt/nuclio/open_model_zoo
postCopy:
- kind: RUN
value: apt update && DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y python3-skimage
- kind: RUN
value: pip3 install "numpy<1.16.0" # workaround for skimage
triggers:
myHttpTrigger:
maxWorkers: 2
kind: 'http'
workerAvailabilityTimeoutMilliseconds: 10000
attributes:
maxRequestBodySize: 33554432 # 32MB
platform:
attributes:
restartPolicy:
name: always
maximumRetryCount: 3
mountMode: volume