1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-26 05:43:05 +04:00
Files
Kenmar Francisco f7ad23157f dnn: remove Caffe protobuf leftovers, fix external protobuf builds
The Caffe importer removal (#28678) left behind the protoc-generated
opencv-caffe.pb.{cc,h} and caffe_io.{cpp,hpp}. The generated files can
only be compiled with an old libprotobuf and can no longer be
regenerated since opencv-caffe.proto was deleted, so any build with
PROTOBUF_UPDATE_FILES=ON or an external protobuf failed (#29291, #29419).

- Move the generic ReadProto* helpers, the only remaining consumers of
  caffe_io (used by the TensorFlow importer), to src/protobuf_io.{hpp,cpp};
  delete src/caffe and misc/caffe, and move glog_emulator.hpp to src/.
- Guard the protobuf version check so it also works with newer protobuf
  where GOOGLE_PROTOBUF_VERSION is not defined.
- Drop the unconditional opencv-onnx.pb.h include from cast2_layer.cpp,
  using the spec-fixed ONNX data type values instead, and update stale
  readNetFromONNX/readNetFromTensorflow stubs to the current signatures
  so WITH_PROTOBUF=OFF builds link again.
2026-07-06 14:38:46 -04:00
..