Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1.0] Release 5.1.0 #140

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/upload_datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
env:
# 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://prophesee-bamboo.s3.eu-west-1.amazonaws.com/datasets/openeb/openeb-dataset_v5.0.0.zip"
dataset_download_address: "https://prophesee-bamboo.s3.eu-west-1.amazonaws.com/datasets/openeb/openeb-dataset_v5.1.0.zip"

jobs:
get_artifacts:
name: Get Datasets
Expand Down
24 changes: 15 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ if(NOT CMAKE_BUILD_TYPE)
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif(NOT CMAKE_BUILD_TYPE)

option(BUILD_TESTING "Build OpenEB's test suite" OFF)
option(BUILD_TESTING "Build test suites" OFF)

cmake_minimum_required(VERSION 3.5)

project(metavision VERSION 5.0.0)
project(metavision VERSION 5.1.0)
set(PROJECT_VERSION_SUFFIX "")

if(PROJECT_VERSION_SUFFIX STREQUAL "")
Expand Down Expand Up @@ -89,7 +89,7 @@ if (ANDROID)
# 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)
lfs_download(COMPILATION IMMEDIATE ${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME})
message(STATUS "Unpacking ${PREBUILT_BASE_DIR}/${PREBUILT_FILENAME} in ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR}")
file(MAKE_DIRECTORY ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})
execute_process(
Expand Down Expand Up @@ -298,6 +298,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/lifo_evt21.raw VALIDATION)
lfs_download(datasets/openeb/lifo_evt2.raw VALIDATION)
lfs_download(datasets/openeb/lifo_evt3.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)
Expand Down Expand Up @@ -369,32 +372,35 @@ endif(CODE_COVERAGE)

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

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

set(METAVISION_SDK_MODULES_ADVANCED analytics cv ml)
if (NOT ANDROID)
list(APPEND METAVISION_SDK_MODULES_OPEN ui)

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

if(NOT EXISTS METAVISION_SELECTED_MODULES)
set(METAVISION_SELECTED_MODULES "${METAVISION_SDK_MODULES_OPEN};${METAVISION_SDK_MODULES_ADVANCED}" CACHE STRING "Metavision SDK modules selected for compilation")
endif()

