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

Release v4.4.0 #97

Merged
merged 1 commit into from
Oct 11, 2023
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
76 changes: 37 additions & 39 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.3.0)
project(metavision VERSION 4.4.0)
set(PROJECT_VERSION_SUFFIX "")

if(PROJECT_VERSION_SUFFIX STREQUAL "")
Expand Down Expand Up @@ -71,12 +71,14 @@ include(CMakeDependentOption)
include(overridden_cmake_functions)
include(lfs_download)
include(add_pytest)
include(common_macros)

if (ANDROID)
# 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})
lfs_download(${ANDROID_PREBUILT_3RDPARTY_ARCHIVE} COMPILATION)
message(STATUS "Unpacking ${ANDROID_PREBUILT_3RDPARTY_ARCHIVE} in ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR}")
file(MAKE_DIRECTORY ${ANDROID_PREBUILT_3RDPARTY_EXTRACT_DIR})
execute_process(
Expand Down Expand Up @@ -154,9 +156,7 @@ if (WIN32)
endif()


if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/utils/platforms/CMakeLists.txt")
add_subdirectory(utils/platforms) # Load platform specific cmake early to override necessary options
endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/utils/platforms/CMakeLists.txt")
add_subdirectory_if_exists(utils/platforms) # Load platform specific cmake early to override necessary options

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

Expand Down Expand Up @@ -242,30 +242,32 @@ if (BUILD_TESTING)
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)
lfs_download(datasets/openeb/gen31_timer.hdf5)
lfs_download(datasets/openeb/gen31_timer_holes.raw)
lfs_download(datasets/openeb/gen31_timer_holes.hdf5)
lfs_download(datasets/openeb/gen4_evt2_hand.raw)
lfs_download(datasets/openeb/gen4_evt2_hand.hdf5)
lfs_download(datasets/openeb/gen4_evt3_hand.raw)
lfs_download(datasets/openeb/gen4_evt3_hand.hdf5)
lfs_download(datasets/openeb/blinking_gen4_with_ext_triggers.raw)
lfs_download(datasets/openeb/blinking_gen4_with_ext_triggers.hdf5)
lfs_download(datasets/openeb/claque_doigt_evt21.raw)
lfs_download(datasets/openeb/claque_doigt_evt21.hdf5)
lfs_download(datasets/openeb/standup_evt21-legacy.raw)
lfs_download(datasets/openeb/standup_evt21-legacy.hdf5)
lfs_download(datasets/openeb/diff3d.raw)
lfs_download(datasets/openeb/histo3d.raw)
lfs_download(datasets/openeb/histo3d_padding.raw)
lfs_download(datasets/openeb/test_start_after_0.dat)
lfs_download(datasets/openeb/aer_8bits.raw)
lfs_download(datasets/openeb/aer_4bits.raw)
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)
lfs_download(datasets/openeb/gen31_timer_holes.hdf5 VALIDATION)
lfs_download(datasets/openeb/gen4_evt2_hand.raw VALIDATION)
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/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/standup_evt21-legacy.raw VALIDATION)
lfs_download(datasets/openeb/standup_evt21-legacy.hdf5 VALIDATION)
lfs_download(datasets/openeb/diff3d.raw VALIDATION)
lfs_download(datasets/openeb/histo3d.raw VALIDATION)
lfs_download(datasets/openeb/histo3d_padding.raw VALIDATION)
lfs_download(datasets/openeb/test_start_after_0.dat VALIDATION)
lfs_download(datasets/openeb/aer_8bits.raw VALIDATION)
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)
if(COMPILE_PYTHON3_BINDINGS)
lfs_download(datasets/openeb/blinking_leds.raw)
lfs_download(datasets/openeb/gen4_evt2_hand_cd.dat)
lfs_download(datasets/openeb/core)
lfs_download(datasets/openeb/blinking_leds.raw VALIDATION)
lfs_download(datasets/openeb/gen4_evt2_hand_cd.dat VALIDATION)
lfs_download(datasets/openeb/core VALIDATION)
endif(COMPILE_PYTHON3_BINDINGS)


Expand Down Expand Up @@ -359,7 +361,7 @@ endforeach(metavision_modules_set)
include(uninstall)
include(add_library_version_header)
include(add_cpack_component)
include(create_metavision_open_archive)

if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/custom_targets_metavision_sdk")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/custom_targets_metavision_sdk)
include(create_metavision_sdk_source_archives)
Expand Down Expand Up @@ -403,17 +405,13 @@ endif (METAVISION_SDK_ADVANCED_MODULES_AVAILABLE)
################################
# Utils ##
################################
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/utils/CMakeLists.txt")
add_subdirectory(utils)
endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/utils/CMakeLists.txt")
add_subdirectory_if_exists(utils)

################################
# HAL ##
################################
add_subdirectory(hal)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/hal_psee_plugins/CMakeLists.txt")
add_subdirectory(hal_psee_plugins)
endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/hal_psee_plugins/CMakeLists.txt")
add_subdirectory_if_exists(hal_psee_plugins)

