Skip to content

Commit

Permalink
Release v5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ogeorget-psee committed Oct 3, 2024
1 parent 53b3618 commit 91c4ccd
Show file tree
Hide file tree
Showing 687 changed files with 28,231 additions and 13,488 deletions.
90 changes: 46 additions & 44 deletions .github/workflows/all_jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ on:

env:
#General variables
numpy_version: "numpy==1.23.4" # replace with only 'numpy' if no version needed
python_versions: 3.8
pybind_version: "2.6.0"
python_versions: 3.9
#Windows variables
python_executable: "C:/hostedtoolcache/windows/Python/3.8.10/x64/python.exe" #Cmake needs this to find python on windows
python_executable: "C:/hostedtoolcache/windows/Python/3.9.13/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
container-ubuntu-22-job:
name: Build Ubuntu 22 Image
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -34,17 +32,17 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: utils/containers/Dockerfile.OpenEB
file: utils/containers/Dockerfile.OpenEB
push: true
build-args: UBUNTU_VERSION=20.04
tags: prophesee/openeb:ubuntu-20.04
build-args: BASE_IMAGE_TAG=22.04
tags: prophesee/openeb:ubuntu-22.04

job1:
name: Ubuntu 20
needs: container-ubuntu-20-job
runs-on: ubuntu-20.04
name: Ubuntu 22
needs: container-ubuntu-22-job
runs-on: ubuntu-22.04
container:
image: prophesee/openeb:ubuntu-20.04
image: prophesee/openeb:ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -53,8 +51,10 @@ jobs:

- name: Build openEB
run: |
cmake -B build -DBUILD_TESTING=ON
cmake --build build --config Release --parallel `nproc`
test -e /opt/prophesee/psee-py3venv/bin/activate && . /opt/prophesee/psee-py3venv/bin/activate
mkdir build && cd build
cmake .. -DBUILD_TESTING=ON
cmake --build . --config Release --parallel `nproc`
- name: Getting datasets from storage
uses: dawidd6/action-download-artifact@v2
Expand All @@ -69,37 +69,38 @@ 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 }}
container-ubuntu-24-job:
name: Build Ubuntu 24 Image
runs-on: ubuntu-24.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: 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
- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: utils/containers/Dockerfile.OpenEB
push: true
build-args: BASE_IMAGE_TAG=24.04
tags: prophesee/openeb:ubuntu-24.04

job2:
name: Ubuntu 22
needs: container-ubuntu-22-job
runs-on: ubuntu-22.04
name: Ubuntu 24
needs: container-ubuntu-24-job
runs-on: ubuntu-24.04
container:
image: prophesee/openeb:ubuntu-22.04
image: prophesee/openeb:ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -108,9 +109,10 @@ jobs:

- name: Build openEB
run: |
test -e /opt/prophesee/psee-py3venv/bin/activate && . /opt/prophesee/psee-py3venv/bin/activate
mkdir build && cd build
cmake .. -DBUILD_TESTING=ON
cmake --build . --config Release --parallel 4
cmake --build . --config Release --parallel `nproc`
- name: Getting datasets from storage
uses: dawidd6/action-download-artifact@v2
Expand Down Expand Up @@ -159,7 +161,7 @@ jobs:
cd ..
unzip -q "vcpkg-export.zip"
7z x ffmpeg-archive.7z
$python_executable -m pip install pytest $numpy_version opencv-python==4.5.5.64 torch==1.13.1 scipy sk-video==1.1.10 numba==0.56.3 h5py command_runner kornia==0.6.8 pytorch_lightning==1.8.6 pytorch_msssim==0.2.1
$python_executable -m pip install -r openeb/utils/python/requirements_openeb.txt
cd openeb
- name: Build openEB
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/upload_win_binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
- cron: "15 2 1 */2 *"

