8000 supporting protobuf v22 and later(with abseil-cpp/C++17) · Issue #24369 · opencv/opencv · GitHub
[go: up one dir, main page]

Skip to content

supporting protobuf v22 and later(with abseil-cpp/C++17) #24369

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

Closed
Kumataro opened this issue Oct 7, 2023 · 3 comments · Fixed by #24372
Closed

supporting protobuf v22 and later(with abseil-cpp/C++17) #24369

Kumataro opened this issue Oct 7, 2023 · 3 comments · Fixed by #24372
Labels

Comments

@Kumataro
Copy link
Contributor
Kumataro commented Oct 7, 2023

Describe the feature and motivation

Hello, The original issue is #23466 (comment).

Related #23791 (I'm sorry if this is duplicated.)

What is problem

When using external(not built-in) protobuf v22 and later, building dnn module is failed.

Reason

Because protobuf v22 has a few breaking changes. ( https://protobuf.dev/support/migration/#cpp-22 )

  • it drops supporting C++11.
  • it depends abseil-cpp
    • And std::string_view in abseil-cpp seems to request C++17 and later.

How to fix it ?

I believe.

Additional context

No response

@Kumataro
Copy link
Contributor Author
Kumataro commented Oct 7, 2023

I tried to make patch. However it cannot pass existing tests.

4.x...Kumataro:opencv:fix24369

executing CMake, building and linking are OK.

cmake -S opencv -B build4-main_cxx17 \
    -DCMAKE_CXX_STANDARD=17 \
    -GNinja \
    -DBUILD_PROTOBUF=OFF \
    -DPROTOBUF_UPDATE_FILES=ON
opencv_version -v
kmtr@kmtr-VMware-Virtual-Platform:~/work/build4-main_cxx17$ ./bin/opencv_version -v

General configuration for OpenCV 4.8.0-dev =====================================
  Version control:               4.8.0-298-g5fb3869775-dirty

  Platform:
    Timestamp:                   2023-10-06T23:12:34Z
    Host:                        Linux 6.2.0-34-generic x86_64
    CMake:                       3.25.1
    CMake generator:             Ninja
    CMake build tool:            /usr/bin/ninja
    Configuration:               Release

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
      SSE4_1 (18 files):         + SSSE3 SSE4_1
      SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
      FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (9 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
      AVX2 (38 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
      AVX512_SKX (8 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX

  C/C++:
    Built as dynamic libs?:      YES
    C++ standard:                17
    C++ Compiler:                /usr/bin/c++  (ver 12.3.0)
    C++ flags (Release):         -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
    C++ flags (Debug):           -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  /usr/bin/cc
    C flags (Release):           -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
    C flags (Debug):             -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):      -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined
    Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined
    ccache:                      YES
    Precompiled headers:         NO
    Extra dependencies:          dl m pthread rt
    3rdparty dependencies:

  OpenCV modules:
    To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc java ml objdetect photo python3 stitching ts video videoio
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 python2
    Applications:                tests perf_tests apps
    Documentation:               NO
    Non-free algorithms:         NO

  GUI:                           GTK3
    GTK+:                        YES (ver 3.24.37)
      GThread :                  YES (ver 2.76.1)
      GtkGlExt:                  NO
    VTK support:                 YES (ver 9.1.0)

  Media I/O:
    ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.13)
    JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)
    WEBP:                        /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x020f)
    PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.39)
    TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.5.0)
    JPEG 2000:                   OpenJPEG (ver 2.5.0)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES
      avcodec:                   YES (59.37.100)
      avformat:                  YES (59.27.100)
      avutil:                    YES (57.28.100)
      swscale:                   YES (6.7.100)
      avresample:                NO
    GStreamer:                   YES (1.22.2)
    v4l/v4l2:                    YES (linux/videodev2.h)

  Parallel framework:            pthreads

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Intel IPP:                   2021.8 [2021.8.0]
           at:                   /home/kmtr/work/build4-main_cxx17/3rdparty/ippicv/ippicv_lnx/icv
    Intel IPP IW:                sources (2021.8.0)
              at:                /home/kmtr/work/build4-main_cxx17/3rdparty/ippicv/ippicv_lnx/iw
    VA:                          NO
    Lapack:                      NO
    Eigen:                       YES (ver 3.4.0)
    Custom HAL:                  NO
    Protobuf:                    /usr/local/lib/libprotobuf.so (4.24.4)
      abseil-cpp:                YES (20230125)
    Flatbuffers:                 builtin/3rdparty (23.5.9)

  OpenCL:                        YES (no extra features)
    Include path:                /home/kmtr/work/opencv/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python 3:
    Interpreter:                 /usr/bin/python3 (ver 3.11.4)
    Libraries:                   /usr/lib/x86_64-linux-gnu/libpython3.11.so (ver 3.11.4)
    numpy:                       /usr/lib/python3/dist-packages/numpy/core/include (ver 1.24.2)
    install path:                lib/python3.11/dist-packages/cv2/python-3.11

  Python (for build):            /usr/bin/python3

  Java:
    ant:                         NO
    Java:                        YES (ver 17.0.8)
    JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include
    Java wrappers:               YES (JAVA)
    Java tests:                  NO

  Install to:                    /usr/local