################################
# SDK ##
Expand All @@ -428,9 +426,7 @@ add_subdirectory(standalone_samples)
################################
# Standalone apps ##
################################
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/standalone_apps/CMakeLists.txt")
add_subdirectory(standalone_apps)
endif (EXISTS "${CMAKE_CURRENT_LIST_DIR}/standalone_apps/CMakeLists.txt")
add_subdirectory_if_exists(standalone_apps)

################################
# Documentation ##
Expand All @@ -443,6 +439,9 @@ endif (GENERATE_DOC)
# Add script generation at the end, once all other subdirs have been processed
add_subdirectory(utils/scripts)

# Add open archive task after modules, hal and plugins that might affect it
include(create_metavision_open_archive)

################################################### CPack for debian packages

include(deb_packages)
Expand All @@ -463,4 +462,3 @@ foreach(comp ${cpack_all_components})
)
endif()
endforeach()

44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# OpenEB

OpenEB is the open source project associated with [Metavision SDK](https://www.prophesee.ai/metavision-intelligence/)
OpenEB is the open source project associated with [Metavision SDK](https://docs.prophesee.ai/stable/index.html)

It enables anyone to get a better understanding of event-based vision, directly interact with events and build
their own applications or plugins. As a camera manufacturer, ensure your customers benefit from the most advanced
their own applications or camera plugins. As a camera manufacturer, ensure your customers benefit from the most advanced
event-based software suite available by building your own plugin. As a creator, scientist, academic, join and contribute
to the fast-growing event-based vision community.

OpenEB is composed of the Open modules of Metavision SDK:
OpenEB is composed of the [Open modules of Metavision SDK](https://docs.prophesee.ai/stable/modules.html#chapter-modules-and-packaging-open):
* HAL: Hardware Abstraction Layer to operate any event-based vision device.
* Base: Foundations and common definitions of event-based applications.
* Core: Generic algorithms for visualization, event stream manipulation, applicative pipeline generation.
* Core ML: Generic functions for Machine Learning, event_to_video and video_to_event pipelines.
* Driver: High-level abstraction built on the top of HAL to easily interact with event-based cameras.
* UI: Viewer and display controllers for event-based data.

OpenEB also contains the source code of Prophesee camera plugins, enabling to stream data from our event-based cameras
and to read recordings of event-based data. The supported cameras are:
* EVK2 - Gen4.1 HD
* EVK3 - Gen 3.1 VGA / Gen4.1 HD
OpenEB also contains the source code of [Prophesee camera plugins](https://docs.prophesee.ai/stable/installation/camera_plugins.html),
enabling to stream data from our event-based cameras and to read recordings of event-based data.
The supported cameras are:
* EVK2 - HD
* EVK3 - VGA/320/HD
* EVK4 - HD

This document describes how to compile and install the OpenEB codebase.
Expand All @@ -45,7 +46,8 @@ was not tested. For those platforms some adjustments to this guide or to the cod
### Upgrading OpenEB

If you are upgrading OpenEB from a previous version, you should first read carefully the [Release Notes](https://docs.prophesee.ai/stable/release_notes.html)
as some changes may impact your usage of our SDK (e.g. API updates) and cameras (e.g. [firmware update](https://support.prophesee.ai/portal/en/kb/articles/evk-firmware-versions) might be necessary).
as some changes may impact your usage of our SDK (e.g. [API](https://docs.prophesee.ai/stable/api.html) updates)
and cameras (e.g. [firmware update](https://support.prophesee.ai/portal/en/kb/articles/evk-firmware-versions) might be necessary).

Then, you need to clean your system from previously installed Prophesee software. If after a previous compilation, you chose to
deploy the Metavision files in your system path, then go to the `build` folder in the source code directory and
Expand All @@ -65,7 +67,7 @@ Install the following dependencies:
```bash
sudo apt update
sudo apt -y install apt-utils build-essential software-properties-common wget unzip curl git cmake
sudo apt -y install libopencv-dev libboost-all-dev libusb-1.0-0-dev
sudo apt -y install libopencv-dev libboost-all-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler
sudo apt -y install libhdf5-dev hdf5-tools libglew-dev libglfw3-dev libcanberra-gtk-module ffmpeg
```

Expand All @@ -76,7 +78,7 @@ For more details, see [Google Test User Guide](https://google.github.io/googlete
sudo apt -y install libgtest-dev libgmock-dev
```

For the Python API, you will need Python and some additional libraries.
For the [Python API](https://docs.prophesee.ai/stable/api/python/index.html#chapter-api-python), you will need Python and some additional libraries.
If Python is not available on your system, install it
We support Python 3.8 and 3.9 on Ubuntu 20.04 and Python 3.9 and 3.10 on Ubuntu 22.04.
If you want to use other versions of Python, some source code modifications will be necessary
Expand All @@ -86,7 +88,7 @@ Then install `pip` and some Python libraries:
sudo apt -y install python3-pip python3-distutils
sudo apt -y install python3.X-dev # where X is 8, 9 or 10 depending on your Python version (3.8, 3.9 or 3.10)
python3 -m pip install pip --upgrade
python3 -m pip install "opencv-python==4.5.5.64" "sk-video==1.1.10" "fire==0.4.0" "numpy==1.23.4" pandas scipy h5py
python3 -m pip install "opencv-python==4.5.5.64" "sk-video==1.1.10" "fire==0.4.0" "numpy==1.23.4" "h5py==3.7.0" pandas scipy
python3 -m pip install jupyter jupyterlab matplotlib "ipywidgets==7.6.5" pytest command_runner
```

Expand Down Expand Up @@ -131,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.3.0`.
1. Retrieve the code: `git clone https://github.com/prophesee-ai/openeb.git --branch 4.4.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 All @@ -155,8 +157,8 @@ or you can deploy the OpenEB files in the system path (`/usr/local/lib`, `/usr/l
source utils/scripts/setup_env.sh
```

* Prophesee camera plugins are included in OpenEB, but you still need to copy the udev rules files in the system path
and reload them so that your camera is detected with this command:
* [Prophesee camera plugins](https://docs.prophesee.ai/stable/installation/camera_plugins.html) are included in OpenEB,
but you still need to copy the udev rules files in the system path and reload them so that your camera is detected with this command:

```bash
sudo cp <OPENEB_SRC_DIR>/hal_psee_plugins/resources/rules/*.rules /etc/udev/rules.d
Expand All @@ -182,7 +184,7 @@ 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/hdf5/lib/plugin
export HDF5_PLUGIN_PATH=$HDF5_PLUGIN_PATH:/usr/local/lib/hdf5/plugin
```

Note that if you are using a third-party camera, you need to install the plugin provided
Expand Down Expand Up @@ -222,7 +224,8 @@ For those platforms some adjustments to this guide or to the code itself may be
### Upgrading OpenEB

If you are upgrading OpenEB from a previous version, you should first read carefully the [Release Notes](https://docs.prophesee.ai/stable/release_notes.html)
as some changes may impact your usage of our SDK (e.g. :API updates) and cameras (e.g. [firmware update](https://support.prophesee.ai/portal/en/kb/articles/evk-firmware-versions) might be necessary).
as some changes may impact your usage of our SDK (e.g. [API](https://docs.prophesee.ai/stable/api.html) updates)
and cameras (e.g. [firmware update](https://support.prophesee.ai/portal/en/kb/articles/evk-firmware-versions) might be necessary).

Then, if you have previously installed any Prophesee's software, you will need to uninstall it first.
Remove the folders where you installed Metavision artifacts (check both the `build` folder of the source code and
Expand Down Expand Up @@ -288,7 +291,7 @@ Then install `pip` and some Python libraries:

```bash
python -m pip install pip --upgrade
python -m pip install "opencv-python==4.5.5.64" "sk-video==1.1.10" "fire==0.4.0" "numpy==1.23.4" pandas scipy h5py
python -m pip install "opencv-python==4.5.5.64" "sk-video==1.1.10" "fire==0.4.0" "numpy==1.23.4" "h5py==3.7.0" pandas scipy
python -m pip install jupyter jupyterlab matplotlib "ipywidgets==7.6.5" pytest command_runner
```

Expand Down Expand Up @@ -323,7 +326,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.3.0
git clone https://github.com/prophesee-ai/openeb.git --branch 4.4.0
```

Note that if you choose to download an archive of OpenEB from GitHub rather than cloning the repository,
Expand Down Expand Up @@ -407,7 +410,7 @@ or you can deploy the OpenEB files (applications, samples, libraries etc.) in a

#### Camera Plugins

Since OpenEB 3.0.0, **Prophesee camera plugins** are included in OpenEB, but you need to install the drivers
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)
Expand All @@ -431,9 +434,6 @@ To get started with OpenEB, you can download some [sample recordings](https://do
and visualize them with [metavision_viewer](https://docs.prophesee.ai/stable/samples/modules/driver/viewer.html)
or you can stream data from your Prophesee-compatible event-based camera.

*Note* that since OpenEB 3.0.0, Prophesee camera plugins are included in the OpenEB repository, so you don't need to perform
any extra step to install them. If you are using a third-party camera, you need to install the plugin provided
by the camera vendor and specify the location of the plugin using the `MV_HAL_PLUGIN_PATH` environment variable.

### Running the test suite (Optional)

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})
lfs_download(${ANDROID_GRADLE_CACHE_ARCHIVE} COMPILATION)
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 "dd32fa23b19dfefe5da2a0d16939dd0d958fe9cf")
set(GIT_COMMIT_DATE "2023-08-07 18:30:56 +0200")
set(GIT_COMMIT_ID "5319a6deae077ed1dca071af6d1006936339e02a")
set(GIT_COMMIT_DATE "2023-10-10 17:53:39 +0200")

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and limitations under the License.

add_subdirectory(metavision_platform_info)
macro(add_subdirectory_if_exists sub_dir)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${sub_dir}/CMakeLists.txt")
add_subdirectory(${sub_dir})
endif()
endmacro()
Loading
Loading