nareshmlx/opencv-pr huggingface dataset:
**File:** modules/imgproc/include/opencv2/imgproc.hpp
**Change Type:** modified
**Context:** PR #25515: Improved edge detection sample

**Code Changes:**
```diff
@@ -1885,7 +1885,7 @@ CV_EXPORTS_W void Laplacian( InputArray src, OutputArray dst, int ddepth,
 //! @addtogroup imgproc_feature
 //! @{
 
-/** @example samples/cpp/edge.cpp
+/** @example samples/cpp/snippets/edge.cpp
 This program demonstrates usage of the Canny edge detector
 
 Check @ref tutorial_canny_detector "the corresponding tutorial" for more details
```

Review comment:
We still need simplified API usage example. Code with 200+ lines are just not suitable for initial leaning steps. We need 2 kind of "samples": - simplified API usage example (e.g. move to part of documentation - tutorial_code) - large "task solution" "demos"
**File:** modules/imgproc/include/opencv2/imgproc.hpp
**Change Type:** modified
**Context:** PR #25515: Improved edge detection sample

**Code Changes:**
```diff
@@ -1885,7 +1885,7 @@ CV_EXPORTS_W void Laplacian( InputArray src, OutputArray dst, int ddepth,
 //! @addtogroup imgproc_feature
 //! @{
 
-/** @example samples/cpp/edge.cpp
+/** @example samples/cpp/snippets/edge.cpp
 This program demonstrates usage of the Canny edge detector
 
 Check @ref tutorial_canny_detector "the corresponding tutorial" for more details
```

Review comment:
edge.cpp has been moved to samples/cpp/snippets directory as it has been done for other basic cpp samples
**File:** samples/dnn/edge_detection.cpp
**Change Type:** added
**Context:** PR #25515: Improved edge detection sample

**Code Changes:**
```diff
@@ -0,0 +1,242 @@
+#include <opencv2/dnn.hpp>
+#include <opencv2/imgproc.hpp>
+#include <opencv2/highgui.hpp>
+#include <iostream>
+#include <string>
+#include <cmath>
+#include <vector>
+
+#include "common.hpp"
```

Review comment:
fixed, canny is now default
**File:** samples/dnn/edge_detection.cpp
**Change Type:** added
**Context:** PR #25515: Improved edge detection sample
**Review Line:** 13

**Code Changes:**
```diff
+
+#include "common.hpp"
+// Define namespace to simplify code
+using namespace cv;
+using namespace cv::dnn;
+using namespace std;
+
+int threshold1 = 0;
+int threshold2 = 50;
+int blurAmount = 5;
+
```

Review comment:
Not the best practice in case of `std` namespace
**File:** modules/imgcodecs/test/test_tiff.cpp
**Change Type:** modified
**Context:** PR #26093: Update test_tiff.cpp
**Review Line:** 1111

**Code Changes:**
```diff
@@ -1109,7 +1108,7 @@ TEST(Imgcodecs_Tiff_Modes, write_multipage)
     vector<Mat> pages;
     for (size_t i = 0; i < page_count; i++)
     {
-        const Mat page = imread(root + page_files[i]);
+        const Mat page = imread(root + page_files[i], IMREAD_REDUCED_GRAYSCALE_8 + (int)i);
         pages.push_back(page);
     }
 
```

Review comment:
I understood your idea to force output type to grayscale, but why REDUCED?
**File:** modules/imgcodecs/test/test_tiff.cpp
**Change Type:** modified
**Context:** PR #26093: Update test_tiff.cpp
**Review Line:** 1111

**Code Changes:**
```diff
@@ -1109,7 +1108,7 @@ TEST(Imgcodecs_Tiff_Modes, write_multipage)
     vector<Mat> pages;
     for (size_t i = 0; i < page_count; i++)
     {
-        const Mat page = imread(root + page_files[i]);
+        const Mat page = imread(root + page_files[i], IMREAD_REDUCED_GRAYSCALE_8 + (int)i);
         pages.push_back(page);
     }
 
```

Review comment:
>I understood your idea to force output type to grayscale, but why REDUCED? to use smaller files to write and speed up the test. ( the code reads 2 gray scale and 4 color images )
**File:** modules/core/include/opencv2/core/mat.inl.hpp
**Change Type:** modified
**Context:** PR #25945: Fix size() for 0d matrix
**Review Line:** 1278

