Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

Commit 2a5111c

Browse files
committed
Merge remote-tracking branch 'upstream/v20.4'
2 parents 3386532 + b77aea7 commit 2a5111c

File tree

55 files changed

+521
-1460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+521
-1460
lines changed

ATTRIBUTION.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
Component: Chart.js
3+
Repository: https://github.com/chartjs/Chart.js
4+
License: MIT (https://github.com/chartjs/Chart.js/blob/master/LICENSE.md)
5+
6+
Component: jQuery (New Wave JavaScript)
7+
Repository: https://github.com/jquery/jquery
8+
License: MIT (https://github.com/jquery/jquery/blob/master/LICENSE.txt)
9+
10+
Component: Moment.js
11+
Repository: https://github.com/moment/moment
12+
License: MIT (https://github.com/moment/moment/blob/develop/LICENSE)
13+
14+
Component: OpenVINO(TM) Toolkit - Open Model Zoo
15+
Repository: https://github.com/opencv/open_model_zoo
16+
License: Apache-2.0 (https://github.com/opencv/open_model_zoo/blob/master/LICENSE)
17+
18+
Component: What Input
19+
Repository: https://github.com/ten1seven/what-input
20+
License: MIT (https://github.com/ten1seven/what-input/blob/master/LICENSE)
21+
22+
Component: chartjs-plugin-colorschemes
23+
Repository: https://github.com/nagix/chartjs-plugin-colorschemes
24+
License: MIT (https://github.com/nagix/chartjs-plugin-colorschemes/blob/master/LICENSE.md)
25+
26+
Component: Foundation for Sites
27+
Repository: https://github.com/zurb/foundation-sites-6
28+
License: MIT (https://github.com/zurb/foundation-sites-6/blob/develop/LICENSE)
29+
30+
Component: Foundation Icon Font Sets
31+
Repository: https://github.com/zurb/foundation-icons
32+
License: MIT (https://github.com/zurb/foundation-icons/blob/master/MIT-LICENSE.txt)
33+
34+
Component: Video Analytics Serving
35+
Repository: https://github.com/intel/video-analytics-serving
36+
License: BSD-3 (https://github.com/intel/video-analytics-serving/blob/master/LICENSE)
37+
38+
Component: hls.js
39+
Repository: https://github.com/video-dev/hls.js
40+
License: Apache 2.0 (https://github.com/video-dev/hls.js/blob/master/LICENSE)

CMakeLists.txt

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,41 @@ if (NOT DEFINED MINRESOLUTION)
2525
set(MINRESOLUTION "360p")
2626
endif()
2727

28+
if (NOT DEFINED NETWORK)
29+
if(PLATFORM STREQUAL "Xeon")
30+
set(NETWORK "INT8,FP32")
31+
endif()
32+
if(PLATFORM STREQUAL "VCAC-A")
33+
set(NETWORK "FP16")
34+
endif()
35+
endif()
36+
37+
if(PLATFORM STREQUAL "Xeon")
38+
if((NOT (NETWORK MATCHES "FP32")) AND (NOT (NETWORK MATCHES "INT8")))
39+
if(NOT (NETWORK MATCHES "FP32"))
40+
set(NETWORK "FP32,${NETWORK}")
41+
endif()
42+
if(NOT (NETWORK MATCHES "INT8"))
43+
set(NETWORK "INT8,${NETWORK}")
44+
endif()
45+
endif()
46+
if(NETWORK MATCHES "FP16")
47+
string(REGEX REPLACE "FP16,*" "" NETWORK ${NETWORK})
48+
endif()
49+
endif()
50+
if(PLATFORM STREQUAL "VCAC-A")
51+
if(NOT (NETWORK MATCHES "FP16"))
52+
set(NETWORK "FP16,${NETWORK}")
53+
endif()
54+
if(NETWORK MATCHES "FP32")
55+
string(REGEX REPLACE "FP32,*" "" NETWORK ${NETWORK})
56+
endif()
57+
if(NETWORK MATCHES "INT8")
58+
string(REGEX REPLACE "INT8,*" "" NETWORK ${NETWORK})
59+
endif()
60+
endif()
61+
string(REGEX REPLACE ",$" "" NETWORK ${NETWORK})
62+
2863
file(GLOB dirs "deployment" "*")
2964
list(REMOVE_DUPLICATES dirs)
3065
foreach (dir ${dirs})
@@ -36,4 +71,4 @@ endforeach()
3671
# legal message
3772
execute_process(COMMAND printf "\nThis script will build third party components licensed under various open source licenses into your container images. The terms under which those components may be used and distributed can be found with the license document that is provided with those components. Please familiarize yourself with those terms to ensure your distribution of those components complies with the terms of those licenses.\n\n")
3873

39-
execute_process(COMMAND printf "\n-- Setting: PLATFORM=${PLATFORM}, FRAMEWORK=${FRAMEWORK}, NTRANSCODES=${NTRANSCODES}, NANALYTICS=${NANALYTICS}, MINRESOLUTION=${MINRESOLUTION}\n")
74+
execute_process(COMMAND printf "\n-- Setting: PLATFORM=${PLATFORM}, FRAMEWORK=${FRAMEWORK}, NTRANSCODES=${NTRANSCODES}, NANALYTICS=${NANALYTICS}, NETWORK=${NETWORK}, MINRESOLUTION=${MINRESOLUTION}\n")

ad-insertion/ad-segment/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
FROM openvisualcloud/xeon-ubuntu1804-media-ffmpeg:20.1
2+
FROM openvisualcloud/xeon-ubuntu1804-media-ffmpeg:20.4
33
RUN apt-get update && apt-get install -y -q bc && rm -rf /var/lib/apt/lists/*;
44

55
####

ad-insertion/ad-static/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
FROM openvisualcloud/xeon-ubuntu1804-media-ffmpeg:20.1
2+
FROM openvisualcloud/xeon-ubuntu1804-media-ffmpeg:20.4
33

44
####
55
ARG USER

ad-insertion/ad-transcode/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
FROM openvisualcloud/xeon-ubuntu1804-media-ffmpeg:20.1
2+
FROM openvisualcloud/xeon-ubuntu1804-media-ffmpeg:20.4
33

44
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y -q --no-install-recommends nginx python3-tornado python3-urllib3 python3-requests python3-psutil python3-pip && rm -rf /var/lib/apt/lists/* && \
55
pip3 install 'kafka-python>=1.4.7' 'kazoo>=2.6.1'
Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,45 @@
11
# ssai_analytics_ffmpeg_vcac-a
22

3-
ARG base_name=openvisualcloud/vcaca-ubuntu1804-analytics-ffmpeg:20.1
3+
ARG base_name=openvisualcloud/vcaca-ubuntu1804-analytics-ffmpeg:20.4
4+
5+
FROM ${base_name} as build
6+
7+
RUN DEBIAN_FRONTEND=noninteractive apt-get update -qq && apt-get install -qq git ca-certificates python3 python3-pip && rm -rf /var/lib/apt/lists/*
8+
ARG VA_SERVING_REPO=https://github.com/intel/video-analytics-serving.git
9+
ARG VA_SERVING_BRANCH="v0.3_preview"
10+
ARG VA_SERVING_TAG="1b342051b85682beadb1ec173f848697fa2f02b2"
11+
12+
13+
RUN git clone ${VA_SERVING_REPO} -b ${VA_SERVING_BRANCH} --depth 1
14+
RUN cd video-analytics-serving; git checkout ${VA_SERVING_TAG}
15+
#RUN pip3 install --ignore-installed --target /home/build -r video-analytics-serving/requirements.txt
16+
RUN rm -rf /home/video-analytics-serving/vaserving/__main__.py
17+
RUN rm -rf /home/video-analytics-serving/vaserving/rest_api
18+
419
FROM ${base_name}
5-
20+
621
# Fetch python3 and Install python3
722
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y -q --no-install-recommends libgirepository-1.0-1 libsoup2.4.1 libjson-c3 python3-jsonschema python3-gi python3-requests python3-tornado python3-pip python3-setuptools python3-wheel && rm -rf /var/lib/apt/lists/* && \
823
pip3 install 'kafka-python>=1.4.7' 'kazoo>=2.6.1'
9-
10-
COPY app /home/
24+
25+
#COPY --from=build /home/build/ /usr/lib/python3/dist-packages
26+
COPY --from=build /home/video-analytics-serving/vaserving /home/vaserving
1127
COPY models/ /home/models/
1228
COPY gallery/ /home/gallery/
1329
COPY VCAC-A/ffmpeg/pipelines/ /home/pipelines/
1430
COPY *.py /home/
1531
COPY --from=ssai_common /home/*.py /home/
16-
32+
ENV LOG_LEVEL "DEBUG"
33+
ENV FRAMEWORK=ffmpeg
1734
WORKDIR /home
18-
CMD ["/home/main.py"]
35+
CMD ["/home/analyze.py"]
1936

2037
####
2138
ARG USER
2239
ARG GROUP
2340
ARG UID
2441
ARG GID
2542
## must use ; here to ignore user exist status code
26-
RUN groupadd -f -g ${GID} ${GROUP};useradd -d /home -g ${GROUP} -K UID_MIN=${UID} ${USER};chown -R ${USER}.${GROUP} /home;
43+
RUN groupadd -f -g ${GID} ${GROUP};useradd -d /home -g ${GROUP} -K UID_MIN=${UID} ${USER};chown -R ${USER}.${GROUP} /home;
2744
#USER ${USER}
2845
####

ad-insertion/analytics/VCAC-A/ffmpeg/pipelines/emotion_recognition/1/pipeline.json

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,35 @@
22
"name": "emotion_recognition",
33
"version": 1,
44
"type": "FFmpeg",
5-
"template":"-flags unaligned -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device /dev/dri/renderD128 -i \"{source[uri]}\" -vf \"detect=model={models[face_detection_retail][1][network]}:model_proc=\"{models[face_detection_retail][1][proc]}\":interval=\"{parameters[every-nth-frame]}\":device=HDDL:nireq=\"{parameters[nireq]}\",classify=model=\"{models[emotion_recognition][1][network]}\":model_proc=\"{models[emotion_recognition][1][proc]}\":device=HDDL,metaconvert=converter=json:method=all:source=NULL:tags=NULL\"",
6-
"description":"Emotion Recognition",
5+
"template": [
6+
"-flags unaligned -hwaccel vaapi -hwaccel_output_format vaapi",
7+
" -hwaccel_device /dev/dri/renderD128 -i \"{source[uri]}\" ",
8+
"-vf \"detect=model={models[face_detection_retail][1][network]}",
9+
":model_proc=\"{models[face_detection_retail][1][proc]}\"",
10+
":interval=\"{parameters[every-nth-frame]}\":device=HDDL:nireq=\"{parameters[nireq]}\",",
11+
"classify=model=\"{models[emotion_recognition][1][network]}\"",
12+
":model_proc=\"{models[emotion_recognition][1][proc]}\":device=HDDL,",
13+
"metaconvert\"",
14+
" -an -y -f metapublish"
15+
],
16+
"description": "Emotion Recognition",
717
"parameters": {
8-
"type" : "object",
9-
"properties" : {
10-
"every-nth-frame": {
11-
"element":"detection",
18+
"type": "object",
19+
"properties": {
20+
"inference-interval": {
21+
"element": "detection",
1222
"type": "integer",
1323
"minimum": 0,
1424
"maximum": 4294967295,
1525
"default": 1
1626
},
1727
"nireq": {
18-
"element":"detection",
28+
"element": "detection",
1929
"type": "integer",
2030
"minimum": 1,
2131
"maximum": 64,
2232
"default": 2
2333
}
2434
}
2535
}
26-
}
27-
28-
36+
}

ad-insertion/analytics/VCAC-A/ffmpeg/pipelines/face_recognition/1/pipeline.json

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,34 @@
22
"name": "face_recognition",
33
"version": 1,
44
"type": "FFmpeg",
5-
"template":"-flags unaligned -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device /dev/dri/renderD128 -i \"{source[uri]}\" -vf \"detect=model={models[face_detection_retail][1][network]}:model_proc=\"{models[face_detection_retail][1][proc]}\":interval=\"{parameters[every-nth-frame]}\":device=HDDL:nireq=\"{parameters[nireq]}\",classify=model=\"{models[face_reidentification][1][network]}\":model_proc=\"{models[face_reidentification][1][proc]}\":device=HDDL\",identify=gallery=\"/home/gallery/face_gallery_FP16/gallery.json,metaconvert=converter=json:method=all:source=NULL:tags=NULL\"",
6-
"description":"Face Recognition",
5+
"template": [
6+
"-flags unaligned -hwaccel vaapi -hwaccel_output_format vaapi",
7+
" -hwaccel_device /dev/dri/renderD128 -i \"{source[uri]}\" ",
8+
"-vf \"detect=model={models[face_detection_retail][1][network]}",
9+
":model_proc=\"{models[face_detection_retail][1][proc]}\"",
10+
":interval=\"{parameters[inference-interval]}\":device=HDDL:nireq=\"{parameters[nireq]}\",",
11+
"classify=model=\"{models[face_reidentification][1][network]}\":model_proc=\"{models[face_reidentification][1][proc]}\":device=HDDL,",
12+
"identify=gallery=\"/home/gallery/face_gallery_FP16/gallery.json\",metaconvert\"",
13+
" -y -an -f metapublish"
14+
],
15+
"description": "Face Recognition",
716
"parameters": {
8-
"type" : "object",
9-
"properties" : {
10-
"every-nth-frame": {
11-
"element":"detection",
17+
"type": "object",
18+
"properties": {
19+
"inference-interval": {
20+
"element": "detection",
1221
"type": "integer",
1322
"minimum": 0,
1423
"maximum": 4294967295,
1524
"default": 1
1625
},
1726
"nireq": {
18-
"element":"detection",
27+
"element": "detection",
1928
"type": "integer",
2029
"minimum": 1,
2130
"maximum": 64,
2231
"default": 2
2332
}
2433
}
2534
}
26-
}
35+
}

ad-insertion/analytics/VCAC-A/ffmpeg/pipelines/object_detection/1/pipeline.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,31 @@
22
"name": "object_detection",
33
"version": 1,
44
"type": "FFmpeg",
5-
"template":"-flags unaligned -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device /dev/dri/renderD128 -i \"{source[uri]}\" -vf \"detect=model={models[object_detection][1][network]}:device=HDDL:model_proc=\"{models[object_detection][1][proc]}\":interval={parameters[every-nth-frame]}:nireq={parameters[nireq]},metaconvert=converter=json:method=all:source=NULL:tags=NULL\"",
5+
"template": [
6+
"-flags unaligned -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device /dev/dri/renderD128",
7+
" -i \"{source[uri]}\" -vf \"detect=model={models[object_detection][1][network]}",
8+
":device=HDDL:model_proc=\"{models[object_detection][1][proc]}\":interval={parameters[inference-interval]}",
9+
":nireq={parameters[nireq]},metaconvert\"",
10+
" -an -y -f metapublish"
11+
],
612
"description": "Object Detection",
713
"parameters": {
8-
"type" : "object",
9-
"properties" : {
10-
"every-nth-frame": {
11-
"element":"detection",
14+
"type": "object",
15+
"properties": {
16+
"inference-interval": {
17+
"element": "detection",
1218
"type": "integer",
1319
"minimum": 0,
1420
"maximum": 4294967295,
1521
"default": 6
1622
},
1723
"nireq": {
18-
"element":"detection",
24+
"element": "detection",
1925
"type": "integer",
2026
"minimum": 1,
2127
"maximum": 64,
2228
"default": 2
2329
}
2430
}
2531
}
26-
}
27-
28-
32+
}

ad-insertion/analytics/VCAC-A/gst/Dockerfile

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,45 @@
1-
# ssai_analytics_gst_vcac-a
1+
# ssai_analytics_gst_vcac-a
22

3-
FROM openvisualcloud/vcaca-ubuntu1804-analytics-gst:20.1
3+
FROM openvisualcloud/vcaca-ubuntu1804-analytics-gst:20.4 as build
44

5+
RUN DEBIAN_FRONTEND=noninteractive apt-get update -qq && apt-get install -qq git ca-certificates python3 python3-pip && rm -rf /var/lib/apt/lists/*
6+
ARG VA_SERVING_REPO=https://github.com/intel/video-analytics-serving.git
7+
ARG VA_SERVING_BRANCH="v0.3_preview"
8+
ARG VA_SERVING_TAG="1b342051b85682beadb1ec173f848697fa2f02b2"
9+
10+
RUN git clone ${VA_SERVING_REPO} -b ${VA_SERVING_BRANCH} --depth 1
11+
RUN cd video-analytics-serving; git checkout ${VA_SERVING_TAG}
12+
#RUN pip3 install --ignore-installed --target /home/build -r video-analytics-serving/requirements.txt
13+
RUN rm -rf /home/video-analytics-serving/vaserving/__main__.py
14+
RUN rm -rf /home/video-analytics-serving/vaserving/rest_api
15+
16+
FROM openvisualcloud/vcaca-ubuntu1804-analytics-gst:20.4
517
# Fetch python3 and Install python3
618
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y -q --no-install-recommends libjson-c3 python3-gst-1.0 python3-jsonschema python3-gi python3-requests python3-tornado python3-pip python3-setuptools python3-wheel && rm -rf /var/lib/apt/lists/* && \
719
pip3 install 'kafka-python>=1.4.7' 'kazoo>=2.6.1'
820

9-
COPY app /home/
21+
#COPY --from=build /home/build/ /usr/lib/python3/dist-packages
22+
COPY --from=build /home/video-analytics-serving/vaserving /home/vaserving
23+
1024
COPY models/ /home/models/
25+
RUN mv /home/models/object_detection/1/mobilenet-ssd.json.gst /home/models/object_detection/1/mobilenet-ssd.json && \
26+
mv /home/models/emotion_recognition/1/emotions-recognition-retail-0003.json.gst /home/models/emotion_recognition/1/emotions-recognition-retail-0003.json && \
27+
mv /home/models/face_detection_adas/1/face-detection-adas-0001.json.gst /home/models/face_detection_adas/1/face-detection-adas-0001.json && \
28+
mv /home/models/face_detection_retail/1/face-detection-retail-0004.json.gst /home/models/face_detection_retail/1/face-detection-retail-0004.json && \
29+
mv /home/models/landmarks_regression/1/landmarks-regression-retail-0009.json.gst /home/models/landmarks_regression/1/landmarks-regression-retail-0009.json && \
30+
mv /home/models/face_reidentification/1/face-reidentification-retail-0095.json.gst /home/models/face_reidentification/1/face-reidentification-retail-0095.json
31+
1132
COPY gallery/ /home/gallery/
33+
RUN mv /home/gallery/face_gallery_FP16/gallery.json.gst /home/gallery/face_gallery_FP16/gallery.json && \
34+
mv /home/gallery/face_gallery_FP32/gallery.json.gst /home/gallery/face_gallery_FP32/gallery.json
35+
1236
COPY VCAC-A/gst/pipelines/ /home/pipelines/
1337
COPY *.py /home/
1438
COPY --from=ssai_common /home/*.py /home/
15-
39+
ENV LOG_LEVEL "DEBUG"
40+
ENV FRAMEWORK gstreamer
1641
WORKDIR /home
17-
CMD ["/home/main.py"]
42+
CMD ["/home/analyze.py"]
1843

1944
###
2045
ARG USER

0 commit comments

Comments
 (0)