-----------------------------------------------------------------

However testing with external prorobuf v22 and C++17 is failed for caffe layers.

Test_Caffe_layers(external protobuf v22 with C++17
kmtr@kmtr-VMware-Virtual-Platform:~/work/build4-main_cxx17$ ./bin/opencv_test_dnn --gtest_filter="Test_Caffe_layers.*"
CTEST_FULL_OUTPUT
OpenCV version: 4.8.0-dev
OpenCV VCS version: 4.8.0-298-g5fb3869775-dirty
Build type: Release
Compiler: /usr/bin/c++  (ver 12.3.0)
Parallel framework: pthreads (nthreads=8)
CPU features: SSE SSE2 SSE3 *SSE4.1 *SSE4.2 *FP16 *AVX *AVX2 *AVX512-SKX?
Intel(R) IPP version: ippIP AVX2 (l9) 2021.8 (-) Feb 20 2023
Intel(R) IPP features code: 0x8000
OpenCL is disabled
TEST: Skip tests with tags: 'mem_6gb', 'verylong', 'dnn_skip_opencv_backend', 'dnn_skip_cpu', 'dnn_skip_cpu_fp16', 'dnn_skip_ocl', 'dnn_skip_ocl_fp16', 'dnn_skip_onnx_conformance', 'dnn_skip_parser'
Note: Google Test filter = Test_Caffe_layers.*
[==========] Running 31 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 31 tests from Test_Caffe_layers
[ RUN      ] Test_Caffe_layers.Softmax/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Softmax/0 (19 ms)
[ RUN      ] Test_Caffe_layers.LRN/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.LRN/0 (9 ms)
[ RUN      ] Test_Caffe_layers.Convolution/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Convolution/0 (2 ms)
[ RUN      ] Test_Caffe_layers.DeConvolution/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.DeConvolution/0 (6 ms)
[ RUN      ] Test_Caffe_layers.InnerProduct/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.InnerProduct/0 (4 ms)
[ RUN      ] Test_Caffe_layers.Pooling_max/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Pooling_max/0 (3 ms)
[ RUN      ] Test_Caffe_layers.Pooling_ave/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Pooling_ave/0 (2 ms)
[ RUN      ] Test_Caffe_layers.MVN/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.MVN/0 (1 ms)
[ RUN      ] Test_Caffe_layers.BatchNorm/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.BatchNorm/0 (1 ms)
[ RUN      ] Test_Caffe_layers.ReLU/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.ReLU/0 (2 ms)
[ RUN      ] Test_Caffe_layers.Dropout/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Dropout/0 (2 ms)
[ RUN      ] Test_Caffe_layers.Concat/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Concat/0 (6 ms)
[ RUN      ] Test_Caffe_layers.Fused_Concat/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Fused_Concat/0 (0 ms)
[ RUN      ] Test_Caffe_layers.Eltwise/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Eltwise/0 (4 ms)
[ RUN      ] Test_Caffe_layers.PReLU/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.PReLU/0 (3 ms)
[ RUN      ] Test_Caffe_layers.layer_prelu_fc/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.layer_prelu_fc/0 (1 ms)
[ RUN      ] Test_Caffe_layers.Reshape_Split_Slice/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Reshape_Split_Slice/0 (4 ms)
[ RUN      ] Test_Caffe_layers.Conv_Elu/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Conv_Elu/0 (5 ms)
[ RUN      ] Test_Caffe_layers.Accum/0, where GetParam() = OCV/CPU
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1696641648.273567   46844 text_format.cc:433] Error parsing text-format opencv_caffe.NetParameter: 22:15: Message type "opencv_caffe.LayerParameter" has no field named "accum_param".
unknown file: Failure
C++ exception with description "OpenCV(4.8.0-dev) /home/kmtr/work/opencv/modules/dnn/src/caffe/caffe_io.cpp:1162: error: (-2:Unspecified error) FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse NetParameter file: /home/kmtr/work/opencv_extra/testdata/dnn/layers/accum.prototxt in function 'ReadNetParamsFromTextFileOrDie'
" thrown in the test body.
[  FAILED  ] Test_Caffe_layers.Accum/0, where GetParam() = OCV/CPU (1 ms)
[ RUN      ] Test_Caffe_layers.FlowWarp/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.FlowWarp/0 (1 ms)
[ RUN      ] Test_Caffe_layers.ChannelNorm/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.ChannelNorm/0 (1 ms)
[ RUN      ] Test_Caffe_layers.DataAugmentation/0, where GetParam() = OCV/CPU
E0000 00:00:1696641648.277554   46844 text_format.cc:433] Error parsing text-format opencv_caffe.NetParameter: 14:22: Message type "opencv_caffe.LayerParameter" has no field named "augmentation_param".
unknown file: Failure
C++ exception with description "OpenCV(4.8.0-dev) /home/kmtr/work/opencv/modules/dnn/src/caffe/caffe_io.cpp:1162: error: (-2:Unspecified error) FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse NetParameter file: /home/kmtr/work/opencv_extra/testdata/dnn/layers/data_augmentation.prototxt in function 'ReadNetParamsFromTextFileOrDie'
" thrown in the test body.
[  FAILED  ] Test_Caffe_layers.DataAugmentation/0, where GetParam() = OCV/CPU (0 ms)
[ RUN      ] Test_Caffe_layers.Resample/0, where GetParam() = OCV/CPU
E0000 00:00:1696641648.278045   46844 text_format.cc:433] Error parsing text-format opencv_caffe.NetParameter: 22:18: Message type "opencv_caffe.LayerParameter" has no field named "resample_param".
unknown file: Failure
C++ exception with description "OpenCV(4.8.0-dev) /home/kmtr/work/opencv/modules/dnn/src/caffe/caffe_io.cpp:1162: error: (-2:Unspecified error) FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse NetParameter file: /home/kmtr/work/opencv_extra/testdata/dnn/layers/nearest_2inps.prototxt in function 'ReadNetParamsFromTextFileOrDie'
" thrown in the test body.
[  FAILED  ] Test_Caffe_layers.Resample/0, where GetParam() = OCV/CPU (1 ms)
[ RUN      ] Test_Caffe_layers.Correlation/0, where GetParam() = OCV/CPU
E0000 00:00:1696641648.278364   46844 text_format.cc:433] Error parsing text-format opencv_caffe.NetParameter: 22:21: Message type "opencv_caffe.LayerParameter" has no field named "correlation_param".
unknown file: Failure
C++ exception with description "OpenCV(4.8.0-dev) /home/kmtr/work/opencv/modules/dnn/src/caffe/caffe_io.cpp:1162: error: (-2:Unspecified error) FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse NetParameter file: /home/kmtr/work/opencv_extra/testdata/dnn/layers/correlation.prototxt in function 'ReadNetParamsFromTextFileOrDie'
" thrown in the test body.
[  FAILED  ] Test_Caffe_layers.Correlation/0, where GetParam() = OCV/CPU (0 ms)
[ RUN      ] Test_Caffe_layers.Convolution2Inputs/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Convolution2Inputs/0 (1 ms)
[ RUN      ] Test_Caffe_layers.ROIPooling_Accuracy/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.ROIPooling_Accuracy/0 (2 ms)
[ RUN      ] Test_Caffe_layers.FasterRCNN_Proposal/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.FasterRCNN_Proposal/0 (8 ms)
[ RUN      ] Test_Caffe_layers.Average_pooling_kernel_area/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Average_pooling_kernel_area/0 (1 ms)
[ RUN      ] Test_Caffe_layers.PriorBox_repeated/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.PriorBox_repeated/0 (0 ms)
[ RUN      ] Test_Caffe_layers.PriorBox_squares/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.PriorBox_squares/0 (0 ms)
[ RUN      ] Test_Caffe_layers.Interp/0, where GetParam() = OCV/CPU
E0000 00:00:1696641648.291055   46844 text_format.cc:433] Error parsing text-format opencv_caffe.NetParameter: 14:16: Message type "opencv_caffe.LayerParameter" has no field named "interp_param".
unknown file: Failure
C++ exception with description "OpenCV(4.8.0-dev) /home/kmtr/work/opencv/modules/dnn/src/caffe/caffe_io.cpp:1162: error: (-2:Unspecified error) FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse NetParameter file: /home/kmtr/work/opencv_extra/testdata/dnn/layers/layer_interp.prototxt in function 'ReadNetParamsFromTextFileOrDie'
" thrown in the test body.
[  FAILED  ] Test_Caffe_layers.Interp/0, where GetParam() = OCV/CPU (1 ms)
[----------] 31 tests from Test_Caffe_layers (93 ms total)

