-
Notifications
You must be signed in to change notification settings - Fork 0
Brian/deep object detection #26
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
Open
brianzheng206
wants to merge
35
commits into
main
Choose a base branch
from
brian/deep_object_detection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
039b4ae
Initial implementation of deep object detection
lucasreljic 761188b
switched to onnx inferencing
lucasreljic 0c8a8b5
Added onnxruntime gpu to cmake
lucasreljic a9c84dc
pre-commit fixes
lucasreljic 15948bb
Added ort_backend integration, Fixed detection parsing issues, fixed …
lucasreljic 3c61a40
Initial deep_ort_gpu plugin with internal library issues
lucasreljic 3bcf8cc
Functioning onnxruntime with CUDA as EP
lucasreljic 153a467
Initial deep_ort_gpu plugin with internal library issues
lucasreljic ca1af75
Functioning onnxruntime with CUDA as execution provider
lucasreljic e9ad787
Removed requirement for cuda toolkit
lucasreljic a79730e
batch size and other stuff?
brianzheng206 43d158e
hopefully fixed segfault
brianzheng206 9cf7b2f
working cuda inference
brianzheng206 6c61d4e
working tensorrt ep
brianzheng206 0dfe8db
new stuff
brianzheng206 e785893
cleaning up cmake
Edwardius 6d052f3
fixed cuda
brianzheng206 20e1f6e
merge onnx_gpu_backend
brianzheng206 43130e3
added libnvinfer, trt ep should work
brianzheng206 db12c23
caching
brianzheng206 8b1ee9f
merge main
brianzheng206 6606449
should be working
brianzheng206 d916c81
fixed batch size
brianzheng206 5dfd41b
optional engine caching
brianzheng206 8f08d2e
some cleanup
brianzheng206 fb31f7f
tensorrt version
brianzheng206 3cb5dfd
precommit and cleanup
brianzheng206 39936f9
added lifecycle node
brianzheng206 ac9a7dd
loading backend at runtime
brianzheng206 14050ed
working detection
brianzheng206 fc39987
dynamic tensor output and configurable activation
brianzheng206 489bd4f
addressing pr comments
brianzheng206 9dcda4a
node improvements
brianzheng206 ad9437b
some changes
brianzheng206 e52cf60
docstrings and remapping
brianzheng206 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| # Copyright (c) 2025-present WATonomous. All rights reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed 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. | ||
|
|
||
| cmake_minimum_required(VERSION 3.22) | ||
| project(deep_object_detection) | ||
|
|
||
| if(NOT CMAKE_CXX_STANDARD) | ||
| set(CMAKE_CXX_STANDARD 17) | ||
| endif() | ||
|
|
||
| if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
| add_compile_options(-Wall -Wextra -Wpedantic) | ||
| endif() | ||
|
|
||
| find_package(ament_cmake REQUIRED) | ||
| find_package(rclcpp REQUIRED) | ||
| find_package(rclcpp_components REQUIRED) | ||
| find_package(rclcpp_lifecycle REQUIRED) | ||
| find_package(sensor_msgs REQUIRED) | ||
| find_package(cv_bridge REQUIRED) | ||
| find_package(vision_msgs REQUIRED) | ||
| find_package(deep_core REQUIRED) | ||
| find_package(deep_msgs REQUIRED) | ||
| find_package(pluginlib REQUIRED) | ||
| find_package(rcl_interfaces REQUIRED) | ||
| find_package(OpenCV REQUIRED COMPONENTS core imgproc) | ||
|
|
||
| add_executable(deep_object_detection_node | ||
| src/main.cpp | ||
| ) | ||
|
|
||
| add_library(deep_object_detection_lib SHARED | ||
| src/backend_manager.cpp | ||
| src/generic_postprocessor.cpp | ||
| src/image_preprocessor.cpp | ||
| src/deep_object_detection_node.cpp | ||
| ) | ||
|
|
||
| target_include_directories(deep_object_detection_lib PUBLIC | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
| $<INSTALL_INTERFACE:include> | ||
| ) | ||
|
|
||
| target_link_libraries(deep_object_detection_lib | ||
| PUBLIC | ||
| ${rclcpp_TARGETS} | ||
| ${rclcpp_lifecycle_TARGETS} | ||
| ${deep_core_TARGETS} | ||
| ${pluginlib_TARGETS} | ||
| ${vision_msgs_TARGETS} | ||
| ${deep_msgs_TARGETS} | ||
| deep_core::deep_core_lib | ||
| PRIVATE | ||
| ${rclcpp_components_TARGETS} | ||
| ${sensor_msgs_TARGETS} | ||
| ${cv_bridge_TARGETS} | ||
| ${rcl_interfaces_TARGETS} | ||
| ${OpenCV_LIBRARIES} | ||
| ) | ||
|
|
||
| target_include_directories(deep_object_detection_lib SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS}) | ||
|
|
||
| rclcpp_components_register_nodes(deep_object_detection_lib "deep_object_detection::DeepObjectDetectionNode") | ||
|
|
||
| target_link_libraries(deep_object_detection_node | ||
| deep_object_detection_lib | ||
| ) | ||
|
|
||
| target_include_directories(deep_object_detection_node PUBLIC | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
| $<INSTALL_INTERFACE:include> | ||
| ) | ||
|
|
||
| install(TARGETS deep_object_detection_lib | ||
| ARCHIVE DESTINATION lib | ||
| LIBRARY DESTINATION lib | ||
| RUNTIME DESTINATION bin | ||
| ) | ||
|
|
||
| install(TARGETS deep_object_detection_node | ||
| RUNTIME DESTINATION lib/${PROJECT_NAME} | ||
| ) | ||
|
|
||
| install(DIRECTORY include/ | ||
| DESTINATION include | ||
| ) | ||
|
|
||
| install(DIRECTORY config launch | ||
| DESTINATION share/${PROJECT_NAME} | ||
| ) | ||
|
|
||
| if(BUILD_TESTING) | ||
| find_package(deep_test REQUIRED) | ||
| if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/test_postprocessors.cpp) | ||
| add_deep_test(test_postprocessors test/test_postprocessors.cpp | ||
| LIBRARIES | ||
| deep_object_detection_lib | ||
| ${OpenCV_LIBRARIES} | ||
| ${cv_bridge_TARGETS} | ||
| ${sensor_msgs_TARGETS} | ||
| ${rcl_interfaces_TARGETS} | ||
| ) | ||
| endif() | ||
|
|
||
| if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/test_preprocessor.cpp) | ||
| add_deep_test(test_preprocessor test/test_preprocessor.cpp | ||
| LIBRARIES | ||
| deep_object_detection_lib | ||
| ${OpenCV_LIBRARIES} | ||
| ${cv_bridge_TARGETS} | ||
| ${sensor_msgs_TARGETS} | ||
| ${rcl_interfaces_TARGETS} | ||
| ) | ||
| endif() | ||
| endif() | ||
|
|
||
| ament_package() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.