**Code Changes:**
```diff
@@ -1275,7 +1275,7 @@ Size MatSize::operator()() const
 {
     int d = dims();
     CV_DbgAssert(d <= 2);
-    return d == 2 ? Size(p[1], p[0]) : Size(p[0], 1);
+    return d == 2 ? Size(p[1], p[0]) : d == 1 ? Size(p[0], 1) : Size(0, 0);
 }
 
 inline
```

Review comment:
I believe, scalar should map to `Size(1,1)` rather than `Size(0,0)`. Of course, we should also distinguish between empty mat (the product of all dimensions must be 0) and scalar (the product of all dimensions must be 1).
**File:** modules/core/include/opencv2/core/mat.inl.hpp
**Change Type:** modified
**Context:** PR #25945: Fix size() for 0d matrix
**Review Line:** 1278

**Code Changes:**
```diff
@@ -1275,7 +1275,7 @@ Size MatSize::operator()() const
 {
     int d = dims();
     CV_DbgAssert(d <= 2);
-    return d == 2 ? Size(p[1], p[0]) : Size(p[0], 1);
+    return d == 2 ? Size(p[1], p[0]) : d == 1 ? Size(p[0], 1) : Size(0, 0);
 }
 
 inline
```

Review comment:
`MatSize` is only used in `cv::Mat` and `cv::UMat` right? What is the scalar you are referring to? Would a matrix of size `1x1x1x1x1x1` be a scalar ? Would size be `(1,1)` then or undefined? An empty matrix can also be `1x0` (`dims()==2`). But when a matrix is newly created, `dims()==0`. It seems weird to also have a size of `(0,1)`
**File:** modules/core/include/opencv2/core/mat.inl.hpp
**Change Type:** modified
**Context:** PR #25945: Fix size() for 0d matrix
**Review Line:** 1278

**Code Changes:**
```diff
@@ -1275,7 +1275,7 @@ Size MatSize::operator()() const
 {
     int d = dims();
     CV_DbgAssert(d <= 2);
-    return d == 2 ? Size(p[1], p[0]) : Size(p[0], 1);
+    return d == 2 ? Size(p[1], p[0]) : d == 1 ? Size(p[0], 1) : Size(0, 0);
 }
 
 inline
```

Review comment:
When empty matrix is created, dims()==0, but total() is 0 too. But there can be scalar matrix with dims() == 0, but total() == 1: ``` Mat m, mscalar(0, nullptr, CV_32F); mscalar.at<float>(0) = 1.f; printf("empty m dims: %d, total number of elements: %zu, empty m.empty(): %d, " "scalar m dims: %d, scalar m total: %zu, scalar m.empty(): %d\n", m.dims, m.total(), m.empty(), mscalar.dims, mscalar.total(), mscalar.empty()); ``` that is, in addition to dims member, empty() should also be used to distinguish between empty matrix and scalar matrix.
**File:** modules/core/include/opencv2/core/mat.inl.hpp
**Change Type:** modified
**Context:** PR #25945: Fix size() for 0d matrix
**Review Line:** 1278

**Code Changes:**
```diff
@@ -1275,7 +1275,7 @@ Size MatSize::operator()() const
 {
     int d = dims();
     CV_DbgAssert(d <= 2);
-    return d == 2 ? Size(p[1], p[0]) : Size(p[0], 1);
+    return d == 2 ? Size(p[1], p[0]) : d == 1 ? Size(p[0], 1) : Size(0, 0);
 }
 
 inline
```

Review comment:
Oh, regarding the other question. `1x1x1x1x1x1` is not a scalar, because `dims()==6`.
**File:** modules/core/include/opencv2/core/mat.inl.hpp
**Change Type:** modified
**Context:** PR #25945: Fix size() for 0d matrix
**Review Line:** 1278

**Code Changes:**
```diff
@@ -1275,7 +1275,7 @@ Size MatSize::operator()() const
 {
     int d = dims();
     CV_DbgAssert(d <= 2);
-    return d == 2 ? Size(p[1], p[0]) : Size(p[0], 1);
+    return d == 2 ? Size(p[1], p[0]) : d == 1 ? Size(p[0], 1) : Size(0, 0);
 }
 
 inline
```

Review comment:
Thx for the explanation. It seems the scalar case is already handled properly because `d==1` in MatSize (though `dims()==0` in cv::Mat). I added a test for that.
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample

**Code Changes:**
```diff
@@ -0,0 +1,489 @@
+import cv2 as cv
+import numpy as np
+import argparse
+from tqdm import tqdm
+from functools import partial
+from copy import deepcopy
+
+## let use write description of the script and general information how to use it
+
```

Review comment:
it could be simplified.
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample

**Code Changes:**
```diff
@@ -0,0 +1,489 @@
+import cv2 as cv
+import numpy as np
+import argparse
+from tqdm import tqdm
+from functools import partial
+from copy import deepcopy
+
+## let use write description of the script and general information how to use it
+
```

Review comment:
Please remove VKCOM. It does not work for now.
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample

**Code Changes:**
```diff
@@ -0,0 +1,489 @@
+import cv2 as cv
+import numpy as np
+import argparse
+from tqdm import tqdm
+from functools import partial
+from copy import deepcopy
+
+## let use write description of the script and general information how to use it
+
```

Review comment:
The same: cv.dnn.DNN_TARGET_VULKAN
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample
**Review Line:** 158

**Code Changes:**
```diff
+
+    def make_schedule(self, ddim_num_steps, ddim_discretize="uniform", ddim_eta=0., verbose=True):
+        self.ddim_timesteps = make_ddim_timesteps(ddim_discr_method=ddim_discretize, num_ddim_timesteps=ddim_num_steps,
+                                                  num_ddpm_timesteps=self.ddpm_num_timesteps,verbose=verbose)
+        alphas_cumprod = self.model.alphas_cumprod
+        assert alphas_cumprod.shape[0] == self.ddpm_num_timesteps, 'alphas have to be defined for each timestep'
+        to_numpy = partial(np.array, copy=True, dtype=np.float32)
+
+        self.register_buffer('betas', to_numpy(self.model.betas))
+        self.register_buffer('alphas_cumprod', to_numpy(alphas_cumprod))
+        self.register_buffer('alphas_cumprod_prev', to_numpy(self.model.alphas_cumprod_prev))
```

Review comment:
I suppose there should be `num_ddpm_timesteps`. it's not used in the function. Also `self.ddpm_num_timesteps` is always 1000 as assigned in constructor and.
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample
**Review Line:** 475

**Code Changes:**
```diff
+
+def main(args):
+
+    image = cv.imread(args.image)
+    mask = create_mask(deepcopy(image))
+    image = cv.cvtColor(image, cv.COLOR_BGR2RGB)
+
+    batch = make_batch(image, mask)
+    image, mask, masked_image = batch["image"], batch["mask"], batch["masked_image"]
+
+    model = DDIMInpainter(args)
```

Review comment:
You can use new cv.IMREAD_COLOR_RGB for imread to get rid of cvtColor.
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample

**Code Changes:**
```diff
@@ -0,0 +1,489 @@
+import cv2 as cv
+import numpy as np
+import argparse
+from tqdm import tqdm
+from functools import partial
+from copy import deepcopy
+
+## let use write description of the script and general information how to use it
+
```

Review comment:
Most of parameters are not used in sample. Do we really need them?
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample
**Review Line:** 475

**Code Changes:**
```diff
+
+def main(args):
+
+    image = cv.imread(args.image)
+    mask = create_mask(deepcopy(image))
+    image = cv.cvtColor(image, cv.COLOR_BGR2RGB)
+
+    batch = make_batch(image, mask)
+    image, mask, masked_image = batch["image"], batch["mask"], batch["masked_image"]
+
+    model = DDIMInpainter(args)
```

Review comment:
I need to this seperately since `create_maks(...)` will show image with reversed channel if I use `cv.IMREAD_COLOR_RGB` in the `imread`
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample

**Code Changes:**
```diff
@@ -0,0 +1,489 @@
+import cv2 as cv
+import numpy as np
+import argparse
+from tqdm import tqdm
+from functools import partial
+from copy import deepcopy
+
+## let use write description of the script and general information how to use it
+
```

Review comment:
I would suggest put backends and targets that you tried. Others are not common.
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample

**Code Changes:**
```diff
@@ -0,0 +1,489 @@
+import cv2 as cv
+import numpy as np
+import argparse
+from tqdm import tqdm
+from functools import partial
+from copy import deepcopy
+
+## let use write description of the script and general information how to use it
+
```

Review comment:
Prefer to use `np.newaxis` to make a new dimension, e.g. `image = image[np.newaxis, ...]`
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample

**Code Changes:**
```diff
@@ -0,0 +1,489 @@
+import cv2 as cv
+import numpy as np
+import argparse
+from tqdm import tqdm
+from functools import partial
+from copy import deepcopy
+
+## let use write description of the script and general information how to use it
+
```

Review comment:
Use `np.newaxis` as above
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample

**Code Changes:**
```diff
@@ -0,0 +1,489 @@
+import cv2 as cv
+import numpy as np
+import argparse
+from tqdm import tqdm
+from functools import partial
+from copy import deepcopy
+
+## let use write description of the script and general information how to use it
+
```

Review comment:
It seems `kwargs` is not needed.
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample

**Code Changes:**
```diff
@@ -0,0 +1,489 @@
+import cv2 as cv
+import numpy as np
+import argparse
+from tqdm import tqdm
+from functools import partial
+from copy import deepcopy
+
+## let use write description of the script and general information how to use it
+
```

Review comment:
I believe it should be `np.newaxis`
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample

**Code Changes:**
```diff
@@ -0,0 +1,489 @@
+import cv2 as cv
+import numpy as np
+import argparse
+from tqdm import tqdm
+from functools import partial
+from copy import deepcopy
+
+## let use write description of the script and general information how to use it
+
```

Review comment:
There is no backend and target for openvino in line 46 to 47.
**File:** samples/dnn/ldm_inpainting.py
**Change Type:** added
**Context:** PR #25950: Diffusion Inpainting Sample

**Code Changes:**
```diff
@@ -0,0 +1,489 @@
+import cv2 as cv
+import numpy as np
+import argparse
+from tqdm import tqdm
+from functools import partial
+from copy import deepcopy
+
+## let use write description of the script and general information how to use it
+
```

Review comment:
`np.newaxis`
**File:** modules/js/generator/CMakeLists.txt
**Change Type:** modified
**Context:** PR #25986: Split Javascript white-list to support contrib modules

**Code Changes:**
```diff
@@ -38,8 +38,21 @@ set(scripts_hdr_parser "${JS_SOURCE_DIR}/../python/src2/hdr_parser.py")
 
 if(DEFINED ENV{OPENCV_JS_WHITELIST})
   set(OPENCV_JS_WHITELIST_FILE "$ENV{OPENCV_JS_WHITELIST}")
+  message(STATUS "Use white list from environment ${OPENCV_JS_WHITELIST_FILE}")
 else()
-  set(OPENCV_JS_WHITELIST_FILE "${OpenCV_SOURCE_DIR}/platforms/js/opencv_js.config.py")
+  #generate white list from modules/<module_name>/misc/js/whitelist.json
+  set(OPENCV_JS_WHITELIST_FILE "${CMAKE_CURRENT_BINARY_DIR}/whitelist.json")
+  foreach(m in ${OPENCV_JS_MODULES})
```

Review comment:
No need to write file each time. Generate string and update on changes only. See `ocv_update_file` Also generated file should be added as a dependency to the build graph of bindings generator target.
**File:** modules/js/generator/embindgen.py
**Change Type:** modified
**Context:** PR #25986: Split Javascript white-list to support contrib modules
**Review Line:** 956

**Code Changes:**
```diff
@@ -76,6 +76,7 @@
 else:
     from cStringIO import StringIO
 
+import json
 
 func_table = {}
 
@@ -103,11 +104,32 @@ def makeWhiteList(module_list):
                 wl[k] = m[k]
     return wl
 
+def makeWhiteListJson(module_list):
+    wl = {}
+    for n, gen_dict in module_list.items():
```

Review comment:
Old behavior seems broken. Besides of json there are namespaces configuration were possible (see `namespace_prefix_override`), so python configuration code is preferable and provides full customization without unnecessary limitation of json.
**File:** modules/js/generator/CMakeLists.txt
**Change Type:** modified
**Context:** PR #25986: Split Javascript white-list to support contrib modules