[----------] Global test environment tear-down
[==========] 31 tests from 1 test case ran. (93 ms total)
[  PASSED  ] 26 tests.
[  FAILED  ] 5 tests, listed below:
[  FAILED  ] Test_Caffe_layers.Accum/0, where GetParam() = OCV/CPU
[  FAILED  ] Test_Caffe_layers.DataAugmentation/0, where GetParam() = OCV/CPU
[  FAILED  ] Test_Caffe_layers.Resample/0, where GetParam() = OCV/CPU
[  FAILED  ] Test_Caffe_layers.Correlation/0, where GetParam() = OCV/CPU
[  FAILED  ] Test_Caffe_layers.Interp/0, where GetParam() = OCV/CPU

 5 FAILED TESTS

The testing with internal protobuf v19 and C++11 is OK for caffe layers.
I'll investitage it a little.

Test_Caffe_layers(internal protobuf v19 with C++11
kmtr@kmtr-VMware-Virtual-Platform:~/work/build4-main$ ./bin/opencv_test_dnn --gtest_filter="Test_Caffe_layers.*"
CTEST_FULL_OUTPUT
OpenCV version: 4.8.0-dev
OpenCV VCS version: 4.8.0-298-g5fb3869775-dirty
Build type: Release
Compiler: /usr/bin/c++  (ver 12.3.0)
Parallel framework: pthreads (nthreads=8)
CPU features: SSE SSE2 SSE3 *SSE4.1 *SSE4.2 *FP16 *AVX *AVX2 *AVX512-SKX?
Intel(R) IPP version: ippIP AVX2 (l9) 2021.8 (-) Feb 20 2023
Intel(R) IPP features code: 0x8000
OpenCL is disabled
TEST: Skip tests with tags: 'mem_6gb', 'verylong', 'dnn_skip_opencv_backend', 'dnn_skip_cpu', 'dnn_skip_cpu_fp16', 'dnn_skip_ocl', 'dnn_skip_ocl_fp16', 'dnn_skip_onnx_conformance', 'dnn_skip_parser'
Note: Google Test filter = Test_Caffe_layers.*
[==========] Running 31 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 31 tests from Test_Caffe_layers
[ RUN      ] Test_Caffe_layers.Softmax/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Softmax/0 (5 ms)
[ RUN      ] Test_Caffe_layers.LRN/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.LRN/0 (8 ms)
[ RUN      ] Test_Caffe_layers.Convolution/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Convolution/0 (2 ms)
[ RUN      ] Test_Caffe_layers.DeConvolution/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.DeConvolution/0 (6 ms)
[ RUN      ] Test_Caffe_layers.InnerProduct/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.InnerProduct/0 (3 ms)
[ RUN      ] Test_Caffe_layers.Pooling_max/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Pooling_max/0 (2 ms)
[ RUN      ] Test_Caffe_layers.Pooling_ave/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Pooling_ave/0 (1 ms)
[ RUN      ] Test_Caffe_layers.MVN/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.MVN/0 (1 ms)
[ RUN      ] Test_Caffe_layers.BatchNorm/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.BatchNorm/0 (1 ms)
[ RUN      ] Test_Caffe_layers.ReLU/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.ReLU/0 (2 ms)
[ RUN      ] Test_Caffe_layers.Dropout/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Dropout/0 (1 ms)
[ RUN      ] Test_Caffe_layers.Concat/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Concat/0 (4 ms)
[ RUN      ] Test_Caffe_layers.Fused_Concat/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Fused_Concat/0 (1 ms)
[ RUN      ] Test_Caffe_layers.Eltwise/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Eltwise/0 (5 ms)
[ RUN      ] Test_Caffe_layers.PReLU/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.PReLU/0 (2 ms)
[ RUN      ] Test_Caffe_layers.layer_prelu_fc/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.layer_prelu_fc/0 (0 ms)
[ RUN      ] Test_Caffe_layers.Reshape_Split_Slice/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Reshape_Split_Slice/0 (1 ms)
[ RUN      ] Test_Caffe_layers.Conv_Elu/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Conv_Elu/0 (4 ms)
[ RUN      ] Test_Caffe_layers.Accum/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Accum/0 (1 ms)
[ RUN      ] Test_Caffe_layers.FlowWarp/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.FlowWarp/0 (0 ms)
[ RUN      ] Test_Caffe_layers.ChannelNorm/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.ChannelNorm/0 (0 ms)
[ RUN      ] Test_Caffe_layers.DataAugmentation/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.DataAugmentation/0 (2 ms)
[ RUN      ] Test_Caffe_layers.Resample/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Resample/0 (1 ms)
[ RUN      ] Test_Caffe_layers.Correlation/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Correlation/0 (1 ms)
[ RUN      ] Test_Caffe_layers.Convolution2Inputs/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Convolution2Inputs/0 (1 ms)
[ RUN      ] Test_Caffe_layers.ROIPooling_Accuracy/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.ROIPooling_Accuracy/0 (2 ms)
[ RUN      ] Test_Caffe_layers.FasterRCNN_Proposal/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.FasterRCNN_Proposal/0 (7 ms)
[ RUN      ] Test_Caffe_layers.Average_pooling_kernel_area/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Average_pooling_kernel_area/0 (0 ms)
[ RUN      ] Test_Caffe_layers.PriorBox_repeated/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.PriorBox_repeated/0 (1 ms)
[ RUN      ] Test_Caffe_layers.PriorBox_squares/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.PriorBox_squares/0 (0 ms)
[ RUN      ] Test_Caffe_layers.Interp/0, where GetParam() = OCV/CPU
[       OK ] Test_Caffe_layers.Interp/0 (0 ms)
[----------] 31 tests from Test_Caffe_layers (84 ms total)

[----------] Global test environment tear-down
[==========] 31 tests from 1 test case ran. (85 ms total)
[  PASSED  ] 31 tests.
kmtr@kmtr-VMware-Virtual-Platform:~/work/build4-main$ ./bin/opencv_version -v

General configuration for OpenCV 4.8.0-dev =====================================
  Version control:               4.8.0-298-g5fb3869775-dirty

  Platform:
    Timestamp:                   2023-10-06T08:40:28Z
    Host:                        Linux 6.2.0-33-generic x86_64
    CMake:                       3.25.1
    CMake generator:             Ninja
    CMake build tool:            /usr/bin/ninja
    Configuration:               Release

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
      SSE4_1 (16 files):         + SSSE3 SSE4_1
      SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
      FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (9 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
      AVX2 (36 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
      AVX512_SKX (8 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX

  C/C++:
    Built as dynamic libs?:      YES
    C++ standard:                11
    C++ Compiler:                /usr/bin/c++  (ver 12.3.0)
    C++ flags (Release):         -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
    C++ flags (Debug):           -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  /usr/bin/cc
    C flags (Release):           -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
    C flags (Debug):             -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):      -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined
    Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined
    ccache:                      YES
    Precompiled headers:         NO
    Extra dependencies:          dl m pthread rt
    3rdparty dependencies:

  OpenCV modules:
    To be built:                 calib3d core dnn features2d flann highgui imgcodecs imgproc java ml objdetect photo python3 stitching ts video videoio
    Disabled:                    gapi world
    Disabled by dependency:      -
    Unavailable:                 python2
    Applications:                tests perf_tests apps
    Documentation:               NO
    Non-free algorithms:         NO

  GUI:                           GTK3
    GTK+:                        YES (ver 3.24.37)
      GThread :                  YES (ver 2.76.1)
      GtkGlExt:                  NO
    VTK support:                 YES (ver 9.1.0)

  Media I/O:
    ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.13)
    JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)
    WEBP:                        /usr/lib/x86_64-linux-gnu/libwebp.so (ver encoder: 0x020f)
    PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.39)
    TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.5.0)
    JPEG 2000:                   OpenJPEG (ver 2.5.0)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES
      avcodec:                   YES (59.37.100)
      avformat:                  YES (59.27.100)
      avutil:                    YES (57.28.100)
      swscale:                   YES (6.7.100)
      avresample:                NO
    GStreamer:                   YES (1.22.2)
    v4l/v4l2:                    YES (linux/videodev2.h)

  Parallel framework:            pthreads

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Intel IPP:                   2021.8 [2021.8.0]
           at:                   /home/kmtr/work/build4-main/3rdparty/ippicv/ippicv_lnx/icv
    Intel IPP IW:                sources (2021.8.0)
              at:                /home/kmtr/work/build4-main/3rdparty/ippicv/ippicv_lnx/iw
    VA:                          NO
    Lapack:                      NO
    Eigen:                       YES (ver 3.4.0)
    Custom HAL:                  NO
    Protobuf:                    build (3.19.1)
    Flatbuffers:                 builtin/3rdparty (23.5.9)

  OpenCL:                        YES (no extra features)
    Include path:                /home/kmtr/work/opencv/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python 3:
    Interpreter:                 /usr/bin/python3 (ver 3.11.4)
    Libraries:                   /usr/lib/x86_64-linux-gnu/libpython3.11.so (ver 3.11.4)
    numpy:                       /usr/lib/python3/dist-packages/numpy/core/include (ver 1.24.2)
    install path:                lib/python3.11/dist-packages/cv2/python-3.11

  Python (for build):            /usr/bin/python3

  Java:
    ant:                         NO
    Java:                        YES (ver 17.0.8)
    JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include
    Java wrappers:               YES (JAVA)
    Java tests:                  NO

  Install to:                    /usr/local
