Skip to content

Commit

Permalink
Release v4.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ogeorget-psee committed May 23, 2024
1 parent 6934dd5 commit d934df1
Show file tree
Hide file tree
Showing 118 changed files with 1,439 additions and 1,098 deletions.
114 changes: 65 additions & 49 deletions .github/workflows/all_jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,49 @@ env:
#Windows variables
python_executable: "C:/hostedtoolcache/windows/Python/3.8.10/x64/python.exe" #Cmake needs this to find python on windows

jobs:
jobs:

container-ubuntu-20-job:
name: Build Ubuntu 20 Image
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.PSEE_DOCKER_HUB_USER }}
password: ${{ secrets.PSEE_DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: utils/containers/Dockerfile.OpenEB
push: true
build-args: UBUNTU_VERSION=20.04
tags: prophesee/openeb:ubuntu-20.04

job1:
name: Ubuntu 20
needs: container-ubuntu-20-job
runs-on: ubuntu-20.04
container:
image: prophesee/openeb:ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get -y update && sudo apt-get install -y sudo apt-utils wget cmake build-essential \
libglew-dev git g++ libusb-1.0-0-dev libgtest-dev libgmock-dev libssl-dev python3.8 \
python3-pip python3-distutils xvfb libglfw3 libglfw3-dev libglew-dev libopencv-dev ffmpeg \
libboost-dev libboost-program-options-dev libboost-filesystem-dev libboost-timer-dev \
libprotobuf-dev protobuf-compiler \
libboost-chrono-dev libboost-thread-dev zip unzip git-lfs libhdf5-dev hdf5-tools
pip install $numpy_version pytest opencv-python==4.5.5.64 torch==1.13.1 scipy sk-video==1.1.10 numba==0.56.3 h5py protobuf==3.20.3 command_runner kornia==0.6.8 pytorch_lightning==1.8.6 pytorch_msssim==0.2.1
- name: Build pybind and gtest
run: |
openebfolder=${PWD}
cd ..
wget https://github.com/pybind/pybind11/archive/v$pybind_version.zip
unzip v$pybind_version.zip
cd pybind11-$pybind_version/
mkdir build && cd build
cmake .. -DPYBIND11_TEST=OFF
cmake --build . --config Release --parallel 4
sudo make install
with:
submodules: true

- name: Build openEB
run: |
mkdir build && cd build
cmake .. -DBUILD_TESTING=ON
cmake --build . --config Release --parallel 4
cmake -B build -DBUILD_TESTING=ON
cmake --build build --config Release --parallel `nproc`
- name: Getting datasets from storage
uses: dawidd6/action-download-artifact@v2
Expand All @@ -61,34 +69,42 @@ jobs:
cd build
ctest --output-on-failure
container-ubuntu-22-job:
name: Build Ubuntu 22 Image
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.PSEE_DOCKER_HUB_USER }}
password: ${{ secrets.PSEE_DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: utils/containers/Dockerfile.OpenEB
push: true
build-args: UBUNTU_VERSION=22.04
tags: prophesee/openeb:ubuntu-22.04

job2:
name: Ubuntu 22
needs: container-ubuntu-22-job
runs-on: ubuntu-22.04
container:
image: prophesee/openeb:ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get -y update && sudo apt-get install -y sudo apt-utils wget cmake build-essential \
libglew-dev git g++ libusb-1.0-0-dev libgtest-dev libgmock-dev libssl-dev \
python3-pip python3-distutils xvfb libglfw3 libglfw3-dev libglew-dev libopencv-dev ffmpeg \
libboost-dev libboost-program-options-dev libboost-filesystem-dev libboost-timer-dev \
libprotobuf-dev protobuf-compiler \
libboost-chrono-dev libboost-thread-dev zip unzip git-lfs libhdf5-dev hdf5-tools
pip install $numpy_version pytest opencv-python==4.5.5.64 torch==1.13.1 scipy sk-video==1.1.10 numba==0.56.3 h5py protobuf==3.20.3 command_runner kornia==0.6.8 pytorch_lightning==1.8.6 pytorch_msssim==0.2.1
- name: Build pybind and gtest
run: |
openebfolder=${PWD}
cd ..
wget https://github.com/pybind/pybind11/archive/v$pybind_version.zip
unzip v$pybind_version.zip
cd pybind11-$pybind_version/
mkdir build && cd build
cmake .. -DPYBIND11_TEST=OFF
cmake --build . --config Release --parallel 4
sudo make install
with:
submodules: true

- name: Build openEB
run: |
Expand Down Expand Up @@ -169,4 +185,4 @@ jobs:
shell: powershell
run: |
cd build
ctest -C Release --output-on-failure
ctest -C Release --output-on-failure
4 changes: 3 additions & 1 deletion .github/workflows/upload_datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
- cron: "15 2 1 */2 *"

env:
dataset_download_address: "https://dataset.prophesee.ai/index.php/s/tiP0wl0r5aW5efL/download"
# we are not using an official share URL from KDrive. We found it by analyzing the http requests.
# we hope it will continue to work in the future.
dataset_download_address: "https://kdrive.infomaniak.com/2/app/975517/share/90b05176-4499-489d-a7a9-96b395df80ab/files/24562/download"

jobs:
get_artifacts:
Expand Down
66 changes: 37 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif(NOT CMAKE_BUILD_TYPE)

cmake_minimum_required(VERSION 3.5)

project(metavision VERSION 4.5.2)
project(metavision VERSION 4.6.0)
set(PROJECT_VERSION_SUFFIX "")

if(PROJECT_VERSION_SUFFIX STREQUAL "")
Expand Down Expand Up @@ -73,16 +73,22 @@ include(lfs_download)
include(add_pytest)
include(common_macros)

if (ANDROID)
if (ANDROID AND NOT ENV_CMAKE)
# Those OVERLOAD_ functions are used to be able to bypass default Metavision
# implementation of Android support to give a different own depending on
# dependencies management
set(ENV_CMAKE cmake/android/env.cmake)
set(PREBUILT_BASE_DIR utils/android)
set(PREBUILT_FILENAME prebuilt-3rdparty.tar.gz)

# Setup 3rd party prebuilt libraries dir
set(ANDROID_PREBUILT_3RDPARTY_ARCHIVE utils/android/prebuilt-3rdparty.tar.gz)
set(ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR ${GENERATE_FILES_DIRECTORY}/android/3rdparty)
if (NOT EXISTS ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})
lfs_download(${ANDROID_PREBUILT_3RDPARTY_ARCHIVE} COMPILATION)
message(STATUS "Unpacking ${ANDROID_PREBUILT_3RDPARTY_ARCHIVE} in ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR}")
lfs_download(${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME} COMPILATION)
message(STATUS "Unpacking ${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME} in ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR}")
file(MAKE_DIRECTORY ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar -xf ${PROJECT_SOURCE_DIR}/${ANDROID_PREBUILT_3RDPARTY_ARCHIVE}
COMMAND ${CMAKE_COMMAND} -E tar -xf ${PROJECT_SOURCE_DIR}/${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME}
WORKING_DIRECTORY ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR}
)
endif (NOT EXISTS ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})
Expand All @@ -92,8 +98,8 @@ if (ANDROID)

