Skip to content

Commit

Permalink
merge v3_develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Serafadam committed Feb 3, 2025
2 parents e2c0152 + 1b3dc11 commit e89dacb
Show file tree
Hide file tree
Showing 23 changed files with 361 additions and 158 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/stability.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ jobs:

# Testing
test:
runs-on: ['self-hosted', 'hil-stability', 'linux']
runs-on: ['self-hosted', 'testbed-runner', 'linux']
timeout-minutes: 1450 # 24h & 10minutes
steps:
- name: Cache .hunter folder
uses: actions/cache@v3
with:
path: $HOME/.hun_vanilla
key: hunter-linux-stability-vanilla
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Prepare HIL Framework
run: source scripts/hil/prepare_hil_framework.sh

# TODO also modify above hunter key to 'asan'
# - name: Specify ASAN toolchain path
Expand All @@ -48,7 +45,5 @@ jobs:
# Release build
- name: Configure, Build and Test
run: |
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D HUNTER_ROOT=$HOME/.hun_vanilla -D DEPTHAI_BUILD_TESTS=ON
cmake --build build --parallel 8 --config Release --target stability_stress_test
cd build
../ci/stability_stress_test_combined.sh 86400
export RESERVATION_NAME="https://github.com/$GITHUB_REPOSITORY/actions/$GITHUB_RUN_ID+stability"
exec hil --capabilities depthai-core-hil --reservation-name $RESERVATION_NAME -w -s --commands 'cd /tmp/depthai-core|| exit' 'scripts/hil/run_hil_stability.sh'
80 changes: 47 additions & 33 deletions .github/workflows/test.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:
jobs:

# Testing
test:
rvc2_test:
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
strategy:
Expand All @@ -33,14 +33,9 @@ jobs:
arch: 'x64'
flavor: 'tsan'
fail-fast: false
runs-on: ['self-hosted', 'hil-test-v3', '${{ matrix.os }}', '${{ matrix.arch }}']
runs-on: ['self-hosted', 'testbed-runner']

steps:
- name: Cache .hunter folder
uses: actions/cache@v3
with:
path: $HOME/.hun2_${{ matrix.flavor }}
key: hunter-${{ matrix.os }}-${{ matrix.cmake }}
- uses: actions/checkout@v3
with:
submodules: 'recursive'
Expand All @@ -51,37 +46,56 @@ jobs:
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Create virtual environment
run: |
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install numpy
- name: Specify toolchain path
if: matrix.flavor == 'vanilla'
run: echo "CMAKE_TOOLCHAIN_PATH=" >> $GITHUB_ENV
- name: Specify toolchain path
if: matrix.flavor != 'vanilla'
run: echo "CMAKE_TOOLCHAIN_PATH=$PWD/cmake/toolchain/${{ matrix.flavor }}.cmake" >> $GITHUB_ENV
- name: Prepare HIL Framework
run: source scripts/hil/prepare_hil_framework.sh