-----------------------------------------------------------------

@opencv-alalek
Copy link
Contributor

There is a custom patch over protobuf to support custom layers (AFAIK caffe importer only).

@Kumataro
Copy link
Contributor Author
Kumataro commented Oct 7, 2023

Thank you for your reply !! I can find it.

asmorkalov pushed a commit that referenced this issue Oct 19, 2023
Supporting protobuf v22 and later(with abseil-cpp/C++17) #24372

fix #24369
related #23791

1. This patch supports external protobuf v22 and later, it required abseil-cpp and c++17.
    Even if the built-in protobuf is upgraded to v22 or later, 
    the dependency on abseil-cpp and the requirement for C++17 will continue.
2. Some test for caffe required patched protobuf, so this patch disable them.

This patch is tested by following libraries.
-  Protobuf:                    /usr/local/lib/libprotobuf.so (4.24.4)
-  abseil-cpp:                YES (20230125)

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
IskXCr pushed a commit to Haosonn/opencv that referenced this issue Dec 20, 2023
Supporting protobuf v22 and later(with abseil-cpp/C++17) opencv#24372

fix opencv#24369
related opencv#23791

1. This patch supports external protobuf v22 and later, it required abseil-cpp and c++17.
    Even if the built-in protobuf is upgraded to v22 or later, 
    the dependency on abseil-cpp and the requirement for C++17 will continue.