# Use Android env.cmake to find required dependencies
set(ANDROID_PREBUILT_3RDPARTY_DIR ${GENERATE_FILES_DIRECTORY}/android/3rdparty/prebuilt)
include(${PROJECT_SOURCE_DIR}/cmake/android/env.cmake)
endif (ANDROID)
include(${ENV_CMAKE})
endif (ANDROID AND NOT ENV_CMAKE)

###################################################

Expand Down Expand Up @@ -166,6 +172,7 @@ add_subdirectory_if_exists(utils/platforms) # Load platform specific cmake early

################################################### CMake options

option(BUILD_SAMPLES "Build Metavision apps & samples" ON)
if (NOT ANDROID)
option(COMPILE_PYTHON3_BINDINGS "Compile python 3 bindings" ON)
cmake_dependent_option(CODE_COVERAGE "Enable code coverage" ON "CMAKE_BUILD_TYPE_LOWER STREQUAL debug" OFF)
Expand Down Expand Up @@ -236,11 +243,11 @@ if (BUILD_TESTING)

# Pytests
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/datasets" AND GIT_LFS_NOT_AVAILABLE)
message("---------------------------------------------------------------------------------------------------------")
message("| Test data was not found. To run the tests, please download the test data adapted to your project: |")
message("| - OpenEB: https://dataset.prophesee.ai/index.php/s/tiP0wl0r5aW5efL (1.2 Gb archive) |")
message("| - Metavision SDK: https://dataset.prophesee.ai/index.php/s/l3RpHoC3NDL7OU6 (5 Gb archive) |")
message("---------------------------------------------------------------------------------------------------------\n")
message("--------------------------------------------------------------------------------------------------------------------------")
message("| Test data was not found. To run the tests, please download the test data adapted to your project: |")
message("| - OpenEB: https://kdrive.infomaniak.com/app/share/975517/cddcc78a-3480-420f-bc19-17d5b0535ca4 (1.2 Gb archive) |")
message("| - Metavision SDK: https://kdrive.infomaniak.com/app/share/975517/727dadda-764a-4a2f-80cb-07c800913116 (5 Gb archive) |")
message("--------------------------------------------------------------------------------------------------------------------------\n")
endif()