- name: Configure, Build and Test
if: matrix.os != 'linux'
run: |
source venv/bin/activate # Activate virtual environment
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D HUNTER_ROOT=$HOME/.hun2_${{ matrix.flavor }} -D DEPTHAI_BUILD_EXAMPLES=ON -D DEPTHAI_BUILD_TESTS=ON -D DEPTHAI_TEST_EXAMPLES=ON -D DEPTHAI_BUILD_PYTHON=ON -D DEPTHAI_PYTHON_TEST_EXAMPLES=ON -D DEPTHAI_PYTHON_ENABLE_EXAMPLES=ON
cmake --build build --parallel 4 --config Release
cd tests
python3 run_tests.py
export RESERVATION_NAME="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID#rvc2-${{ matrix.os }}-${{ matrix.flavor }}"
exec hil --capabilities depthai-core-hil --reservation-name $RESERVATION_NAME --wait --sync-workspace --exclude-build --commands 'cd /tmp/depthai-core|| exit' 'scripts/hil/run_hil_tests.sh ${{ matrix.flavor }} --rvc2'
- name: Configure, Build and Test
if: matrix.os == 'linux'
run: |
export DISPLAY=:99
xdpyinfo -display $DISPLAY >/dev/null 2>&1 || (Xvfb $DISPLAY &)
source venv/bin/activate # Activate virtual environment
python3 -m pip install jinja2 rerun-sdk open3d-cpu
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D HUNTER_ROOT=$HOME/.hun2_${{ matrix.flavor }} -D DEPTHAI_BUILD_EXAMPLES=ON -D DEPTHAI_BUILD_TESTS=ON -D DEPTHAI_TEST_EXAMPLES=ON -D DEPTHAI_BUILD_PYTHON=ON -D DEPTHAI_PYTHON_TEST_EXAMPLES=ON -D DEPTHAI_PYTHON_ENABLE_EXAMPLES=ON
cmake --build build --parallel 4 --config Release
cd tests
python3 run_tests.py
export RESERVATION_NAME="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID#rvc2-${{ matrix.os }}-${{ matrix.flavor }}"
exec hil --capabilities depthai-core-hil --reservation-name $RESERVATION_NAME --wait --sync-workspace --exclude-build --commands 'cd /tmp/depthai-core|| exit' 'scripts/hil/run_hil_tests.sh ${{ matrix.flavor }} --rvc2'
# Testing
rvc4_test:
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
strategy:
matrix:
# os: ['windows', 'macos', 'linux']
os: ['linux']
arch: ['x64']
flavor: ['vanilla', 'asan-ubsan', 'tsan']
rvc4os: ['r851.1.2']
exclude:
- os: 'windows'
arch: 'x64'
flavor: 'tsan'
fail-fast: false
runs-on: ['self-hosted', 'testbed-runner']

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Prepare HIL Framework
run: source scripts/hil/prepare_hil_framework.sh

- name: Configure, Build and Test
if: matrix.os != 'linux'
run: |
export RESERVATION_NAME="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID#rvc4-${{ matrix.os }}-${{ matrix.rvc4os }}-${{ matrix.flavor }}""
exec hil --capabilities depthai-core-hil --models oak4_pro --reservation-name $RESERVATION_NAME --wait --sync-workspace --exclude-build --commands 'cd /tmp/depthai-core|| exit' 'scripts/hil/run_hil_tests.sh ${{ matrix.flavor }} --rvc4 '
- name: Configure, Build and Test
if: matrix.os == 'linux'
run: |
export RESERVATION_NAME="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID#rvc4-${{ matrix.os }}-${{ matrix.rvc4os }}-${{ matrix.flavor }}"
exec hil --capabilities depthai-core-hil --models oak4_pro --reservation-name $RESERVATION_NAME --wait --sync-workspace --exclude-build --rvc4-os-version ${{ matrix.rvc4os }} --commands 'cd /tmp/depthai-core|| exit' 'scripts/hil/run_hil_tests.sh ${{ matrix.flavor }} --rvc4'
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ void bind_imagemanipconfigv2(pybind11::module& m, void* pCallstack) {
DOC(dai, ImageManipConfigV2, addTransformFourPoints))
.def("setColormap", &ImageManipConfigV2::setColormap, py::arg("colormap"), DOC(dai, ImageManipConfigV2, setColormap))
.def("setBackgroundColor",
static_cast<ImageManipConfigV2& (ImageManipConfigV2::*)(uint8_t, uint8_t, uint8_t)>(&ImageManipConfigV2::setBackgroundColor),
static_cast<ImageManipConfigV2& (ImageManipConfigV2::*)(uint32_t, uint32_t, uint32_t)>(&ImageManipConfigV2::setBackgroundColor),
py::arg("r"),
py::arg("g"),
py::arg("b"),
DOC(dai, ImageManipConfigV2, setBackgroundColor))
.def("setBackgroundColor",
static_cast<ImageManipConfigV2& (ImageManipConfigV2::*)(uint8_t)>(&ImageManipConfigV2::setBackgroundColor),
static_cast<ImageManipConfigV2& (ImageManipConfigV2::*)(uint32_t)>(&ImageManipConfigV2::setBackgroundColor),
py::arg("val"),
DOC(dai, ImageManipConfigV2, setBackgroundColor))
.def("setOutputSize",
Expand Down
2 changes: 1 addition & 1 deletion cmake/Depthai/DepthaiDeviceRVC4Config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set(DEPTHAI_DEVICE_RVC4_MATURITY "snapshot")

# "version if applicable"
# set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+93f7b75a885aa32f44c5e9f53b74470c49d2b1af")
set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+78ff040f04e86bc77b1618c87a931d645f7aa109")
set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+e15e34e96495e1ac3d4c064499d45f33784cba8a")
2 changes: 1 addition & 1 deletion cmake/Depthai/DepthaiDeviceSideConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "a9d354351694c5dd96def768c0b0155354cab38c")
set(DEPTHAI_DEVICE_SIDE_COMMIT "9af6aa33e593ce207ad00d09e528ce85181d543b")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")
2 changes: 1 addition & 1 deletion cmake/Depthai/DepthaiVisualizerConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# "full commit hash of depthai visualizer static files"
set(DEPTHAI_VISUALIZER_COMMIT "759dcd24c7bb96175ea7402355d750eb1ffd42c6")
set(DEPTHAI_VISUALIZER_COMMIT "0.4.0")
56 changes: 0 additions & 56 deletions examples/python/ImageManip/image_manip_all.py