**Code Changes:**
```diff
@@ -38,8 +38,21 @@ set(scripts_hdr_parser "${JS_SOURCE_DIR}/../python/src2/hdr_parser.py")
 
 if(DEFINED ENV{OPENCV_JS_WHITELIST})
   set(OPENCV_JS_WHITELIST_FILE "$ENV{OPENCV_JS_WHITELIST}")
+  message(STATUS "Use white list from environment ${OPENCV_JS_WHITELIST_FILE}")
 else()
-  set(OPENCV_JS_WHITELIST_FILE "${OpenCV_SOURCE_DIR}/platforms/js/opencv_js.config.py")
+  #generate white list from modules/<module_name>/misc/js/whitelist.json
+  set(OPENCV_JS_WHITELIST_FILE "${CMAKE_CURRENT_BINARY_DIR}/whitelist.json")
+  foreach(m in ${OPENCV_JS_MODULES})
```

Review comment:
ocv_update_file - done. dependency is already there.
**File:** modules/dnn/perf/perf_layer.cpp
**Change Type:** modified
**Context:** PR #23279: dnn: add ONNX TopK
**Review Line:** 1097

**Code Changes:**
```diff
+}
+PERF_TEST_P_(Layer_TopK, TopK_3D_Axis1) {
+    test_layer(input_shape_3d, input_shape_3d[1] / 2, 1);
+}
+PERF_TEST_P_(Layer_TopK, TopK_3D_Axis2) {
+    test_layer(input_shape_3d, input_shape_3d[2] / 2, 2);
+}
+INSTANTIATE_TEST_CASE_P(/**/, Layer_TopK,
+                        dnnBackendsAndTargets(/* withInferenceEngine= */ false,
+                                              /* withHalide= */          false,
+                                              /* withCpuOCV= */          true,
```

Review comment:
I propose to add cases for top-5 at least. It's popular case for classification scenarios.
**File:** modules/imgproc/test/test_color.cpp
**Change Type:** modified
**Context:** PR #25968: Correct Bayer2Gray u8 SIMD

**Code Changes:**
```diff
@@ -1863,6 +1863,26 @@ TEST(Imgproc_ColorBayer, regression)
     EXPECT_EQ(0, countNonZero(diff.reshape(1) > 1));
 }
 
+TEST(Imgproc_ColorBayer2Gray, regression_25823)
+{
+    const int n = 100;
+    Mat src(n, n, CV_8UC1);
+    Mat dst;
+
```

Review comment:
``` cv::Mat gt(rows, cols, cv::Scalar(1)); EXPECT_EQ(0, cv::norm(dst, gt, NORM_INF)); ```
**File:** modules/dnn/src/cuda4dnn/csl/tensor.hpp
**Change Type:** modified
**Context:** PR #26043: Support Matrices with axes > 6 CUDA
**Review Line:** 31

**Code Changes:**
```diff
@@ -28,7 +28,7 @@
 #include <utility>
 
 #ifndef CSL_MAX_TENSOR_RANK
-    #define CSL_MAX_TENSOR_RANK 6
+    #define CSL_MAX_TENSOR_RANK 7
 #endif
 
 namespace cv { namespace dnn { namespace cuda4dnn { namespace csl {
```

Review comment:
Not sure why there is a rank limit. Could it be removed?
**File:** modules/dnn/src/cuda4dnn/csl/tensor.hpp
**Change Type:** modified
**Context:** PR #26043: Support Matrices with axes > 6 CUDA
**Review Line:** 31

**Code Changes:**
```diff
@@ -28,7 +28,7 @@
 #include <utility>
 
 #ifndef CSL_MAX_TENSOR_RANK
-    #define CSL_MAX_TENSOR_RANK 6
+    #define CSL_MAX_TENSOR_RANK 7
 #endif
 
 namespace cv { namespace dnn { namespace cuda4dnn { namespace csl {
```

Review comment:
I took a look at it. It seems that currently this variables is deeply rooted in CUDA backend. We can remove it from assertions and nothing happens. But to remove it completed quite a number of classes and function need to be refactored.
**File:** modules/dnn/test/test_onnx_conformance_layer_filter__cuda_denylist.inl.hpp
**Change Type:** modified
**Context:** PR #26043: Support Matrices with axes > 6 CUDA
**Review Line:** 93

**Code Changes:**
```diff
@@ -90,7 +90,6 @@
 "test_scatternd_max",
 "test_scatternd_min",
 "test_scatternd_multiply",
-"test_nllloss_NCd1d2d3d4d5_none_no_weight_expanded", // crash: https://github.com/opencv/opencv/issues/25471
 "test_dequantizelinear_blocked", // Issue https://github.com/opencv/opencv/issues/25999
 "test_quantizelinear", // Issue https://github.com/opencv/opencv/issues/25999
 "test_quantizelinear_axis", // Issue https://github.com/opencv/opencv/issues/25999
```