set(PYTEST_CMD ${PYTHON_${PYTEST_PYTHON_VERSION}_EXECUTABLE} -m pytest)
Expand Down Expand Up @@ -355,12 +362,13 @@ foreach(metavision_modules_set OPEN ADVANCED)
set(METAVISION_SDK_${metavision_modules_set}_MODULES_AVAILABLE)
message(STATUS "Building METAVISION_SDK_MODULES_${metavision_modules_set} modules : ${METAVISION_SDK_MODULES_${metavision_modules_set}}")
foreach(module_name IN LISTS METAVISION_SDK_MODULES_${metavision_modules_set})
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/sdk/modules/${module_name}/CMakeLists.txt")
if ((NOT METAVISION_SELECTED_MODULES OR ${module_name} IN_LIST METAVISION_SELECTED_MODULES)
AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/sdk/modules/${module_name}/CMakeLists.txt")
list(APPEND METAVISION_SDK_${metavision_modules_set}_MODULES_AVAILABLE "${module_name}")
endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/sdk/modules/${module_name}/CMakeLists.txt")
endforeach(module_name)
endif()
endforeach()
list(APPEND METAVISION_SDK_MODULES_AVAILABLE ${METAVISION_SDK_${metavision_modules_set}_MODULES_AVAILABLE})
endforeach(metavision_modules_set)
endforeach()

################################################### COMPILATION

Expand All @@ -369,10 +377,10 @@ include(uninstall)
include(add_library_version_header)
include(add_cpack_component)

if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/custom_targets_metavision_sdk")
if(EXISTS "${PROJECT_SOURCE_DIR}/cmake/custom_targets_metavision_sdk")
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/custom_targets_metavision_sdk)
include(create_metavision_sdk_source_archives)
endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/custom_targets_metavision_sdk")
endif(EXISTS "${PROJECT_SOURCE_DIR}/cmake/custom_targets_metavision_sdk")

# Add Metavision Open debian packages :
add_cpack_component(PUBLIC metavision-open-lib metavision-open-bin metavision-open-dev metavision-open-samples)
Expand Down Expand Up @@ -425,16 +433,16 @@ add_subdirectory_if_exists(hal_psee_plugins)
################################
add_subdirectory(sdk)

################################
# Standalone samples ##
################################
add_subdirectory(standalone_samples)

################################
# Standalone apps ##
################################
add_subdirectory_if_exists(standalone_apps)

if (BUILD_SAMPLES)
################################
# Standalone samples ##
################################
add_subdirectory(standalone_samples)
################################
# Standalone apps ##
################################
add_subdirectory_if_exists(standalone_apps)
endif()
################################
# Documentation ##
################################
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ python3 -m pip install "numba==0.56.3" "profilehooks==1.12.0" "pytorch_lightning

### Compilation

