Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8962a1e
stress-test: Use intensity leds api (#1105)
zrezke Mar 27, 2025
a3f153c
Update FW: Fix decimation filter + RGB depth alignment with default s…
Mar 30, 2025
79225af
ObjectTracker: Add new config fields
Apr 29, 2025
822709f
Add ObjectTrackerConfig message
May 6, 2025
a3fd96e
ObjectTracker: add force remove functionality; update object_tracker.py
May 6, 2025
7e227fc
Add missing ObjectTracker bindings
May 6, 2025
0c90bc6
Remove whitespace from bindings
May 7, 2025
3f04748
Merge pull request #1109 from luxonis/object_tracker_improvements
SzabolcsGergely May 9, 2025
ff0a379
Update core
May 9, 2025
5b12f12
Update CI to run on github hoster runners and pin down manylinux cont…
May 13, 2025
c854e1b
Update RVC2 FW: handle ToF phase unwrapping underflow
May 29, 2025
cf42968
Update FW w/ TOF fixes
Jun 10, 2025
7e3536c
cam_test: fix raw handling (metadata, offset) for IMX462
alex-luxonis Jul 4, 2025
bca3ff1
IMX462: max 114fps, exposure down to 8us (AE and manual)
alex-luxonis Jul 8, 2025
15056a9
RVC2 FW:
alex-luxonis Oct 7, 2025
f23558c
Use macos-14 in actions
Oct 13, 2025
452f4d4
Fix Windows wheels building
Oct 13, 2025
25bfe36
[RVC2 FW] Remove shutdown regression on RVC2
Oct 15, 2025
75f9827
cam_test: add `B` key to toggle HDR exposure base,
alex-luxonis Oct 24, 2025
8f54bbc
cam_test: add tmp workaround for HDR initial local tone weight
alex-luxonis Oct 24, 2025
aee44bc
Update core
Oct 28, 2025
5873af7
RVC2 FW: fix IMU-related system hang at reboot, IMX577 tuning
alex-luxonis Nov 17, 2025
04da7f5
Update Docker Hub workflow for ARM architecture
moratom Nov 19, 2025
e31b6af
Add support for Python 3.14 and drop 3.7, 3.8
Nov 19, 2025
5969d0f
Bump manylinux containers
Nov 19, 2025
904a5ec
Set CMake version
Nov 19, 2025
44b5895
Loosen CMake requirement
Nov 19, 2025
68cd2ac
Explicitly use cmake from pypi
Nov 19, 2025
9c3018e
Fix source distribution
Nov 19, 2025
5bbac8d
Bump core to v2_develop
Nov 25, 2025
21bd234
Bump core to the release branch
Nov 25, 2025
58ea82c
Fix thermal support
Nov 26, 2025
7a3e683
Bump core
Nov 26, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, [Linux, ARM], [Linux, ARM64]]
os: [ubuntu-latest, [Linux, ARM], ubuntu-24.04-arm]
include:
- os: ubuntu-latest
arch: amd64
- os: [Linux, ARM]
arch: armv7
- os: [Linux, ARM64]
- os: ubuntu-24.04-arm
arch: armv8
steps:
- name: Clean the workspace
Expand Down
38 changes: 22 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ jobs:
needs: build-docstrings
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Print home directory
run: echo Home directory inside container $HOME
- name: Setup cmake
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-14'
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: '3.29.x'
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
sudo apt install libusb-1.0-0-dev

