-
-
Notifications
You must be signed in to change notification settings - Fork 56.3k
dnn(tflite): add 3rdparty flatbuffers with pre-generated schema #23274
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
Conversation
BTW, is there limitation why OpenCV does not support submodules instead? |
We don't use submodules in the main OpenCV repositories. |
modules/dnn/CMakeLists.txt
Outdated
endif() | ||
|
||
if(HAVE_FLATBUFFERS) | ||
ocv_option(OPENCV_TEST_DNN_TFLITE "Build test with TFLite" (TARGET ocv.3rdparty.flatbuffers)) |
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.
Do we really need this option?
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.
Thanks! Updated handing of this option in tests. It should be more clear now (flatbuffers -> tflite)
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.
Overall looks good to me.
set(flatbuffers_VERSION "23.1.21") | ||
ocv_install_3rdparty_licenses(flatbuffers "${OpenCV_SOURCE_DIR}/3rdparty/flatbuffers/LICENSE.txt") | ||
ocv_add_external_target(flatbuffers "${OpenCV_SOURCE_DIR}/3rdparty/flatbuffers/include" "" "HAVE_FLATBUFFERS=1") | ||
set(CUSTOM_STATUS_flatbuffers " Flatbuffers:" "builtin/3rdparty (${flatbuffers_VERSION})") |
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.
Why not like other libraries?
set(CUSTOM_STATUS_flatbuffers " Flatbuffers:" "builtin/3rdparty (${flatbuffers_VERSION})") | |
set(CUSTOM_STATUS_flatbuffers " Flatbuffers:" "build (${flatbuffers_VERSION})") |
Or will we change others to the new style eventually (e.g. protobuf)?
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.
flatbuffers
is integrated as headers only (there is no compilation of the library). IMHO, build
may confuse here.
relates #23161
https://github.com/google/flatbuffers/releases/tag/v23.1.21 (Apache 2.0)
TODO: