-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/refactoring #1
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
IasonTheodorou
wants to merge
35
commits into
master
Choose a base branch
from
feature/Refactoring
base: master
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 33 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
269a64c
Initial refactoring
IasonTheodorou 3f0aa16
create catkin package
IasonTheodorou 6ec4622
included CI tests
IasonTheodorou 2ae0d7b
update of CMakeLists to include some initial needed components
IasonTheodorou 02af27f
Return the mask on SegmentAnything function (not working properly)
IasonTheodorou 7de1753
Updated CMake and removed not needed parts of the code
IasonTheodorou fbe8e00
Updated code format
IasonTheodorou a5a3c18
Small refactoring of the module
IasonTheodorou 1957196
Refactor post processing for better accuracy and performance. Also co…
IasonTheodorou e6623fc
Added tests (still not working with catkin)
IasonTheodorou bdaf317
Fixed catkin workspace for both code and tests
IasonTheodorou bdab5a1
fixed functionallity for the tests to pass and added logging definition
IasonTheodorou 8b7f913
renamed private members of utils and sam_inference
IasonTheodorou e1130c6
Separrated test files per category (utils or sam related for now)
IasonTheodorou c34410e
Updated initializer and SegmentAnything modules to store the data to …
IasonTheodorou 69f3126
Enabled cuda on the decoder as well
IasonTheodorou 23d4790
Fixed small bug of adding an extra (full img) bounding box
IasonTheodorou ce94fa8
Aligned dimensions [high width] between onnx and opencv
IasonTheodorou ce19e96
corrected tests for the new segmentation way of inference (initialize…
IasonTheodorou 24de2e5
Removed typo / from model path
IasonTheodorou 53be89c
Bump min required cmake version to 3.14
MatthijsBurgh 6ddc3e6
EOF line added and package.xml structure update
IasonTheodorou ee403f2
Update read me and include better comments
IasonTheodorou 33cde1a
Deleted redundant code and fixed some brackets
IasonTheodorou 80bd818
made private member methods that were needed to be
IasonTheodorou ebe0539
Fixed structurre of CMakeLists and package.xml and logged with consol…
IasonTheodorou 0b63cef
updated CMakeLists, included .hpp suffix and sam_onnx_ros include dir…
IasonTheodorou b7a8338
updated CMakeLists rosconsole bridge
IasonTheodorou da16133
updated CMakeLists for onnxruntime ros package and also .vscode configs
IasonTheodorou 85b8df2
fix(cmake): opencv libraries
MatthijsBurgh a84c4f6
Add missing linking to opencv libs for test
MatthijsBurgh 9eced35
Correct linking of tests
MatthijsBurgh d9c1684
Checkpoint best working version
IasonTheodorou 515639d
Various CMake fixes
MatthijsBurgh 3591e21
Removed redundant .vscode lines
IasonTheodorou 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: CI | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| tue-ci: | ||
| name: TUe CI - ${{ github.event_name }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: TUe CI | ||
| uses: tue-robotics/tue-env/ci/main@master | ||
| with: | ||
| package: ${{ github.event.repository.name }} |
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,14 @@ | ||
| build/ | ||
| images/* | ||
| onnxruntime*/ | ||
| onnxruntime/* | ||
| docker/* | ||
| CMakefile | ||
| CMakeCache.txt | ||
| CMakeFiles/* | ||
| cmake_install.cmake | ||
| Makefile | ||
| SPEED-SAM-C-TENSORRT/ | ||
| sam_inference/model/FastSAM-x.onnx | ||
| mask* | ||
| segmentation_results* |
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,23 @@ | ||
| { | ||
| "configurations": [ | ||
| { | ||
| "name": "Linux", | ||
| "includePath": [ | ||
| "${workspaceFolder}/include/**", | ||
| "${workspaceFolder}/../hero_sam/onnxruntime-linux-x64-gpu-1.21.1/include", | ||
| "/usr/local/cuda/include", | ||
| "/usr/include/opencv4/**", | ||
| "/opt/ros/noetic/include/**" | ||
| ], | ||
| "defines": [ | ||
|
|
||
| ], | ||
| "compilerPath": "/usr/bin/gcc", | ||
| "cStandard": "c17", | ||
| "cppStandard": "c++17", | ||
| "intelliSenseMode": "linux-gcc-x64", | ||
| "configurationProvider": "ms-vscode.cmake-tools" | ||
| } | ||
| ], | ||
| "version": 4 | ||
| } |
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,94 @@ | ||
| { | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "name": "Debug SAM Model", | ||
| "type": "cppdbg", | ||
| "request": "launch", | ||
| "program": "/home/amigo/ros/noetic/system/devel/lib/sam_onnx_ros/test11_sam_onnx_ros", // Path to the executable | ||
| "args": [], // Add any command-line arguments for your program here | ||
| "stopAtEntry": false, | ||
| "cwd": "${workspaceFolder}/build", // Set the working directory | ||
| "environment": [], | ||
| "externalConsole": false, | ||
| "MIMode": "gdb", | ||
| "setupCommands": [ | ||
| { | ||
| "description": "Enable pretty-printing for gdb", | ||
| "text": "-enable-pretty-printing", | ||
| "ignoreFailures": true | ||
| } | ||
| ], | ||
| //"preLaunchTask": "build-sam-project" // Ensure the project is built before debugging | ||
| }, | ||
| { | ||
| "name": "Debug GTest (pick binary)", | ||
| "type": "cppdbg", | ||
| "request": "launch", | ||
| "program": "${input:testBinary}", // pick utils_tests or sam_tests | ||
| "args": [ | ||
| //"--gtest_filter=${input:gtestFilter}" // uncomment to filter tests | ||
| ], | ||
| "cwd": "${workspaceFolder}", // cwd doesn’t matter if SAM_MODELS_DIR is set | ||
| "environment": [ | ||
| { | ||
| "name": "SAM_MODELS_DIR", | ||
| "value": "${env:SAM_MODELS_DIR}" | ||
| } // or hardcode a path here | ||
| ], | ||
| "stopAtEntry": false, | ||
| "externalConsole": false, | ||
| "MIMode": "gdb", | ||
| "setupCommands": [ | ||
| { | ||
| "description": "Enable pretty-printing for gdb", | ||
| "text": "-enable-pretty-printing", | ||
| "ignoreFailures": true | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "Run all tests (ctest)", | ||
| "type": "cppdbg", | ||
| "request": "launch", | ||
| "program": "/usr/bin/ctest", | ||
| "args": [ | ||
| "--test-dir", | ||
| "/home/amigo/ros/noetic/system/build/sam_onnx_ros", | ||
| "-R", | ||
| "(sam_tests|utils_tests)", | ||
| "--output-on-failure", | ||
| "-j", | ||
| "4" | ||
| ], | ||
| "cwd": "/home/amigo/ros/noetic/system/build/sam_onnx_ros", | ||
| "environment": [ | ||
| { | ||
| "name": "SAM_MODELS_DIR", | ||
| "value": "${env:SAM_MODELS_DIR}" | ||
| } | ||
| ], | ||
| "stopAtEntry": false, | ||
| "externalConsole": false, | ||
| "MIMode": "gdb" | ||
| // Note: ctest launching isn't great for step-debugging individual tests. | ||
| } | ||
| ], | ||
| "inputs": [ | ||
| { | ||
| "id": "testBinary", | ||
| "type": "pickString", | ||
| "description": "Select gtest executable", | ||
| "options": [ | ||
| "/home/amigo/ros/noetic/system/devel/.private/sam_onnx_ros/lib/sam_onnx_ros/utils_tests", | ||
| "/home/amigo/ros/noetic/system/devel/.private/sam_onnx_ros/lib/sam_onnx_ros/sam_tests" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "gtestFilter", | ||
| "type": "promptString", | ||
| "description": "gtest filter (e.g. Utils* or SamInferenceTest.PreProcess*)", | ||
| "default": "*" | ||
| } | ||
| ], | ||
| } | ||
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,77 @@ | ||
| { | ||
| "files.associations": { | ||
| "iostream": "cpp", | ||
| "cctype": "cpp", | ||
| "clocale": "cpp", | ||
| "cmath": "cpp", | ||
| "cstdarg": "cpp", | ||
| "cstddef": "cpp", | ||
| "cstdio": "cpp", | ||
| "cstdlib": "cpp", | ||
| "cstring": "cpp", | ||
| "ctime": "cpp", | ||
| "cwchar": "cpp", | ||
| "cwctype": "cpp", | ||
| "array": "cpp", | ||
| "atomic": "cpp", | ||
| "strstream": "cpp", | ||
| "bit": "cpp", | ||
| "*.tcc": "cpp", | ||
| "bitset": "cpp", | ||
| "chrono": "cpp", | ||
| "codecvt": "cpp", | ||
| "complex": "cpp", | ||
| "condition_variable": "cpp", | ||
| "cstdint": "cpp", | ||
| "deque": "cpp", | ||
| "list": "cpp", | ||
| "map": "cpp", | ||
| "set": "cpp", | ||
| "unordered_map": "cpp", | ||
| "unordered_set": "cpp", | ||
| "vector": "cpp", | ||
| "exception": "cpp", | ||
| "algorithm": "cpp", | ||
| "functional": "cpp", | ||
| "iterator": "cpp", | ||
| "memory": "cpp", | ||
| "memory_resource": "cpp", | ||
| "numeric": "cpp", | ||
| "optional": "cpp", | ||
| "random": "cpp", | ||
| "ratio": "cpp", | ||
| "regex": "cpp", | ||
| "string": "cpp", | ||
| "string_view": "cpp", | ||
| "system_error": "cpp", | ||
| "tuple": "cpp", | ||
| "type_traits": "cpp", | ||
| "utility": "cpp", | ||
| "fstream": "cpp", | ||
| "initializer_list": "cpp", | ||
| "iomanip": "cpp", | ||
| "iosfwd": "cpp", | ||
| "istream": "cpp", | ||
| "limits": "cpp", | ||
| "mutex": "cpp", | ||
| "new": "cpp", | ||
| "ostream": "cpp", | ||
| "shared_mutex": "cpp", | ||
| "sstream": "cpp", | ||
| "stdexcept": "cpp", | ||
| "streambuf": "cpp", | ||
| "thread": "cpp", | ||
| "cfenv": "cpp", | ||
| "cinttypes": "cpp", | ||
| "typeindex": "cpp", | ||
| "typeinfo": "cpp", | ||
| "variant": "cpp", | ||
| "compare": "cpp", | ||
| "concepts": "cpp", | ||
| "numbers": "cpp", | ||
| "semaphore": "cpp", | ||
| "stop_token": "cpp", | ||
| "*.txx": "cpp", | ||
| "filesystem": "cpp" | ||
| } | ||
| } |
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,97 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "build-sam-project", | ||
| "dependsOrder": "sequence", | ||
| "dependsOn": ["configure-sam", "build-sam-binary"], | ||
| "problemMatcher": ["$gcc"], | ||
| "group": "build" | ||
| }, | ||
| { | ||
| "label": "build-pipeline-project", | ||
| "dependsOrder": "sequence", | ||
| "dependsOn": ["configure-pipeline", "build-pipeline-binary"], | ||
| "problemMatcher": ["$gcc"], | ||
| "group": "build" | ||
| }, | ||
| { | ||
| "label": "build-yolo-project", | ||
| "dependsOrder": "sequence", | ||
| "dependsOn": ["configure-yolo", "build-yolo-binary"], | ||
| "problemMatcher": ["$gcc"], | ||
| "group": "build" | ||
| }, | ||
| { | ||
| "label": "configure-sam", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "-DCMAKE_BUILD_TYPE=Debug", | ||
| "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", | ||
| "-S", "${workspaceFolder}/", | ||
| "-B", "${workspaceFolder}/build" | ||
| ], | ||
| "problemMatcher": ["$gcc"] | ||
| }, | ||
| { | ||
| "label": "configure-pipeline", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "-DCMAKE_BUILD_TYPE=Debug", | ||
| "-S", "${workspaceFolder}/pipeline", | ||
| "-B", "${workspaceFolder}/pipeline/build" | ||
| ], | ||
| "problemMatcher": ["$gcc"] | ||
| }, | ||
| { | ||
| "label": "configure-yolo", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "-DCMAKE_BUILD_TYPE=Debug", | ||
| "-S", "${workspaceFolder}/yolo_inference", | ||
| "-B", "${workspaceFolder}/yolo_inference/build", | ||
| "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", | ||
|
|
||
| ], | ||
| "problemMatcher": ["$gcc"] | ||
| }, | ||
| { | ||
| "label": "build-sam-binary", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "--build", | ||
| "${workspaceFolder}/build", | ||
| "--config", "Debug" | ||
| ], | ||
| "problemMatcher": ["$gcc"] | ||
| }, | ||
| { | ||
| "label": "build-pipeline-binary", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "--build", | ||
| "${workspaceFolder}/pipeline/build", | ||
| "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", | ||
| "--config", "Debug" | ||
| ], | ||
| "problemMatcher": ["$gcc"] | ||
| }, | ||
| { | ||
| "label": "build-yolo-binary", | ||
| "type": "shell", | ||
| "command": "cmake", | ||
| "args": [ | ||
| "--build", | ||
| "${workspaceFolder}/yolo_inference/build", | ||
| "--config", "Debug" | ||
| ], | ||
| "problemMatcher": ["$gcc"] | ||
| } | ||
|
|
||
| ] | ||
| } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not desired, as the location might not be the same for everyone.