2. Some test for caffe required patched protobuf, so this patch disable them.

This patch is tested by following libraries.
-  Protobuf:                    /usr/local/lib/libprotobuf.so (4.24.4)
-  abseil-cpp:                YES (20230125)

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
thewoz pushed a commit to thewoz/opencv that referenced this issue Jan 4, 2024
Supporting protobuf v22 and later(with abseil-cpp/C++17) opencv#24372

fix opencv#24369
related opencv#23791

1. This patch supports external protobuf v22 and later, it required abseil-cpp and c++17.
    Even if the built-in protobuf is upgraded to v22 or later, 
    the dependency on abseil-cpp and the requirement for C++17 will continue.
2. Some test for caffe required patched protobuf, so this patch disable them.

This patch is tested by following libraries.
-  Protobuf:                    /usr/local/lib/libprotobuf.so (4.24.4)
-  abseil-cpp:                YES (20230125)

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
thewoz pushed a commit to thewoz/opencv that referenced this issue May 29, 2024
Supporting protobuf v22 and later(with abseil-cpp/C++17) opencv#24372

fix opencv#24369
related opencv#23791

1. This patch supports external protobuf v22 and later, it required abseil-cpp and c++17.
    Even if the built-in protobuf is upgraded to v22 or later, 
    the dependency on abseil-cpp and the requirement for C++17 will continue.
2. Some test for caffe required patched protobuf, so this patch disable them.

This patch is tested by following libraries.
-  Protobuf:                    /usr/local/lib/libprotobuf.so (4.24.4)
-  abseil-cpp:                YES (20230125)

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0