Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xwu2git committed Jun 2, 2020
0 parents commit b66f17d
Show file tree
Hide file tree
Showing 160 changed files with 30,217 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
189 changes: 189 additions & 0 deletions ATTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@

Component: libva-utils
Repository: https://github.com/intel/libva-utils
License: https://github.com/intel/libva-utils/blob/master/COPYING

Component: Chart.js
Repository: https://github.com/chartjs/Chart.js
License: MIT (https://github.com/chartjs/Chart.js/blob/master/LICENSE.md)

Component: curl
Repository: https://github.com/curl/curl
License: https://github.com/curl/curl/blob/master/COPYING

Component: ffmpeg
Repository: https://ffmpeg.org
License: https://ffmpeg.org/legal.html

Component: Foundation Icon Font Sets
Repository: https://github.com/zurb/foundation-icons
License: MIT (https://github.com/zurb/foundation-icons/blob/master/MIT-LICENSE.txt)

Component: gflags
Repository: https://github.com/gflags/gflags
License: https://github.com/gflags/gflags/blob/master/COPYING.txt

Component: glog
Repository: https://github.com/google/glog
License: https://github.com/google/glog/blob/master/COPYING

Component: Google Test
Repository: https://github.com/google/googletest
License: https://github.com/google/googletest/blob/master/LICENSE

Component: gst-libav
Repository: https://github.com/GStreamer/gst-libav
License: https://github.com/GStreamer/gst-libav/blob/master/COPYING

Component: Gstreamer
Repository: https://github.com/GStreamer/gstreamer
License: https://github.com/GStreamer/gstreamer/blob/master/COPYING

Component: Gstreamer ORC
Repository: https://github.com/GStreamer/orc
License: https://github.com/GStreamer/orc/blob/master/COPYING

Component: Gstreamer plugin-bad
Repository: https://github.com/GStreamer/gst-plugins-bad
License: https://github.com/GStreamer/gst-plugins-bad/blob/master/COPYING

Component: Gstreamer plugin-base
Repository: https://github.com/GStreamer/gst-plugins-base
License: https://github.com/GStreamer/gst-plugins-base/blob/master/COPYING

Component: Gstreamer plugin-good
Repository: https://github.com/GStreamer/gst-plugins-good
License: https://github.com/GStreamer/gst-plugins-good/blob/master/COPYING

Component: Gstreamer plugin-ugly
Repository: https://github.com/GStreamer/gst-plugins-ugly
License: https://github.com/GStreamer/gst-plugins-ugly/blob/master/COPYING

Component: Gstreamer vaapi
Repository: https://github.com/GStreamer/gstreamer-vaapi
License: https://github.com/GStreamer/gstreamer-vaapi/blob/master/COPYING.LIB

Component: Intel DLDT
Repository: https://github.com/openvinotoolkit/openvino
License: https://github.com/openvinotoolkit/openvino/blob/2020/LICENSE

Component: Intel Graphics Memory Management Library
Repository: https://github.com/intel/gmmlib
License: https://github.com/intel/gmmlib/blob/master/LICENSE.md

Component: Intel VDMS
Repository: https://github.com/intellabs/vdms
License: https://github.com/IntelLabs/vdms/blob/develop/LICENSE

Component: Intel libva
Repository: https://github.com/intel/libva
License: https://github.com/intel/libva/blob/master/COPYING

Component: Intel media-driver
Repository: https://github.com/intel/media-driver
License: https://github.com/intel/media-driver/blob/master/LICENSE.md

Component: SVT-AV1
Repository: https://github.com/OpenVisualCloud/SVT-AV1
License: https://github.com/OpenVisualCloud/SVT-AV1/blob/master/LICENSE.md

Component: SVT-HEVC
Repository: https://github.com/OpenVisualCloud/SVT-HEVC
License: https://github.com/OpenVisualCloud/SVT-HEVC/blob/master/LICENSE.md

Component: SVT-VP9
Repository: https://github.com/OpenVisualCloud/SVT-VP9
License: https://github.com/OpenVisualCloud/SVT-VP9/blob/master/LICENSE.md

Component: Intel Media SDK
Repository: https://github.com/Intel-Media-SDK/MediaSDK
License: https://github.com/Intel-Media-SDK/MediaSDK/blob/master/LICENSE

Component: jQuery (New Wave JavaScript)
Repository: https://github.com/jquery/jquery
License: MIT (https://github.com/jquery/jquery/blob/master/LICENSE.txt)

Component: JSON-CPP
Repository: https://github.com/open-source-parsers/jsoncpp
License: https://github.com/open-source-parsers/jsoncpp/blob/master/LICENSE

Component: kafkacat
Repository: https://github.com/edenhill/kafkacat
License: https://github.com/edenhill/kafkacat/blob/master/LICENSE

Component: libogg
Repository: https://github.com/xiph/ogg
License: https://github.com/xiph/ogg/blob/master/COPYING

Component: libvorbis
Repository: https://github.com/xiph/vorbis
License: https://github.com/xiph/vorbis/blob/master/COPYING

Component: libvpx
Repository: https://github.com/webmproject/libvpx/
License: https://github.com/webmproject/libvpx/blob/master/LICENSE

Component: fdk-aac
Repository: https://sourceforge.net/p/opencore-amr/fdk-aac/ci/master/tree
License: https://fedoraproject.org/wiki/Licensing/FDK-AAC

Component: nginx
Repository: https://github.com/nginx/nginx
License: https://nginx.org/LICENSE

Component: opencv
Repository: https://github.com/opencv/opencv
License: https://github.com/opencv/opencv/blob/master/LICENSE

Component: gst-video-analytics
Repository: https://github.com/opencv/gst-video-analytics
License: https://github.com/opencv/gst-video-analytics/blob/master/LICENSE

Component: open model zoo
Repository: https://github.com/opencv/open_model_zoo
License: https://github.com/opencv/open_model_zoo/blob/master/LICENSE

Component: opus
Repository: https://github.com/xiph/opus
License: https://github.com/xiph/opus/blob/master/COPYING

Component: PINTO0309 OpenVINO-YoloV3
Repository: https://github.com/PINTO0309/OpenVINO-YoloV3
License: https://github.com/PINTO0309/OpenVINO-YoloV3/blob/master/LICENSE

Component: protobuf
Repository: https://github.com/protocolbuffers/protobuf
License: https://github.com/protocolbuffers/protobuf/blob/master/LICENSE

Component: python-requests
Repository: https://github.com/psf/requests
License: https://github.com/psf/requests/blob/master/LICENSE

Component: scanner
Repository: https://github.com/scanner-research/scanner
License: https://github.com/scanner-research/scanner/blob/master/LICENSE

Component: python tornado
Repository: https://github.com/tornadoweb/tornado
License: https://github.com/tornadoweb/tornado/blob/master/LICENSE

Component: what-input
Repository: https://github.com/ten1seven/what-input
License: https://github.com/ten1seven/what-input/blob/master/LICENSE

Component: kafka docker
Repository: https://github.com/wurstmeister/kafka-docker
License: https://github.com/wurstmeister/kafka-docker/blob/master/LICENSE

Component: x264
Repository: https://github.com/mirror/x264
License: https://github.com/mirror/x264/blob/master/COPYING

Component: x265
Repository: https://github.com/videolan/x265
License: https://github.com/videolan/x265/blob/master/COPYING

Component: zookeeper
Repository: https://hub.docker.com/_/zookeeper
License: https://github.com/apache/zookeeper/blob/master/LICENSE.txt

39 changes: 39 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
cmake_minimum_required (VERSION 2.8)

Project(library_curation NONE)
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_HOME_DIRECTORY}/dist")

if (NOT DEFINED REGISTRY)
set(REGISTRY "")
elseif (NOT ${REGISTRY} MATCHES "/$")
set(REGISTRY "${REGISTRY}/")
endif()
if (NOT DEFINED PLATFORM)
set(PLATFORM "Xeon")
endif()
if (NOT DEFINED NCURATIONS)
set(NCURATIONS 1)
endif()
if (NOT DEFINED INGESTION)
set(INGESTION "object,face")
endif()

if(NOT REGISTRY)
add_custom_target(update ${CMAKE_HOME_DIRECTORY}/script/update-image.sh)
endif()
add_custom_target(dist ${CMAKE_HOME_DIRECTORY}/script/mk-dist.sh)

file(GLOB dirs "deployment" "*")
list(REMOVE_DUPLICATES dirs)
foreach (dir ${dirs})
if(EXISTS ${dir}/CMakeLists.txt)
add_subdirectory(${dir})
endif()
endforeach()

# legal message
execute_process(COMMAND printf "\n\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")

execute_process(COMMAND printf "PLATFORM=${PLATFORM}, NCURATIONS=${NCURATIONS}, INGESTION=${INGESTION}\n")
execute_process(COMMAND printf "REGISTRY=${REGISTRY}\n\n")

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Intel Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
99 changes: 99 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
This sample implements libraries of video files content analysis, database ingestion, content search and visualization:
- **Ingest**: Analyze video content and ingest the data into the VDMS.
- **VDMS**: Store metadata efficiently in a graph-based database.
- **Visualization**: Visualize content search based on video metadata.

<IMG src="doc/arch.png" height="250px">

**This is a concept sample in active development.**

### Software Stacks

The sample is powered by the following Open Visual Cloud software stacks:
- **Media Analytics**:
- [The GStreamer-based media analytics stack](https://github.com/OpenVisualCloud/Dockerfiles/tree/master/Xeon/ubuntu-16.04/analytics/gst) is used for object, face and emotion detection. The software stack is optimized for [Intel® Xeon® Scalable Processors](https://github.com/OpenVisualCloud/Dockerfiles/tree/master/Xeon/ubuntu-16.04/analytics/gst).

- **NGINX Web Service**:
- [The NGINX/FFmpeg-based web serving stack](https://github.com/OpenVisualCloud/Dockerfiles/tree/master/Xeon/centos-7.6/media/nginx) is used to store and segment video content and serve web services. The software stack is optimized for [Intel Xeon Scalable Processors](https://github.com/OpenVisualCloud/Dockerfiles/tree/master/Xeon/centos-7.6/media/nginx).

### Install Prerequisites:

- **Time Zone**: Check that the timezone setting of your host machine is correctly configured. Timezone is used during build. If you plan to run the sample on a cluster of machines managed by Docker Swarm or Kubernetes, please make sure to synchronize time among the manager/master node and worker nodes.

- **Build Tools**: Install ```cmake``` and ```m4``` if they are not available on your system.

- **Docker Engine**:
- Install [docker engine](https://docs.docker.com/install).
- Install [docker compose](https://docs.docker.com/compose/install), if you plan to deploy through docker compose. Version 1.20+ is required.
- Setup [docker swarm](https://docs.docker.com/engine/swarm), if you plan to deploy through docker swarm. See [Docker Swarm Setup](deployment/docker-swarm/README.md) for additional setup details.
- Setup [Kubernetes](https://kubernetes.io/docs/setup), if you plan to deploy through Kubernetes. See [Kubernetes Setup](deployment/kubernetes/README.md) for additional setup details.
- Setup docker proxy as follows if you are behind a firewall:

```bash
sudo mkdir -p /etc/systemd/system/docker.service.d
printf "[Service]\nEnvironment=\"HTTPS_PROXY=$https_proxy\" \"NO_PROXY=$no_proxy\"\n" | sudo tee /etc/systemd/system/docker.service.d/proxy.conf
sudo systemctl daemon-reload
sudo systemctl restart docker
```

### Build Sample:

```bash
mkdir build
cd build
cmake ..
make
```

See also: [Customize Build Process](doc/cmake.md).

### Start/stop Sample:

Use the following commands to start/stop services via docker-compose:

```bash
make start_docker_compose
make stop_docker_compose
```

Use the following commands to start/stop services via docker swarm:

```bash
make update # optional for private registry
make start_docker_swarm
make stop_docker_swarm
```

See also: [Docker Swarm Setup](deployment/docker-swarm/README.md).

Use the following commands to start/stop Kubernetes services:

```
make update # optional for private registry
make start_kubernetes
make stop_kubernetes
```

See also: [Kubernetes Setup](deployment/kubernetes/README.md).

### Launch Sample UI:

Launch your browser and browse to ```https://<hostname>```. The sample UI is similar to the following:

<IMG src="doc/sample-ui.gif" height="270px"></IMG>

---

* For Kubernetes/Docker Swarm, ```<hostname>``` is the hostname of the manager/master node.
* If you see a browser warning of self-signed certificate, please accept it to proceed to the sample UI.

---

### See Also

- [Configuration Options](doc/cmake.md)
- [Docker Swarm Setup](deployment/docker-swarm/README.md)
- [Kubernetes Setup](deployment/kubernetes/README.md)
- [Sample Distribution](doc/dist.md)
- [Visual Data Management System](https://github.com/intellabs/vdms)

1 change: 1 addition & 0 deletions deployment/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include("${CMAKE_SOURCE_DIR}/script/scan-all.cmake")
4 changes: 4 additions & 0 deletions deployment/certificate/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.rnd
*.key
*.pem
*.crt
2 changes: 2 additions & 0 deletions deployment/certificate/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(service "lcc_certificate")
include("${CMAKE_SOURCE_DIR}/script/service.cmake")
15 changes: 15 additions & 0 deletions deployment/certificate/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

FROM centos:7.6.1810
RUN yum install -y -q openssl && rm -rf /var/cache/yum/*

####
ARG USER
ARG GROUP
ARG UID
ARG GID
## must use ; here to ignore user exist status code
RUN [ ${GID} -gt 0 ] && groupadd -f -g ${GID} ${GROUP}; \
[ ${UID} -gt 0 ] && useradd -d /home/${USER} -g ${GID} -K UID_MAX=${UID} -K UID_MIN=${UID} ${USER}; \
echo
USER ${UID}
####
6 changes: 6 additions & 0 deletions deployment/certificate/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -e

IMAGE="lcc_certificate"
DIR=$(dirname $(readlink -f "$0"))

. "$DIR/../../script/build.sh"
Loading

0 comments on commit b66f17d

Please sign in to comment.