opencv/modules
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
..
3d C-API cleanup: rework ArrayTest to use new arrays only 2024-10-09 22:36:20 +03:00
calib calib: mark some multiview tests verylong 2024-10-07 15:37:59 +03:00
core Merge pull request #26333 from vpisarev:fix_26322 2024-10-18 14:50:27 +03:00
dnn Merge pull request #26330 from alexlyulkov:al/new-engine-tflite-parser2 2024-10-22 09:05:58 +03:00
features2d Merge pull request #25292 from kaingwade:features2d_parts_to_contrib 2024-10-10 17:10:22 +03:00
flann Prevent signed integer overflow in LshTable 2024-05-24 23:47:36 +02:00
gapi build: fix AVX2/AVX512 builds failed due to intrinsics operator usage 2024-09-25 19:48:17 +03:00
highgui Drop remaning C CV_FUNCTION_NAME as it's not used any more. 2024-09-12 08:38:19 +03:00
imgcodecs C-API cleanup: removed legacy headers in imgcodecs 2024-10-01 18:34:35 +03:00
imgproc Merge pull request #26271 from fengyuentau:imgproc/warpperspective_opt 2024-10-15 11:13:41 +03:00
java Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
js Merge pull request #25292 from kaingwade:features2d_parts_to_contrib 2024-10-10 17:10:22 +03:00
objc Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
objdetect Merge branch 4.x 2024-08-28 15:06:19 +03:00
photo C-API cleanup: inpaint algorithms in photo 2024-10-01 20:06:14 +03:00
python Merge pull request #25292 from kaingwade:features2d_parts_to_contrib 2024-10-10 17:10:22 +03:00
stereo Merge branch '4.x' into '5.x' 2024-06-26 19:01:34 +03:00
stitching Merge pull request #25292 from kaingwade:features2d_parts_to_contrib 2024-10-10 17:10:22 +03:00
ts Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
video Merge pull request #26056 from vpisarev:new_dnn_engine 2024-10-16 15:28:19 +03:00
videoio Merge branch 4.x 2024-09-10 10:15:22 +03:00
world cmake: use /INCREMENTAL:NO with MSVS 2015 2023-12-07 19:46:27 +00:00
CMakeLists.txt Merge pull request #25017 from kaingwade:ml_to_contrib 2024-02-27 15:54:08 +03:00