- name: Install dependencies (MacOS)
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-14'
run: |
python -m pip install --upgrade pip
brew install libusb
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12', '3.13']
python-version: [3.9, '3.10', '3.11', '3.12', '3.13', '3.14']
python-architecture: [x64, x86]
fail-fast: false
steps:
Expand All @@ -207,6 +207,11 @@ jobs:
- name: Select Windows SDK
run: echo "CMAKE_ARGS=-DCMAKE_SYSTEM_VERSION=${{ env.CMAKE_WINDOWS_SDK_VERSION }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Set UTF-8 encoding
run: |
echo "PYTHONIOENCODING=utf-8" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "PYTHONUTF8=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Install dependencies
run: choco install strawberryperl
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -240,7 +245,7 @@ jobs:
needs: build-docstrings
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11', '3.12', '3.13']
python-version: [3.9, '3.10', '3.11', '3.12', '3.13', '3.14']
os: [macos-13, macos-14] # macos-13 is x64, macos-14 is arm64
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -301,7 +306,7 @@ jobs:
needs: build-docstrings
runs-on: ubuntu-latest
container:
image: quay.io/pypa/manylinux_2_28_x86_64:latest
image: quay.io/pypa/manylinux_2_28_x86_64:2025.11.10-2
env:
PLAT: manylinux_2_28_x86_64
steps:
Expand All @@ -317,7 +322,7 @@ jobs:
run: yum install -y --disableplugin=fastestmirror libusb1-devel perl-core
- name: Installing cmake dependency
run: |
/opt/python/cp38-cp38/bin/python3.8 -m pip install cmake
/opt/python/cp38-cp38/bin/python3.8 -m pip install "cmake<4.0"
ln -s /opt/python/cp38-cp38/bin/cmake /bin/
- name: Create folder structure
run: mkdir -p wheelhouse/audited/
Expand All @@ -331,8 +336,8 @@ jobs:

- name: Build and install depthai-core
run: |
cmake -S depthai-core/ -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake
cmake --build build_core --target install --parallel 4
/opt/python/cp38-cp38/bin/cmake -S depthai-core/ -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake
/opt/python/cp38-cp38/bin/cmake --build build_core --target install --parallel 4
echo "DEPTHAI_INSTALLATION_DIR=$PWD/build_core/install/" >> $GITHUB_ENV

- name: Append build hash if not a tagged commit
Expand All @@ -341,10 +346,11 @@ jobs:

- name: Building source distribution
run: |
/opt/python/cp38-cp38/bin/python3.8 -m pip install --upgrade setuptools wheel
/opt/python/cp38-cp38/bin/python3.8 setup.py sdist --formats=gztar
mv dist/* wheelhouse/audited/
- name: Build wheels
run: for PYBIN in /opt/python/cp3{7..13}*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose; done
run: for PYBIN in /opt/python/cp3{9..14}*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose; done
- name: Audit wheels
run: for whl in wheelhouse/*.whl; do auditwheel repair "$whl" --plat $PLAT -w wheelhouse/audited/; done
- name: Archive wheel artifacts
Expand All @@ -363,9 +369,9 @@ jobs:
# This job builds wheels for ARM64 arch
build-linux-arm64:
needs: build-docstrings
runs-on: [self-hosted, linux, ARM64]
runs-on: ubuntu-24.04-arm
container:
image: quay.io/pypa/manylinux_2_28_aarch64:latest
image: quay.io/pypa/manylinux_2_28_aarch64:2025.11.10-2
env:
PLAT: manylinux_2_28_aarch64
# Mount local hunter cache directory, instead of transfering to Github and back
Expand All @@ -379,7 +385,7 @@ jobs:
run: yum install -y --disableplugin=fastestmirror libusb1-devel perl-core
- name: Installing cmake dependency
run: |
/opt/python/cp38-cp38/bin/python3.8 -m pip install cmake
/opt/python/cp38-cp38/bin/python3.8 -m pip install "cmake<4"
ln -s /opt/python/cp38-cp38/bin/cmake /bin/
- name: Create folder structure
run: mkdir -p wheelhouse/audited/
Expand All @@ -393,15 +399,15 @@ jobs:

- name: Build and install depthai-core
run: |
cmake -S depthai-core/ -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake
cmake --build build_core --target install --parallel 4
/opt/python/cp38-cp38/bin/cmake -S depthai-core/ -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake
/opt/python/cp38-cp38/bin/cmake --build build_core --target install --parallel 4
echo "DEPTHAI_INSTALLATION_DIR=$PWD/build_core/install/" >> $GITHUB_ENV

- name: Append build hash if not a tagged commit
if: startsWith(github.ref, 'refs/tags/v') != true
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
- name: Building wheels
run: for PYBIN in /opt/python/cp3{7..13}*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose; done
run: for PYBIN in /opt/python/cp3{9..14}*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose; done
- name: Auditing wheels
run: for whl in wheelhouse/*.whl; do auditwheel repair "$whl" --plat $PLAT -w wheelhouse/audited/; done
- name: Archive wheel artifacts
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ pybind11_add_module(${TARGET_NAME}
src/pipeline/datatype/PointCloudConfigBindings.cpp
src/pipeline/datatype/PointCloudDataBindings.cpp
src/pipeline/datatype/ImageAlignConfigBindings.cpp
src/pipeline/datatype/ObjectTrackerConfigBindings.cpp
)

if(WIN32)
Expand Down
4 changes: 2 additions & 2 deletions cmake/Hunter/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
hunter_config(
pybind11
VERSION "2.12.0"
URL "https://github.com/pybind/pybind11/archive/refs/tags/v2.12.0.tar.gz"
SHA1 "e70610cba7b6b7d7a57827d5357c016ad2155c0f"
URL "https://github.com/pybind/pybind11/archive/refs/tags/v3.0.1.tar.gz"
SHA1 "b20ddcd79e2b03b7e2777a2a0b06b646f2f23ce0"
)
30 changes: 29 additions & 1 deletion examples/ObjectTracker/object_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@

xlinkOut = pipeline.create(dai.node.XLinkOut)
trackerOut = pipeline.create(dai.node.XLinkOut)
xinTrackerConfig = pipeline.create(dai.node.XLinkIn)

xlinkOut.setStreamName("preview")
trackerOut.setStreamName("tracklets")
xinTrackerConfig.setStreamName("trackerConfig")

# Properties
camRgb.setPreviewSize(300, 300)
Expand Down Expand Up @@ -64,18 +66,27 @@
detectionNetwork.out.link(objectTracker.inputDetections)
objectTracker.out.link(trackerOut.input)

# set tracking parameters
objectTracker.setOcclusionRatioThreshold(0.4)
objectTracker.setTrackletMaxLifespan(120)
objectTracker.setTrackletBirthThreshold(3)

xinTrackerConfig.out.link(objectTracker.inputConfig)

# Connect to device and start pipeline
with dai.Device(pipeline) as device:

preview = device.getOutputQueue("preview", 4, False)
tracklets = device.getOutputQueue("tracklets", 4, False)
trackerConfigQueue = device.getInputQueue("trackerConfig")

startTime = time.monotonic()
counter = 0
fps = 0
frame = None

while(True):
latestTrackedIds = []
imgFrame = preview.get()
track = tracklets.get()

Expand Down Expand Up @@ -106,9 +117,26 @@
cv2.putText(frame, t.status.name, (x1 + 10, y1 + 50), cv2.FONT_HERSHEY_TRIPLEX, 0.5, 255)
cv2.rectangle(frame, (x1, y1), (x2, y2), color, cv2.FONT_HERSHEY_SIMPLEX)

if t.status == dai.Tracklet.TrackingStatus.TRACKED:
latestTrackedIds.append(t.id)

cv2.putText(frame, "NN fps: {:.2f}".format(fps), (2, frame.shape[0] - 4), cv2.FONT_HERSHEY_TRIPLEX, 0.4, color)

cv2.imshow("tracker", frame)

if cv2.waitKey(1) == ord('q'):
key = cv2.waitKey(1)
if key == ord('q'):
break
elif key == ord('g'):
# send tracker config to device
config = dai.ObjectTrackerConfig()

# take a random ID from the latest tracked IDs
if len(latestTrackedIds) > 0:
idToRemove = (np.random.choice(latestTrackedIds))
print(f"Force removing ID: {idToRemove}")
config.forceRemoveID(idToRemove)
trackerConfigQueue.send(config)
else:
print("No tracked IDs available to force remove")

5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,18 @@ def build_extension(self, ext):
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: C++",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
],
python_requires='>=3.7',
python_requires='>=3.9',
entry_points={
"console_scripts": [
f'depthai={DEPTHAI_CLI_MODULE_NAME}.depthai_cli:cli'
Expand Down
2 changes: 2 additions & 0 deletions src/DatatypeBindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ void bind_tracklets(pybind11::module& m, void* pCallstack);
void bind_pointcloudconfig(pybind11::module& m, void* pCallstack);
void bind_pointclouddata(pybind11::module& m, void* pCallstack);
void bind_imagealignconfig(pybind11::module& m, void* pCallstack);
void bind_objecttrackerconfig(pybind11::module& m, void* pCallstack);

void DatatypeBindings::addToCallstack(std::deque<StackFunction>& callstack) {
// Bind common datatypebindings
Expand Down Expand Up @@ -59,6 +60,7 @@ void DatatypeBindings::addToCallstack(std::deque<StackFunction>& callstack) {
callstack.push_front(bind_pointcloudconfig);
callstack.push_front(bind_pointclouddata);
callstack.push_front(bind_imagealignconfig);
callstack.push_front(bind_objecttrackerconfig);
}

void DatatypeBindings::bind(pybind11::module& m, void* pCallstack){
Expand Down
54 changes: 54 additions & 0 deletions src/pipeline/datatype/ObjectTrackerConfigBindings.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#include "DatatypeBindings.hpp"
#include "pipeline/CommonBindings.hpp"
#include <unordered_map>
#include <memory>

// depthai
#include "depthai/pipeline/datatype/ObjectTrackerConfig.hpp"

//pybind
#include <pybind11/chrono.h>
#include <pybind11/numpy.h>

// #include "spdlog/spdlog.h"

void bind_objecttrackerconfig(pybind11::module& m, void* pCallstack){

using namespace dai;

py::class_<RawObjectTrackerConfig, RawBuffer, std::shared_ptr<RawObjectTrackerConfig>> rawConfig(m, "RawObjectTrackerConfig", DOC(dai, RawObjectTrackerConfig));
py::class_<ObjectTrackerConfig, Buffer, std::shared_ptr<ObjectTrackerConfig>> config(m, "ObjectTrackerConfig", DOC(dai, ObjectTrackerConfig));

///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
// Call the rest of the type defines, then perform the actual bindings
Callstack* callstack = (Callstack*) pCallstack;
auto cb = callstack->top();
callstack->pop();
cb(m, pCallstack);
// Actual bindings
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////

// Metadata / raw
rawConfig
.def(py::init<>())
.def_readwrite("trackletIdsToRemove", &RawObjectTrackerConfig::trackletIdsToRemove, DOC(dai, RawObjectTrackerConfig, trackletIdsToRemove))
;

// Message
config
.def(py::init<>())
.def(py::init<std::shared_ptr<RawObjectTrackerConfig>>())

.def("set", &ObjectTrackerConfig::set, py::arg("config"), DOC(dai, ObjectTrackerConfig, set))
.def("get", &ObjectTrackerConfig::get, DOC(dai, ObjectTrackerConfig, get))
.def("forceRemoveID", &ObjectTrackerConfig::forceRemoveID, DOC(dai, ObjectTrackerConfig, forceRemoveID))
.def("forceRemoveIDs", &ObjectTrackerConfig::forceRemoveIDs, DOC(dai, ObjectTrackerConfig, forceRemoveIDs))
;

// add aliases

}
8 changes: 8 additions & 0 deletions src/pipeline/node/ObjectTrackerBindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,18 @@ void bind_objecttracker(pybind11::module& m, void* pCallstack){
.def_readwrite("detectionLabelsToTrack", &ObjectTrackerProperties::detectionLabelsToTrack, DOC(dai, ObjectTrackerProperties, detectionLabelsToTrack))
.def_readwrite("trackerType", &ObjectTrackerProperties::trackerType, DOC(dai, ObjectTrackerProperties, trackerType))
.def_readwrite("trackerIdAssignmentPolicy", &ObjectTrackerProperties::trackerIdAssignmentPolicy, DOC(dai, ObjectTrackerProperties, trackerIdAssignmentPolicy))
.def_readwrite("trackingPerClass", &ObjectTrackerProperties::trackingPerClass, DOC(dai, ObjectTrackerProperties, trackingPerClass))
.def_readwrite("occlusionRatioThreshold", &ObjectTrackerProperties::occlusionRatioThreshold, DOC(dai, ObjectTrackerProperties, occlusionRatioThreshold))
.def_readwrite("trackletMaxLifespan", &ObjectTrackerProperties::trackletMaxLifespan, DOC(dai, ObjectTrackerProperties, trackletMaxLifespan))
.def_readwrite("trackletBirthThreshold", &ObjectTrackerProperties::trackletBirthThreshold, DOC(dai, ObjectTrackerProperties, trackletBirthThreshold))
;

// Node
objectTracker
.def_readonly("inputTrackerFrame", &ObjectTracker::inputTrackerFrame, DOC(dai, node, ObjectTracker, inputTrackerFrame))
.def_readonly("inputDetectionFrame", &ObjectTracker::inputDetectionFrame, DOC(dai, node, ObjectTracker, inputDetectionFrame))
.def_readonly("inputDetections", &ObjectTracker::inputDetections, DOC(dai, node, ObjectTracker, inputDetections))
.def_readonly("inputConfig", &ObjectTracker::inputConfig, DOC(dai, node, ObjectTracker, inputConfig))
.def_readonly("out", &ObjectTracker::out, DOC(dai, node, ObjectTracker, out))
.def_readonly("passthroughTrackerFrame", &ObjectTracker::passthroughTrackerFrame, DOC(dai, node, ObjectTracker, passthroughTrackerFrame))
.def_readonly("passthroughDetectionFrame", &ObjectTracker::passthroughDetectionFrame, DOC(dai, node, ObjectTracker, passthroughDetectionFrame))
Expand All @@ -66,6 +71,9 @@ void bind_objecttracker(pybind11::module& m, void* pCallstack){
.def("setTrackerType", &ObjectTracker::setTrackerType, py::arg("type"), DOC(dai, node, ObjectTracker, setTrackerType))
.def("setTrackerIdAssignmentPolicy", &ObjectTracker::setTrackerIdAssignmentPolicy, py::arg("type"), DOC(dai, node, ObjectTracker, setTrackerIdAssignmentPolicy))
.def("setTrackingPerClass", &ObjectTracker::setTrackingPerClass, py::arg("trackingPerClass"), DOC(dai, node, ObjectTracker, setTrackingPerClass))
.def("setOcclusionRatioThreshold", &ObjectTracker::setOcclusionRatioThreshold, py::arg("occlusionRatioThreshold"), DOC(dai, node, ObjectTracker, setOcclusionRatioThreshold))
.def("setTrackletMaxLifespan", &ObjectTracker::setTrackletMaxLifespan, py::arg("lifespan"), DOC(dai, node, ObjectTracker, setTrackletMaxLifespan))
.def("setTrackletBirthThreshold", &ObjectTracker::setTrackletBirthThreshold, py::arg("threshold"), DOC(dai, node, ObjectTracker, setTrackletBirthThreshold))
;
daiNodeModule.attr("ObjectTracker").attr("Properties") = objectTrackerProperties;

Expand Down
Loading
Loading