Tushar Burla d16c6529a2 dnn(onnx): support boolean tensors stored in int32_data
According to the ONNX protobuf specification, boolean tensors may be stored either in raw_data or packed into repeated int32 int32_data as individual 32-bit integers (not a bitmask). Previously, getMatFromTensor only read raw_data, causing assertion failures when parsing ONNX models that serialize boolean initializers into int32_data.

This patch adds int32_data extraction with conversion to CV_Bool, adds specification documentation, removes unreachable duplicate branches for UINT16/UINT32/UINT64, and adds tests in test_onnx_importer using models from opencv_extra.

Test data in opencv_extra under the same branch name as this patch: https://github.com/opencv/opencv_extra/pull/TBD

Addresses #19366.
2026-10-25 14:39:57 +05:30
2026-09-17 11:51:55 +03:00
2026-10-23 14:28:38 +03:00
2026-07-28 20:27:29 +05:30
2018-10-11 17:57:51 +00:00
2025-08-07 10:35:20 +03:00

OpenCV: Open Source Computer Vision Library

Resources

Contributing

Please read the contribution guidelines before starting work on a pull request.

Summary of the guidelines:

  • One pull request per issue;
  • Choose the right base branch;
  • Include tests and documentation;
  • Clean up "oops" commits before submitting;
  • Follow the coding style guide.

Additional Resources

Languages
C++ 86.2%
Python 4%
C 2.8%
CMake 2.2%
Java 1.6%
Other 3.1%