env:
win_binaries_download_address: "https://prophesee-bamboo.s3.eu-west-1.amazonaws.com/build-env/vcpkg-export-20230323-MV4.0.0.zip"
# TODO update for v5.0.0 release
win_binaries_download_address: "https://prophesee-bamboo.s3.eu-west-1.amazonaws.com/build-env/vcpkg-export-20240909-MV_V4.6.2.zip"
ffmpeg_archive_download_address: "https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "hdf5_ecf"]
path = sdk/modules/driver/cpp/3rdparty/hdf5_ecf
path = sdk/modules/stream/cpp/3rdparty/hdf5_ecf
url = https://github.com/prophesee-ai/hdf5_ecf.git
117 changes: 77 additions & 40 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.6.2)
project(metavision VERSION 5.0.0)
set(PROJECT_VERSION_SUFFIX "")

if(PROJECT_VERSION_SUFFIX STREQUAL "")
Expand Down Expand Up @@ -60,7 +60,7 @@ endif (ANDROID)
set(HAL_BUILD_PLUGIN_PATH "${PROJECT_BINARY_DIR}/${HAL_INSTALL_PLUGIN_RELATIVE_PATH}")

# Set output directory for generated files
set(GENERATE_FILES_DIRECTORY ${CMAKE_BINARY_DIR}/generated)
set(GENERATE_FILES_DIRECTORY ${PROJECT_BINARY_DIR}/generated)
file(MAKE_DIRECTORY ${GENERATE_FILES_DIRECTORY})

# Update CMAKE_MODULE_PATH
Expand All @@ -75,33 +75,35 @@ include(lfs_download)
include(add_pytest)
include(common_macros)

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_EXTRACT_DIR ${GENERATE_FILES_DIRECTORY}/android/3rdparty)
if (NOT EXISTS ${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}/${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME}
WORKING_DIRECTORY ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR}
)
endif (NOT EXISTS ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})
if (ANDROID)
if (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 ${PROJECT_SOURCE_DIR}/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_EXTRACT_DIR ${GENERATE_FILES_DIRECTORY}/android/3rdparty)
if (NOT EXISTS ${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}/${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME}
WORKING_DIRECTORY ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR}
)
endif (NOT EXISTS ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})

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

# Include the function required to build an Android APK
include(add_android_app)

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

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

Expand Down Expand Up @@ -203,9 +205,9 @@ find_package(Threads REQUIRED)
find_package(LibUSB REQUIRED)

# Boost
set (boost_components_to_find program_options filesystem timer chrono thread)
set (boost_components_to_find program_options timer chrono thread)
find_package(Boost COMPONENTS ${boost_components_to_find} REQUIRED)
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS) ## needed to get rid of warning `#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...)`
add_compile_definitions(BOOST_BIND_GLOBAL_PLACEHOLDERS) ## needed to get rid of warning `#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...)`

# Python 3 for bindings and pytests
if (COMPILE_PYTHON3_BINDINGS OR BUILD_TESTING)
Expand Down Expand Up @@ -246,17 +248,27 @@ if (BUILD_TESTING)
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://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("| - OpenEB: https://kdrive.infomaniak.com/app/share/975517/2aa2545c-6b12-4478-992b-df2acfb81b38 (1.5 Gb archive) |")
message("| - Metavision SDK: https://kdrive.infomaniak.com/app/share/975517/e1a64b9b-c7d3-4b7c-8f70-20bbf474c49d (5.4 Gb archive)|")
message("--------------------------------------------------------------------------------------------------------------------------\n")
endif()

set(PYTEST_CMD ${PYTHON_${PYTEST_PYTHON_VERSION}_EXECUTABLE} -m pytest)

# Perform additional test to ensure that variable `PYTEST_CMD` resulted to a valid executable.
# Throw fatal error otherwise to inform user something went wrong.
string(COMPARE EQUAL "${PYTEST_CMD}" "-m pytest" PYTEST_CMD_IS_INVALID)

if(PYTEST_CMD_IS_INVALID)
message(WARNING "Problem with finding valid 'pytest' version, try overriding with: '-DPYTEST_PYTHON_VERSION=<version>'! ")
endif(PYTEST_CMD_IS_INVALID)

