Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
d1ce076
add devcontainers
jlmcmchl Aug 22, 2025
97fb4e5
configure, build and run tasks
jlmcmchl Aug 22, 2025
b7838a6
ensure .gitignore exists
jlmcmchl Aug 22, 2025
3aec8fd
terminal newlines
jlmcmchl Aug 22, 2025
bf496f1
add object detection capabilities with ObjectDetector and ObjectEstim…
Aradig26 Oct 5, 2025
1e6b69a
fix ObjectDetector::detect method removing const
Aradig26 Oct 6, 2025
702625c
move object_detection_loop() outside networktables_loop() 🤦
Aradig26 Oct 6, 2025
c389a00
allow model switching and upload model and names
Aradig26 Oct 7, 2025
95d5dda
remove comment (so it builds)
Aradig26 Oct 7, 2025
6d5c50e
Merge branch 'main' into feature-object_detection
Aradig26 Oct 7, 2025
0d42244
undo last change
Aradig26 Oct 7, 2025
2321610
fix paths
Aradig26 Oct 8, 2025
f0aeed9
debug prints
Aradig26 Oct 8, 2025
2668272
add YOLOv11 model
Aradig26 Oct 8, 2025
91f1072
Revert "debug prints"
Aradig26 Oct 8, 2025
7606332
add bounding box on detected objects in mjpeg server
Aradig26 Oct 8, 2025
0858c10
Revert "add bounding box on detected objects in mjpeg server"
Aradig26 Oct 8, 2025
5dae875
test annotated mjpg server
Aradig26 Oct 8, 2025
4b06c09
fixed error
Aradig26 Oct 8, 2025
4080fca
move apriltag detection to a different thread
Aradig26 Oct 9, 2025
61880dd
Add game piece data loading and distance estimation to ObjectEstimator
Aradig26 Oct 9, 2025
e9bdaa6
add pose estimation csv (draft, probably doesnt work)
Aradig26 Oct 9, 2025
c2828e7
Enhance object detection with motion-triggered processing and OpenVIN…
Aradig26 Oct 9, 2025
b7caaf6
fix openvino import
Aradig26 Oct 9, 2025
08e1e41
store "model" files in local directory (not root/global directory)
Aradig26 Oct 9, 2025
82afb16
more optimization (didn't realize we had an iGPU) using OpenCL and GP…
Aradig26 Oct 9, 2025
1aa814d
assume FP16
Aradig26 Oct 9, 2025
5ef1b07
test without distance estimation
Aradig26 Oct 9, 2025
4892959
fix
Aradig26 Oct 9, 2025
3fd81b5
fix
Aradig26 Oct 9, 2025
0fb40a0
fix
Aradig26 Oct 9, 2025
7623a0d
edit frame dropping
Aradig26 Oct 10, 2025
dbe6fa8
Add AnnotationData structure and update ObjectDetector for enhanced o…
Aradig26 Oct 10, 2025
4f1e824
use full openvino
Aradig26 Oct 10, 2025
cc226df
use openvino when available (x86)
Aradig26 Oct 10, 2025
ab576ed
declare variables outside conditional
Aradig26 Oct 10, 2025
8862407
update build.yml to save logs on fail
Aradig26 Oct 10, 2025
749d7c7
move dnn import out of conditional
Aradig26 Oct 10, 2025
dc38849
move m_net into conditional
Aradig26 Oct 10, 2025
068a649
move dnn import out of conditional
Aradig26 Oct 10, 2025
25c02fd
this will take a long time :(
Aradig26 Oct 10, 2025
d56d4ce
install openvino
Aradig26 Oct 10, 2025
e95ba47
undo last change
Aradig26 Oct 10, 2025
44dd8bc
fix openvino import
Aradig26 Oct 10, 2025
bfcf200
fix openvino import (in dockerfile)
Aradig26 Oct 10, 2025
b1b76f4
update cmakelists
Aradig26 Oct 10, 2025
7a80aba
oops
Aradig26 Oct 10, 2025
fb2b2f1
define USE_OPENVINO
Aradig26 Oct 11, 2025
2985fb3
correct openVINO install dir
Aradig26 Oct 11, 2025
953dd37
offload annotation to different thread and remove incompatible model
Aradig26 Oct 11, 2025
e0ef72e
declare infer_request only once
Aradig26 Oct 11, 2025
4e24218
declare input_port and input_shape only once
Aradig26 Oct 11, 2025
53e10c6
fix previous oversight
Aradig26 Oct 12, 2025
41966d2
set performance mode to latency and adjust input shape types
Aradig26 Oct 12, 2025
8194454
fix compile error
Aradig26 Oct 12, 2025
d9dc01c
update Dockerfile to add user to render and video groups; enhance Obj…
Aradig26 Oct 12, 2025
2f4101d
refactor ObjectDetector to optimize model compilation for latency and…
Aradig26 Oct 12, 2025
14080c8
add timing profiling in object detection detect
Aradig26 Oct 12, 2025
cd1b4ff
fix imports and wrong command
Aradig26 Oct 12, 2025
aaa4982
fix imports and wrong command
Aradig26 Oct 12, 2025
40d3a14
small performance improvments
Aradig26 Oct 13, 2025
501b1a2
Preprocess within the model
Aradig26 Oct 13, 2025
48dd2b6
object pose estimation
Aradig26 Oct 13, 2025
5881936
specify image size
Aradig26 Oct 13, 2025
0280a21
fix ppp
Aradig26 Oct 13, 2025
277d6bf
fix ppp
Aradig26 Oct 13, 2025
4af3e36
fix ppp (3rd try)
Aradig26 Oct 13, 2025
bb930a4
fix ppp (4th try)
Aradig26 Oct 13, 2025
e59e993
fix ppp (5th try)
Aradig26 Oct 13, 2025
5bcbcdb
fix ppp (6th try)
Aradig26 Oct 14, 2025
e32ab24
fix PPP
Aradig26 Nov 2, 2025
4d745b2
remove broken ObjectEstimator
Aradig26 Nov 16, 2025
42693c9
Merge branch 'main' into feature-object_detection
Aradig26 Dec 15, 2025
ecf983a
added object estimation & clean up includes
Aradig26 Dec 17, 2025
d506919
add lookup table
Aradig26 Dec 17, 2025
1d45d6d
import stuff
Aradig26 Dec 17, 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
29 changes: 29 additions & 0 deletions .devcontainer/arm/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "ARM Dev Environment",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../../Dockerfile.ARM"
},

// Add arguments directly to the docker cli command
"runArgs": []

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
}
29 changes: 29 additions & 0 deletions .devcontainer/x86/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "X86 Dev Environment",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../../Dockerfile.X86"
},

// Add arguments directly to the docker cli command
"runArgs": []

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
}
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ jobs:
-w /work \
${{ steps.meta.outputs.tags }} \
/bin/bash -c "mkdir -p build && cd build && cmake .. && make"

- name: Upload CPack Log on Failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: cpack-log-amd64
path: ${{ github.workspace }}/build/_CPack_Packages/Linux/DEB/PreinstallOutput.log
retention-days: 7

- name: List files for debugging
run: ls -laR ./build
Expand Down Expand Up @@ -139,6 +147,14 @@ jobs:
${{ steps.meta.outputs.tags }} \
/bin/bash -c "mkdir -p build && cd build && cmake .. && make"

- name: Upload CPack Log on Failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: cpack-log-arm64
path: ${{ github.workspace }}/build/_CPack_Packages/Linux/DEB/PreinstallOutput.log
retention-days: 7

- name: List files for debugging
run: ls -laR ./build

Expand Down
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"files.associations": {
"__node_handle": "cpp",
"optional": "cpp",
"regex": "cpp"
}
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "configure build",
"type": "shell",
"options": {"cwd": "${cwd}/build"},
"command": "cmake",
"args": [
"..",
],
"group": "build",
"presentation": {
"reveal": "always"
},
},
{
"label": "build",
"type": "shell",
"options": {"cwd": "${cwd}/build"},
"command": "make",
"args": [],
"group": "build",
"presentation": {
"reveal": "always"
},
},
{
"label": "run",
"type": "shell",
"options": {"cwd": "${cwd}/build/src"},
"command": "./GompeiVision",
"args": [],
"group": "build",
"presentation": {
"reveal": "always"
},
},
]
}
34 changes: 34 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,39 @@
cmake_minimum_required(VERSION 3.21)
project(GompeiVision VERSION 1.0.3 LANGUAGES CXX)

# --- Set Architecture-Specific Compiler Optimizations ---
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
# Apply optimizations for Intel x86_64 CPUs (like Alder Lake)
message(STATUS "x86_64 architecture detected. Applying Raptor Lake optimizations (for intel 13th gen).")
add_compile_options(-O3 -march=core-avx2)

elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
# Apply optimizations for 64-bit ARM CPUs (like Orange Pi)
message(STATUS "aarch64 architecture detected. Applying ARMv8-a optimizations.")
add_compile_options(-O3 -march=armv8-a)
endif()

# Explicitly generate compile_commands.json for IDEs
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Check if the target architecture is x86_64
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
# Only on x86, we find OpenVINO and add a definition
message(STATUS "x86_64 architecture detected, enabling OpenVINO.")
find_package(OpenVINO REQUIRED)
set(USE_OPENVINO ON)
add_compile_definitions(USE_OPENVINO=1)
else()
# On other architectures (like ARM), we do nothing
message(STATUS "Non-x86 architecture detected, OpenVINO will be disabled.")
set(USE_OPENVINO OFF)
add_compile_definitions(USE_OPENVINO=0)
endif()

# Include the dependency fetching script. This will trigger the downloads
# and set up the library targets (e.g., wpiutil, ntcore).
add_subdirectory(third_party)
Expand Down Expand Up @@ -35,5 +61,13 @@ install(FILES ${SYSTEM_LIBS}
DESTINATION lib
)

# Install the models directory to the standard share location.
install(
DIRECTORY models/
DESTINATION /usr/local/share/GompeiVision
FILE_PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)

# Set up packaging with CPack
include(packaging/CPackConfig.cmake)
19 changes: 19 additions & 0 deletions Dockerfile.X86
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,27 @@ RUN apt-get update && apt-get install -y \
libswscale-dev \
libzstd-dev \
file \
gnupg \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*

# =============================
# Install Intel OpenVINO Runtime (for OpenCV DNN backend)
# =============================

RUN wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
RUN gpg --output /etc/apt/trusted.gpg.d/intel.gpg --dearmor GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB

RUN echo "deb https://apt.repos.intel.com/openvino ubuntu24 main" | tee /etc/apt/sources.list.d/intel-openvino.list

RUN apt update
RUN apt-cache search openvino
RUN apt install -y openvino intel-opencl-icd

# Set up OpenVINO environment (optional for runtime path)
ENV OpenVINO_DIR=/usr/lib/cmake/openvino2025.3.0


# Install any pip packages needed
RUN pip install --no-cache-dir --break-system-packages requests protobuf grpcio-tools

Expand Down
2 changes: 2 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
Loading