1. Retrieve the code: `git clone https://github.com/prophesee-ai/openeb.git --branch 4.5.2`.
1. Retrieve the code: `git clone https://github.com/prophesee-ai/openeb.git --branch 4.6.0`.
(If you choose to download an archive of OpenEB from GitHub rather than cloning the repository,
you need to ensure that you select a ``Full.Source.Code.*`` archive instead of using
the automatically generated ``Source.Code.*`` archives. This is because the latter do not include
Expand Down Expand Up @@ -184,7 +184,8 @@ or you can deploy the OpenEB files in the system path (`/usr/local/lib`, `/usr/l

```bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export HDF5_PLUGIN_PATH=$HDF5_PLUGIN_PATH:/usr/local/lib/hdf5/plugin
export HDF5_PLUGIN_PATH=$HDF5_PLUGIN_PATH:/usr/local/lib/hdf5/plugin # On Ubuntu 20.04
export HDF5_PLUGIN_PATH=$HDF5_PLUGIN_PATH:/usr/local/hdf5/lib/plugin # On Ubuntu 22.04
```

Note that if you are using a third-party camera, you need to install the plugin provided
Expand All @@ -198,7 +199,7 @@ or you can stream data from your Prophesee-compatible event-based camera.

Running the test suite is a sure-fire way to ensure you did everything well with your compilation and installation process.

* Download [the files](https://dataset.prophesee.ai/index.php/s/tiP0wl0r5aW5efL) necessary to run the tests.
* Download [the files](https://kdrive.infomaniak.com/app/share/975517/cddcc78a-3480-420f-bc19-17d5b0535ca4) necessary to run the tests.
Click `Download` on the top right folder. Beware of the size of the obtained archive which weighs around 1.2 Gb.

* Extract and put the content of this archive to `<OPENEB_SRC_DIR>/datasets`.
Expand Down Expand Up @@ -323,7 +324,7 @@ python -m pip install "numba==0.56.3" "profilehooks==1.12.0" "pytorch_lightning=
First, retrieve the codebase:
```bash
git clone https://github.com/prophesee-ai/openeb.git --branch 4.5.2
git clone https://github.com/prophesee-ai/openeb.git --branch 4.6.0
```
Note that if you choose to download an archive of OpenEB from GitHub rather than cloning the repository,
Expand Down Expand Up @@ -418,7 +419,7 @@ or you can deploy the OpenEB files (applications, samples, libraries etc.) in a
Prophesee camera plugins are included in OpenEB, but you need to install the drivers
for the cameras to be available on Windows. To do so, follow this procedure:
1. download [wdi-simple.exe from our file server](https://files.prophesee.ai/share/dists/public/drivers/FeD45ki5/wdi-simple.exe)
1. download [wdi-simple.exe from our file server](https://kdrive.infomaniak.com/app/share/975517/4f59e852-af5e-4e00-90fc-f213aad20edd)
2. execute the following commands in a Command Prompt launched as an administrator:
```bash
Expand Down Expand Up @@ -446,7 +447,7 @@ or you can stream data from your Prophesee-compatible event-based camera.
Running the test suite is a sure-fire way to ensure you did everything well with your compilation and installation process.
* Download [the files](https://dataset.prophesee.ai/index.php/s/tiP0wl0r5aW5efL) necessary to run the tests.
* Download [the files](https://kdrive.infomaniak.com/app/share/975517/cddcc78a-3480-420f-bc19-17d5b0535ca4) necessary to run the tests.
Click `Download` on the top right folder. Beware of the size of the obtained archive which weighs around 1.2 Gb.
* Extract and put the content of this archive to `<OPENEB_SRC_DIR>/datasets`.
Expand Down
4 changes: 2 additions & 2 deletions cmake/android/env.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if (NOT DEFINED METAVISION_ANDROID_ENV_INCLUDED)
endif (NOT DEFINED METAVISION_ANDROID_ENV_INCLUDED)

if (NOT DEFINED ANDROID_PREBUILT_3RDPARTY_DIR)
set(ANDROID_PREBUILT_3RDPARTY_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../../../)
set(ANDROID_PREBUILT_3RDPARTY_DIR ${GENERATE_FILES_DIRECTORY}/android/3rdparty/prebuilt)
endif (NOT DEFINED ANDROID_PREBUILT_3RDPARTY_DIR)

# libusb has no config module, we need to create imported targets by hand
Expand All @@ -89,7 +89,6 @@ if (NOT TARGET libusb-1.0)
set_target_properties(libusb-1.0 PROPERTIES INTERFACE_LINK_LIBRARIES log)
endif (NOT TARGET libusb-1.0)


# Boost has no config module, we need to create imported targets by hand
set(_boost_root ${ANDROID_PREBUILT_3RDPARTY_DIR}/boost-1.69.0)
set(_boost_components
Expand Down Expand Up @@ -186,6 +185,7 @@ endforeach(b_comp)
# OpenCV comes with its own module, let's use it
set(_opencv_root ${ANDROID_PREBUILT_3RDPARTY_DIR}/opencv-4.0.1/sdk/native)
set(OpenCV_DIR ${_opencv_root}/jni)

# .. however the individual targets are static libraries, so we create a fake one that uses
# libopencv_java which is a shared library as we expect
include_directories(${ANDROID_OPENCV_INC_DIR})
Expand Down
Loading

0 comments on commit d934df1

Please sign in to comment.