if(CMAKE_CROSSCOMPILING)
# When cross compiling, we cannot use python executable path from the Host
set(PYTEST_CMD pytest) # TODO we need a proper way to find python executable path on the TARGET.
endif(CMAKE_CROSSCOMPILING)


lfs_download(datasets/openeb/gen31_timer.raw VALIDATION)
lfs_download(datasets/openeb/gen31_timer.hdf5 VALIDATION)
lfs_download(datasets/openeb/gen31_timer_holes.raw VALIDATION)
Expand All @@ -265,10 +277,12 @@ if (BUILD_TESTING)
lfs_download(datasets/openeb/gen4_evt2_hand.hdf5 VALIDATION)
lfs_download(datasets/openeb/gen4_evt3_hand.raw VALIDATION)
lfs_download(datasets/openeb/gen4_evt3_hand.hdf5 VALIDATION)
lfs_download(datasets/openeb/gen4_evt4_hand.raw VALIDATION)
lfs_download(datasets/openeb/blinking_gen4_with_ext_triggers.raw VALIDATION)
lfs_download(datasets/openeb/blinking_gen4_with_ext_triggers.hdf5 VALIDATION)
lfs_download(datasets/openeb/claque_doigt_evt21.raw VALIDATION)
lfs_download(datasets/openeb/claque_doigt_evt21.hdf5 VALIDATION)
lfs_download(datasets/openeb/claque_doigt_evt4.raw VALIDATION)
lfs_download(datasets/openeb/standup_evt21-legacy.raw VALIDATION)
lfs_download(datasets/openeb/standup_evt21-legacy.hdf5 VALIDATION)
lfs_download(datasets/openeb/diff3d.raw VALIDATION)
Expand All @@ -279,6 +293,9 @@ if (BUILD_TESTING)
lfs_download(datasets/openeb/aer_4bits.raw VALIDATION)
lfs_download(datasets/openeb/0101_cm_mtr12_output.raw VALIDATION)
lfs_download(datasets/openeb/0101_cm_mtru_output.raw VALIDATION)
lfs_download(datasets/openeb/synced/recording_master.raw VALIDATION)
lfs_download(datasets/openeb/synced/recording_slave_0.raw VALIDATION)
lfs_download(datasets/openeb/synced/recording_slave_1.raw VALIDATION)
if(COMPILE_PYTHON3_BINDINGS)
lfs_download(datasets/openeb/blinking_leds.raw VALIDATION)
lfs_download(datasets/openeb/gen4_evt2_hand_cd.dat VALIDATION)
Expand Down Expand Up @@ -347,15 +364,18 @@ endif(CODE_COVERAGE)

################################################### Detect which SDK modules are available

set(METAVISION_SDK_MODULES_OPEN base core driver CACHE STRING "SDK Open modules")
set(METAVISION_SDK_MODULES_OPEN base core stream CACHE STRING "SDK Open modules")
if (COMPILE_PYTHON3_BINDINGS)
list(APPEND METAVISION_SDK_MODULES_OPEN core_ml)
endif (COMPILE_PYTHON3_BINDINGS)
set(METAVISION_SDK_MODULES_ADVANCED analytics calibration cv ml CACHE STRING "SDK Advanced modules")
set(METAVISION_SDK_MODULES_ADVANCED analytics cv ml CACHE STRING "SDK Advanced modules")

if (NOT ANDROID)
list(APPEND METAVISION_SDK_MODULES_OPEN ui)
list(APPEND METAVISION_SDK_MODULES_ADVANCED cv3d)

if(NOT DISABLE_METAVISION_SDK_MODULE_CALIBRATION_AND_CV3D)
list(APPEND METAVISION_SDK_MODULES_ADVANCED calibration cv3d)
endif()
endif (NOT ANDROID)