set(METAVISION_SDK_MODULES_AVAILABLE)
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 ((NOT METAVISION_SELECTED_MODULES OR ${module_name} IN_LIST METAVISION_SELECTED_MODULES)
AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/sdk/modules/${module_name}/CMakeLists.txt")
if (${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()
endforeach()
list(APPEND METAVISION_SDK_MODULES_AVAILABLE ${METAVISION_SDK_${metavision_modules_set}_MODULES_AVAILABLE})
endforeach()
message(STATUS "METAVISION_SELECTED_MODULES=${METAVISION_SELECTED_MODULES}")
message(STATUS "METAVISION_SDK_MODULES_AVAILABLE=${METAVISION_SDK_MODULES_AVAILABLE}")

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

Expand Down
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Compilation and execution were tested on platforms that meet the following requi
* Linux: Ubuntu 22.04 or 24.04 64-bit
* Architecture: amd64 (a.k.a. x64)
* Graphic card with support of OpenGL 3.0 minimum
* CPU with [support of AVX2](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#CPUs_with_AVX2)

Compilation on other platforms (alternate Linux distributions, different versions of Ubuntu, ARM processor architecture etc.)
was not tested. For those platforms some adjustments to this guide or to the code itself may be required.
Expand Down Expand Up @@ -66,7 +65,7 @@ and in your environment variables (`PATH`, `PYTHONPATH` and `LD_LIBRARY_PATH`) t
To retrieve OpenEB source code, you can just clone the [GitHub repository](https://github.com/prophesee-ai/openeb):

```bash
git clone https://github.com/prophesee-ai/openeb.git --branch 5.0.0
git clone https://github.com/prophesee-ai/openeb.git --branch 5.1.0
```

In the following sections, absolute path to this directory is called ``OPENEB_SRC_DIR``
Expand Down Expand Up @@ -111,7 +110,7 @@ Next, create a virtual environment and install the necessary dependencies:
```bash
python3 -m venv /tmp/prophesee/py3venv --system-site-packages
/tmp/prophesee/py3venv/bin/python -m pip install pip --upgrade
/tmp/prophesee/py3venv/bin/python -m pip install -r OPENEB_SRC_DIR/utils/python/python_requirements/requirements_openeb.txt
/tmp/prophesee/py3venv/bin/python -m pip install -r OPENEB_SRC_DIR/utils/python/requirements_openeb.txt
```

Note that when creating the virtual environment, it is necessary to use the `--system-site-packages` option to ensure that
Expand Down Expand Up @@ -253,7 +252,7 @@ Remove the folders where you installed Metavision artifacts (check both the `bui
To retrieve OpenEB source code, you can just clone the [GitHub repository](https://github.com/prophesee-ai/openeb):

```bash
git clone https://github.com/prophesee-ai/openeb.git --branch 5.0.0
git clone https://github.com/prophesee-ai/openeb.git --branch 5.1.0
```

In the following sections, absolute path to this directory is called ``OPENEB_SRC_DIR``
Expand All @@ -279,9 +278,10 @@ To compile OpenEB, you will need to install some extra tools:
* install [CMake 3.26](https://cmake.org/files/v3.26/cmake-3.26.6-windows-x86_64.msi)
* install Microsoft C++ compiler (64-bit). You can choose one of the following solutions:
* For building only, you can install MS Build Tools (free, part of Windows 10 SDK package)
* Download and run ["Build tools for Visual Studio 2022" installer](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
* Select "C++ build tools", make sure Windows 10 SDK is checked, and add English Language Pack
* For development, you can also download and run [Visual Studio Installer](https://visualstudio.microsoft.com/downloads/)
* Install Microsoft Visual C++ compiler (MSVC, 64-bit version) included in
`Visual Studio 2022 - Fall 2023 LTSC (version 17.8) <https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history#evergreen-bootstrappers>`_.
* Select "C++ build tools", check Windows 10 SDK is checked, and add English Language Pack
* For development, you can also download and run [Visual Studio Installer](https://visualstudio.microsoft.com/downloads/)
* install [vcpkg](https://github.com/microsoft/vcpkg) that will be used for installing dependencies:
* download and extract [vcpkg version 2024.04.26](https://github.com/microsoft/vcpkg/archive/refs/tags/2024.04.26.zip) in a folder that we will refer as `VCPKG_SRC_DIR`
* `cd <VCPKG_SRC_DIR>`
Expand Down Expand Up @@ -333,7 +333,7 @@ Create a virtual environment and install the necessary dependencies:
```bash
python -m venv C:\tmp\prophesee\py3venv --system-site-packages
C:\tmp\prophesee\py3venv\Scripts\python -m pip install pip --upgrade
C:\tmp\prophesee\py3venv\Scripts\python -m pip install -r OPENEB_SRC_DIR\utils\python\python_requirements\requirements_openeb.txt
C:\tmp\prophesee\py3venv\Scripts\python -m pip install -r OPENEB_SRC_DIR\utils\python\requirements_openeb.txt
```

When creating the virtual environment, it is necessary to use the `--system-site-packages` option to ensure that
Expand Down Expand Up @@ -436,6 +436,13 @@ or you can deploy the OpenEB files (applications, samples, libraries etc.) in a
* To deploy OpenEB, you need to build the `INSTALL` project.
By default, files will be deployed in `C:\Program Files\Prophesee`

* You also need to manually edit some environment variables:

* append `<OPENEB_INSTALL_DIR>\bin` to `PATH` (`C:\Program Files\Prophesee\bin` if you used default configuration)
* append `<OPENEB_INSTALL_DIR>\lib\metavision\hal\plugins` to `MV_HAL_PLUGIN_PATH` (`C:\Program Files\Prophesee\lib\metavision\hal\plugins` if you used default configuration)
* append `<OPENEB_INSTALL_DIR>\lib\hdf5\plugin` to `HDF5_PLUGIN_PATH` (`C:\Program Files\Prophesee\lib\hdf5\plugin` if you used default configuration)
* append `<PYTHON3_PACKAGES_INSTALL_DIR>` to `PYTHONPATH` (not needed if you used default configuration)


#### Camera Plugins

Expand Down
2 changes: 1 addition & 1 deletion cmake/custom_functions/add_android_app.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function(add_android_app app)
# Unpack gradle cache for faster and consistent builds
set(ANDROID_GRADLE_CACHE_ARCHIVE utils/android/gradle-cache.tar.gz)
if (NOT EXISTS ${ANDROID_GRADLE_CACHE_DIR})
lfs_download(${ANDROID_GRADLE_CACHE_ARCHIVE} COMPILATION)
lfs_download(COMPILATION IMMEDIATE ${ANDROID_GRADLE_CACHE_ARCHIVE})
message(STATUS "Unpacking ${ANDROID_GRADLE_CACHE_ARCHIVE} in ${ANDROID_GRADLE_CACHE_EXTRACT_DIR}")
file(MAKE_DIRECTORY ${ANDROID_GRADLE_CACHE_EXTRACT_DIR})
execute_process(
Expand Down
4 changes: 2 additions & 2 deletions cmake/custom_functions/add_library_version_header.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# See the License for the specific language governing permissions and limitations under the License.

set(GIT_BRANCH "main")
set(GIT_COMMIT_ID "6abf87d7194ca70c33d4a599944765397fac3335")
set(GIT_COMMIT_DATE "2024-10-02 17:27:00 +0200")
set(GIT_COMMIT_ID "5010c12796e5390f500f9f75a98393acc87baf59")
set(GIT_COMMIT_DATE "2025-01-16 14:51:42 +0100")

find_program(GIT_SCM git DOC "Git version control" HINTS "C:\\Program Files\\Git\\bin\\")

Expand Down
129 changes: 93 additions & 36 deletions cmake/custom_functions/lfs_download.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,111 @@
set(GIT_LFS_NOT_AVAILABLE True)

include(CMakeParseArguments)
option(LFS_DOWNLOAD_COMPILATION_RESOURCES "Only download LFS resources required for compilation step" ON)
option(LFS_DOWNLOAD_VALIDATION_RESOURCES "Only download LFS resources required for compilation step" ON)
option(LFS_DOWNLOAD_COMPILATION_RESOURCES "Download LFS resources required for compilation step" ON)
option(LFS_DOWNLOAD_VALIDATION_RESOURCES "Download LFS resources required for validation step" ON)

function(_call_lfs_download file_or_dir_to_download_comma_separated)
set(retries 3)
set(success FALSE)
while (NOT success AND retries GREATER 0)
execute_process(
COMMAND git lfs pull --include "${file_or_dir_to_download_comma_separated}"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OUTPUT
ERROR_VARIABLE ERROR
RESULT_VARIABLE RESULT
)
if (RESULT AND NOT RESULT EQUAL 0)
message(WARNING "lfs_download error : ${ERROR} output : ${OUTPUT}")
math(EXPR retries "${retries} - 1")
if (retries GREATER 0)
message(STATUS "Retrying download of LFS files")
endif ()
else()
set(success TRUE)
endif()
endwhile()
if (NOT success)
message(FATAL_ERROR "lfs_download failed after 3 retries")
endif()
endfunction ()

function(_lfs_download_at_end_of_configure)
if (DEFINED LFS_ITEMS_TO_DOWNLOAD)
string(REPLACE ";" ", " files_or_dirs_to_download_comma_separated "${LFS_ITEMS_TO_DOWNLOAD}")
message(STATUS "Downloading ${files_or_dirs_to_download_comma_separated} with LFS")
_call_lfs_download("${files_or_dirs_to_download_comma_separated}")
endif()
endfunction()

# Function to download files or directories with git lfs
#
# Usage:
# lfs_download(file_path|dir_path [file_path|dir_path])
# lfs_download([COMPILATION] [VALIDATION] [IMMEDIATE] file_path|dir_path [file_path|dir_path])
# COMPILATION (resp. VALIDATION) can be passed to indicate that the corresponding resources should
# only be downloaded if the variable LFS_DOWNLOAD_COMPILATION_RESOURCES (resp. LFS_DOWNLOAD_VALIDATION_RESOURCES)
# is set (by default, both are set to TRUE, but if compilation and validation steps are split, one of the variables
# should be unset to optimize the download time)
#
# IMMEDIATE indicate that the download must be done while the function is called (the default is to
# accumulate the list of files to download, and perform the actual fetch/checkout at the end of the
# configure time of the current project)
function(lfs_download)
cmake_parse_arguments(LFS_DOWNLOAD_ARGS "VALIDATION;COMPILATION" "" "" ${ARGN})
cmake_parse_arguments(LFS_DOWNLOAD_ARGS "VALIDATION;COMPILATION;IMMEDIATE" "" "" ${ARGN})

if (GIT_LFS_NOT_AVAILABLE)
return()
endif (GIT_LFS_NOT_AVAILABLE)

if (NOT LFS_DOWNLOAD_ARGS_IMMEDIATE)
# Check if we already scheduled a deferred call for LFS to download items
set(_call_already_scheduled FALSE)
cmake_language(DEFER DIRECTORY ${PROJECT_SOURCE_DIR} GET_CALL_IDS _deferred_call_ids)
foreach(id ${_deferred_call_ids})
cmake_language(DEFER DIRECTORY ${PROJECT_SOURCE_DIR} GET_CALL ${id} _deferred_call)
if("${_deferred_call}" MATCHES "_lfs_download_at_end_of_configure")
set(_call_already_scheduled TRUE)
break()
endif()
endforeach()

# Schedule the deferred call if it hasn't been scheduled yet
if(NOT _call_already_scheduled)
set(LFS_ITEMS_TO_DOWNLOAD "" CACHE INTERNAL "List of items to download with git LFS")
cmake_language(DEFER DIRECTORY ${PROJECT_SOURCE_DIR} CALL _lfs_download_at_end_of_configure())
endif()
endif()

if (NOT LFS_DOWNLOAD_ARGS_VALIDATION AND NOT LFS_DOWNLOAD_ARGS_COMPILATION)
message(FATAL_ERROR "lfs_download must be called with at least one keyword in [COMPILATION,VALIDATION]")
endif ()
if (NOT LFS_DOWNLOAD_ARGS_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "lfs_download must be called with a list of files/dirs")
endif ()
string(REPLACE ";" ", " file_or_dir_to_download_comma_separated "${LFS_DOWNLOAD_ARGS_UNPARSED_ARGUMENTS}")
if (NOT GIT_LFS_NOT_AVAILABLE)
foreach(file_or_dir_to_download ${LFS_DOWNLOAD_ARGS_UNPARSED_ARGUMENTS})
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/${file_or_dir_to_download}")
message(FATAL_ERROR "${PROJECT_SOURCE_DIR}/${file_or_dir_to_download} does not exist")
endif()
endforeach(file_or_dir_to_download)

foreach(file_or_dir_to_download ${LFS_DOWNLOAD_ARGS_UNPARSED_ARGUMENTS})
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/${file_or_dir_to_download}")
message(FATAL_ERROR "${PROJECT_SOURCE_DIR}/${file_or_dir_to_download} does not exist")
endif()
endforeach(file_or_dir_to_download)
if (LFS_DOWNLOAD_ARGS_IMMEDIATE)
string(REPLACE ";" ", " files_or_dirs_to_download_comma_separated "${LFS_DOWNLOAD_ARGS_UNPARSED_ARGUMENTS}")
message(STATUS "Downloading ${files_or_dirs_to_download_comma_separated} with LFS")
_call_lfs_download("${files_or_dirs_to_download_comma_separated}")
else()
if (DEFINED LFS_ITEMS_TO_DOWNLOAD)
set (_lfs_items_to_download "${LFS_ITEMS_TO_DOWNLOAD}")
else ()
set(_lfs_items_to_download "")
endif ()
if ((LFS_DOWNLOAD_ARGS_COMPILATION AND LFS_DOWNLOAD_COMPILATION_RESOURCES) OR (LFS_DOWNLOAD_ARGS_VALIDATION AND LFS_DOWNLOAD_VALIDATION_RESOURCES))
message(STATUS "Downloading ${file_or_dir_to_download_comma_separated} with lfs")
set(retries 3)
set(success FALSE)
while (NOT success AND retries GREATER 0)
execute_process(
COMMAND git lfs pull --include "${file_or_dir_to_download_comma_separated}"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OUTPUT
ERROR_VARIABLE ERROR
RESULT_VARIABLE RESULT
)
if (RESULT AND NOT RESULT EQUAL 0)
message(WARNING "lfs_download error : ${ERROR} output : ${OUTPUT}")
math(EXPR retries "${retries} - 1")
if (retries GREATER 0)
message(STATUS "Retrying download of ${file_or_dir_to_download_comma_separated}")
endif ()
else()
set(success TRUE)
endif()
endwhile()
if (NOT success)
message(FATAL_ERROR "lfs_download failed after 3 retries")
endif()
foreach(file_or_dir_to_download ${LFS_DOWNLOAD_ARGS_UNPARSED_ARGUMENTS})
if (NOT "${file_or_dir_to_download}" IN_LIST _lfs_items_to_download)
list(APPEND _lfs_items_to_download ${file_or_dir_to_download})
message(STATUS "Adding ${file_or_dir_to_download} to the list of LFS files to download")
endif ()
endforeach(file_or_dir_to_download)
set(LFS_ITEMS_TO_DOWNLOAD "${_lfs_items_to_download}" CACHE INTERNAL "List of items to download with git LFS")
endif ()
endif (NOT GIT_LFS_NOT_AVAILABLE)
endif()
endfunction()
Loading
Loading