This file was deleted.

3 changes: 1 addition & 2 deletions include/depthai/pipeline/Pipeline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ class Pipeline {

/**
* Creates a pipeline
* @param hostOnly If true, pipeline will run only be able to run host nodes and no device nodes can be added, otherwise pipeline implicitly creates a
* device
* @param createImplicitDevice If true, creates a default device (default = true)
*/
explicit Pipeline(bool createImplicitDevice = true);

Expand Down
14 changes: 7 additions & 7 deletions include/depthai/pipeline/datatype/ImageManipConfigV2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ class ImageManipOpsBase : public ImageManipOpsEnums {
bool center = true;
ResizeMode resizeMode = ResizeMode::NONE;
Background background = Background::COLOR;
uint8_t backgroundR = 0;
uint8_t backgroundG = 0;
uint8_t backgroundB = 0;
uint32_t backgroundR = 0;
uint32_t backgroundG = 0;
uint32_t backgroundB = 0;
Colormap colormap = Colormap::NONE;
bool undistort = false;

Expand Down Expand Up @@ -348,15 +348,15 @@ class ImageManipOpsBase : public ImageManipOpsEnums {
return *this;
}

ImageManipOpsBase& setBackgroundColor(uint8_t red, uint8_t green, uint8_t blue) {
ImageManipOpsBase& setBackgroundColor(uint32_t red, uint32_t green, uint32_t blue) {
background = Background::COLOR;
backgroundR = red;
backgroundG = green;
backgroundB = blue;
return *this;
}

ImageManipOpsBase& setBackgroundColor(uint8_t val) {
ImageManipOpsBase& setBackgroundColor(uint32_t val) {
background = Background::COLOR;
backgroundR = val;
backgroundG = val;
Expand Down Expand Up @@ -517,12 +517,12 @@ class ImageManipConfigV2 : public Buffer {
* @param green Green component of the background color
* @param blue Blue component of the background color
*/
ImageManipConfigV2& setBackgroundColor(uint8_t red, uint8_t green, uint8_t blue);
ImageManipConfigV2& setBackgroundColor(uint32_t red, uint32_t green, uint32_t blue);
/**
* Sets the grayscale background color of the output image
* @param val Grayscale value of the background color
*/
ImageManipConfigV2& setBackgroundColor(uint8_t val);
ImageManipConfigV2& setBackgroundColor(uint32_t val);
/**
* Sets the frame type of the output image
* @param frameType Frame type of the output image
Expand Down
5 changes: 5 additions & 0 deletions include/depthai/pipeline/datatype/Tracklets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ class Tracklets : public Buffer {
*/
std::vector<Tracklet> tracklets;

void serialize(std::vector<std::uint8_t>& metadata, DatatypeEnum& datatype) const override {
metadata = utility::serialize(*this);
datatype = DatatypeEnum::Tracklets;
};

DEPTHAI_SERIALIZE(Tracklets, tracklets, Buffer::ts, Buffer::tsDevice, Buffer::sequenceNum);
};

Expand Down
Loading

0 comments on commit e89dacb

Please sign in to comment.