set(METAVISION_SDK_MODULES_AVAILABLE)
Expand All @@ -381,22 +401,39 @@ include(add_cpack_component)
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)
include(create_metavision_sdk_ml_models_archive)
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)
add_cpack_component(PUBLIC metavision-openeb-lib metavision-openeb-bin metavision-openeb-dev metavision-openeb-samples)
add_cpack_component(PUBLIC metavision-openeb metavision-openeb-license)
if(COMPILE_PYTHON3_BINDINGS)
add_cpack_component(PUBLIC metavision-open-python metavision-open-python-samples)
add_python_cpack_components(PUBLIC metavision-open)
add_cpack_component(PUBLIC metavision-openeb-python metavision-openeb-python-samples)
add_python_cpack_components(PUBLIC metavision-openeb)

install(FILES ${PROJECT_SOURCE_DIR}/utils/python/requirements_openeb.txt
DESTINATION share/metavision/python_requirements
COMPONENT metavision-openeb-python)
endif(COMPILE_PYTHON3_BINDINGS)

install(FILES
${PROJECT_SOURCE_DIR}/licensing/LICENSE_OPEN
${PROJECT_SOURCE_DIR}/licensing/OPEN_SOURCE_3RDPARTY_NOTICES
DESTINATION share/metavision/licensing
COMPONENT metavision-openeb-license)


# Add Metavision SDK debian packages :
if (METAVISION_SDK_ADVANCED_MODULES_AVAILABLE)
# Advanced
add_cpack_component(PUBLIC metavision-sdk-advanced-lib metavision-sdk-advanced-bin metavision-sdk-advanced-dev metavision-sdk-advanced-samples)
add_cpack_component(PUBLIC metavision-sdk-advanced-lib metavision-sdk-advanced-bin metavision-sdk-advanced-dev metavision-sdk-advanced-samples metavision-sdk-advanced-license)
if(COMPILE_PYTHON3_BINDINGS)
add_cpack_component(PUBLIC metavision-sdk-advanced-python metavision-sdk-advanced-python-samples)
add_python_cpack_components(PUBLIC metavision-sdk-advanced)

install(FILES ${PROJECT_SOURCE_DIR}/utils/python/requirements_sdk_advanced.txt
DESTINATION share/metavision/python_requirements
COMPONENT metavision-sdk-advanced-python)
endif(COMPILE_PYTHON3_BINDINGS)

# SDK
Expand All @@ -409,7 +446,7 @@ if (METAVISION_SDK_ADVANCED_MODULES_AVAILABLE)
if(EXISTS "${PROJECT_SOURCE_DIR}/licensing/LICENSE_METAVISION_SDK")
install(FILES ${PROJECT_SOURCE_DIR}/licensing/LICENSE_METAVISION_SDK
DESTINATION share/metavision/licensing
COMPONENT metavision-sdk-base-lib)
COMPONENT metavision-sdk-advanced-license)
endif()
else ()
# Installing metavision open
Expand Down Expand Up @@ -472,8 +509,8 @@ set(cpack_all_components ${cpack_public_components} ${cpack_internal_components}
list(REMOVE_DUPLICATES cpack_all_components)
file(WRITE ${GENERATE_FILES_DIRECTORY}/meta-package.log "")
foreach(comp ${cpack_all_components})
if ("${comp}" MATCHES "^metavision-(open|sdk|sdk-advanced)-(lib|bin|dev|samples|python3.*|python|python-samples)$" OR
"${comp}" STREQUAL "metavision-sdk")
if ("${comp}" MATCHES "^metavision-(openeb|sdk|sdk-advanced)-(lib|bin|dev|samples|python3.*|python|python-samples)$" OR
"${comp}" STREQUAL "metavision-openeb" OR "${comp}" STREQUAL "metavision-sdk")
install(FILES ${GENERATE_FILES_DIRECTORY}/meta-package.log
DESTINATION share/metavision/log/${comp}
COMPONENT ${comp}
Expand Down
Loading

0 comments on commit 91c4ccd

Please sign in to comment.