Review comment:
just remove the line
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #26073: (5.x) Merge 4.x - Contrib: https://github.com/opencv/opencv_contrib/pull/3783 Extra: https://github.com/opencv/opencv_extra/pull/1205 #2327...
**Review Line:** 3302

**Code Changes:**
```diff
+        net.forward(outputs, std::vector<std::string>{"values", "indices"});
+
+        Mat output_res_val = outputs.front(),
+            output_res_ind = outputs.back();
+
+        output_ref_ind.convertTo(output_ref_ind, CV_32F); // TODO: revise this conversion in 5.x
+
+        normAssert(output_ref_val, output_res_val, (basename + " values").c_str(), l1 ? l1 : default_l1, lInf ? lInf : default_lInf);
+        normAssert(output_ref_ind, output_res_ind, (basename + " indices").c_str(), l1 ? l1 : default_l1, lInf ? lInf : default_lInf);
+
+        expectNoFallbacksFromIE(net);
```

Review comment:
Well, it needs to be handled in `getType` in the layer impementation but 4.x does not have this. I can prepare a dedicated one for the 5.x merge.
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #26073: (5.x) Merge 4.x - Contrib: https://github.com/opencv/opencv_contrib/pull/3783 Extra: https://github.com/opencv/opencv_extra/pull/1205 #2327...
**Review Line:** 3302

**Code Changes:**
```diff
+        net.forward(outputs, std::vector<std::string>{"values", "indices"});
+
+        Mat output_res_val = outputs.front(),
+            output_res_ind = outputs.back();
+
+        output_ref_ind.convertTo(output_ref_ind, CV_32F); // TODO: revise this conversion in 5.x
+
+        normAssert(output_ref_val, output_res_val, (basename + " values").c_str(), l1 ? l1 : default_l1, lInf ? lInf : default_lInf);
+        normAssert(output_ref_ind, output_res_ind, (basename + " indices").c_str(), l1 ? l1 : default_l1, lInf ? lInf : default_lInf);
+
+        expectNoFallbacksFromIE(net);
```

Review comment:
Filed ticket about it: https://github.com/opencv/opencv/issues/26076
**File:** modules/core/test/test_operations.cpp
**Change Type:** modified
**Context:** PR #26073: (5.x) Merge 4.x - Contrib: https://github.com/opencv/opencv_contrib/pull/3783 Extra: https://github.com/opencv/opencv_extra/pull/1205 #2327...

**Code Changes:**
```diff
@@ -42,7 +42,7 @@
 
 #include "test_precomp.hpp"
 #include "opencv2/ts/ocl_test.hpp" // T-API like tests
-#include "opencv2/core/core_c.h"
+#include <fenv.h>
 
 namespace opencv_test {
 namespace {
@@ -1087,7 +1087,6 @@ bool CV_OperationsTest::operations1()
```

Review comment:
double check for what?
**File:** modules/dnn/src/layers/einsum_layer.cpp
**Change Type:** modified
**Context:** PR #26073: (5.x) Merge 4.x - Contrib: https://github.com/opencv/opencv_contrib/pull/3783 Extra: https://github.com/opencv/opencv_extra/pull/1205 #2327...
**Review Line:** 545

**Code Changes:**
```diff
@@ -541,7 +542,7 @@ class LayerEinsumImpl CV_FINAL : public EinsumLayer
                 // Use either the preprocessed inputs (if it is available) or the corresponding raw inputs
                 result = pairwiseOperandProcess(!result.empty() ? result : rawInputs[0],
                                                 !result.empty() ? tmpResult : homogenizedInputDims[0],
-                                                (!preProcessedInputs.empty() && !preProcessedInputs[input].empty()) ? preProcessedInputs[input] : rawInputs[input],
+                                                (!preProcessedInputs[input].empty()) ? preProcessedInputs[input] : rawInputs[input],
                                                 homogenizedInputDims[input],
                                                 reducedDims,
                                                 isFinalPair);
@@ -605,8 +606,8 @@ void LayerEinsumImpl::preProcessInputs(InputArrayOfArrays& inputs_arr)
     std::vector<cv::Mat> inputs;
```

Review comment:
Why is pre-check removed? (anyway it is wrong as it doesn't check vector size vs index)