opencv/modules/dnn/test
alexlyulkov a40ceff215
Merge pull request #26330 from alexlyulkov:al/new-engine-tflite-parser2
Modified TFLite parser for the new dnn engine #26330

The new dnn graph is creating just by defining input and output names of each layer.
Some TFLite layers has fused activation, which doesn't have layer name and input and output names. Also some layers require additional preprocessing layers (e.g. NHWC -> NCHW). All these layers should be added to the graph with some unique layer and input and output names. 

I solve this problem by adding additionalPreLayer and additionalPostLayer layers.

If a layer has a fused activation, I add additionalPostLayer and change input and output names this way:
**original**: conv_relu(conv123, conv123_input, conv123_output)
**new**: conv(conv123, conv123_input, conv123_output_additional_post_layer) + relu(conv123_relu,  conv1_output_additional_post_layer, conv123_output)

If a layer has additional preprocessing layer, I change input and output names this way:
**original**: permute_reshape(reshape345, reshape345_input, reshape345_output)
**new**: permute(reshape345_permute, reshape345_input, reshape345_input_additional_pre_layer) + reshape(reshape345, reshape345_input_additional_pre_layer, reshape345_output)


### 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
- [ ] 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
2024-10-22 09:05:58 +03:00
..
imagenet_cls_test_alexnet.py change fcn8s-heavy-pascal tests from caffe to onnx 2024-05-03 00:15:09 +08:00
imagenet_cls_test_googlenet.py Misc. modules/ typos 2018-02-12 07:09:43 -05:00
imagenet_cls_test_inception.py Merge branch 4.x 2021-12-30 21:43:45 +00:00
npy_blob.cpp Merge pull request #24411 from alexlyulkov:al/dnn-type-inference 2024-03-01 17:07:38 +03:00
npy_blob.hpp dnn: fix precomp.hpp usage 2018-02-28 17:06:26 +03:00
pascal_semsegm_test_fcn.py Merge branch '4.x' into '5.x' 2024-06-26 19:01:34 +03:00
test_backends.cpp Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
test_caffe_importer.cpp Merge pull request #24411 from alexlyulkov:al/dnn-type-inference 2024-03-01 17:07:38 +03:00
test_common.cpp Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
test_common.hpp Merge branch 4.x 2024-07-17 10:08:16 +03:00
test_common.impl.hpp Merge branch 4.x 2024-04-02 16:39:54 +03:00
test_darknet_importer.cpp Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
test_googlenet.cpp Merge pull request #22275 from zihaomu:fp16_support_conv 2023-05-17 09:38:33 +03:00
test_graph_simplifier.cpp Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
test_ie_models.cpp Fix for OpenVINO 2024.0 2024-03-18 15:05:50 +04:00
test_int8_layers.cpp Merge branch 4.x 2024-07-01 15:59:43 +03:00
test_int.cpp Merge pull request #25755 from alexlyulkov:al/more-types 2024-06-28 09:02:15 +03:00
test_layers_1d.cpp Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
test_layers.cpp Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
test_main.cpp Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
test_misc.cpp Merge pull request #25555 from alexlyulkov:al/int8-uint8-dnn-input 2024-05-16 15:54:00 +03:00
test_model.cpp Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
test_nms.cpp batched nms impl 2022-11-29 15:32:34 +08:00
test_onnx_conformance_layer_filter__cuda_denylist.inl.hpp Fix for support matrixes with number of axes = 6. 2024-08-21 09:06:46 +03:00
test_onnx_conformance_layer_filter__cuda_fp16_denylist.inl.hpp Supress more ONNX conformance test cases for quant-dequant with CUDA. 2024-08-20 17:12:26 +03:00
test_onnx_conformance_layer_filter__openvino.inl.hpp Merge pull request #26110 from Abdurrahheem:ash/hardmax-backend-fix 2024-09-06 13:14:25 +03:00
test_onnx_conformance_layer_filter__vulkan_denylist.inl.hpp Merge pull request #25644 from DaniAffCH:blockwise-quantization 2024-07-30 14:16:08 +03:00
test_onnx_conformance_layer_filter_opencv_all_denylist.inl.hpp Merge pull request #25630 from fengyuentau:nary-multi-thread 2024-07-03 10:09:05 +03:00
test_onnx_conformance_layer_filter_opencv_cpu_denylist.inl.hpp Merge branch 4.x 2024-08-06 15:31:30 +03:00
test_onnx_conformance_layer_filter_opencv_denylist.inl.hpp Merge branch 4.x 2024-08-06 15:31:30 +03:00
test_onnx_conformance_layer_filter_opencv_ocl_fp16_denylist.inl.hpp Merge pull request #26053 from alexlyulkov:al/opencl-conformance-tests 2024-08-27 17:23:11 +03:00
test_onnx_conformance_layer_filter_opencv_ocl_fp32_denylist.inl.hpp Merge pull request #26053 from alexlyulkov:al/opencl-conformance-tests 2024-08-27 17:23:11 +03:00
test_onnx_conformance_layer_parser_denylist.inl.hpp Merge pull request #26124 from fengyuentau:dnn/topk_dtype 2024-09-09 15:15:04 +03:00
test_onnx_conformance.cpp Merge branch 4.x 2024-08-06 15:31:30 +03:00
test_onnx_importer.cpp Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
test_precomp.hpp dnn: reduce set of ignored warnings 2018-11-15 13:15:59 +03:00
test_tf_importer.cpp dnn(test): skip very long debug tests, reduce test time 2023-12-25 08:44:06 +00:00
test_tflite_importer.cpp Merge pull request #26330 from alexlyulkov:al/new-engine-tflite-parser2 2024-10-22 09:05:58 +03:00