nareshmlx/opencv-pr huggingface dataset:
**File:** samples/dnn/optical_flow.py
**Change Type:** modified
**Context:** PR #17919: Flownet2 with anysize
**Review Line:** 67

**Code Changes:**
```diff
-    parser.add_argument('--height', default=320, help='Input height')
-    parser.add_argument('--width',  default=448, help='Input width')
-    parser.add_argument('--proto', '-p', default='FlowNet2_deploy.prototxt', help='Path to prototxt.')
+    parser.add_argument('--height', default=320, type=int, help='Input height')
+    parser.add_argument('--width', default=448, type=int, help='Input width')
+    parser.add_argument('--proto', '-p', default='FlowNet2_deploy_anysize.prototxt', help='Path to prototxt.')
     parser.add_argument('--model', '-m', default='FlowNet2_weights.caffemodel', help='Path to caffemodel.')
     args, _ = parser.parse_known_args()
 
@@ -75,7 +75,25 @@ def motion_to_color(self, flow):
     cv.namedWindow(winName, cv.WINDOW_NORMAL)
```

Review comment:
Yes. However, the default `FlowNet2_deploy.prototxt.template` doesn't work with opencv-4.4.0 directly (maybe lacking certain layer's support). I modify the proto in `https://drive.google.com/open?id=19bo6SWU2p8ZKvjXqMKiCPdK8mghwDy9b` to have similar $-quoted variables link `FlowNet2_deploy.prototxt.template`.
**File:** modules/dnn/src/layers/scale_layer.cpp
**Change Type:** modified
**Context:** PR #17919: Flownet2 with anysize
**Review Line:** 355

**Code Changes:**
```diff
         Mat data_mean_cpu = blobs[1].clone();
+        Mat mean_resize = Mat(inputs[0].size[3], inputs[0].size[2], CV_32FC3);
+        Mat mean_3d = Mat(data_mean_cpu.size[3], data_mean_cpu.size[2], CV_32FC3, data_mean_cpu.ptr<float>(0));
+        resize(mean_3d, mean_resize, Size(inputs[0].size[3], inputs[0].size[2]));
+        int new_size[] = {1, mean_resize.channels(), mean_resize.cols, mean_resize.rows};
+        Mat data_mean_cpu_resize = mean_resize.reshape(1, *new_size);
         Mat data_mean_per_channel_cpu = blobs[2].clone();
 
-        const int numWeights = data_mean_cpu.total();
+        const int numWeights = data_mean_cpu_resize.total();
         CV_Assert(numWeights != 0);
```

Review comment:
Sure. I will have a try these days when my other work is done. Also, could you suggest any example so that I can learn from the test code style since this is my first time to contribute to opencv?
**File:** modules/dnn/src/layers/scale_layer.cpp
**Change Type:** modified
**Context:** PR #17919: Flownet2 with anysize
**Review Line:** 355

**Code Changes:**
```diff
         Mat data_mean_cpu = blobs[1].clone();
+        Mat mean_resize = Mat(inputs[0].size[3], inputs[0].size[2], CV_32FC3);
+        Mat mean_3d = Mat(data_mean_cpu.size[3], data_mean_cpu.size[2], CV_32FC3, data_mean_cpu.ptr<float>(0));
+        resize(mean_3d, mean_resize, Size(inputs[0].size[3], inputs[0].size[2]));
+        int new_size[] = {1, mean_resize.channels(), mean_resize.cols, mean_resize.rows};
+        Mat data_mean_cpu_resize = mean_resize.reshape(1, *new_size);
         Mat data_mean_per_channel_cpu = blobs[2].clone();
 
-        const int numWeights = data_mean_cpu.total();
+        const int numWeights = data_mean_cpu_resize.total();
         CV_Assert(numWeights != 0);
```

Review comment:
1. Create proto, run net in Caffe and save inputs and outputs using numpy. Open PR to `opencv_extra`. For example, (https://github.com/opencv/opencv_extra/pull/708) 2. Add test https://github.com/opencv/opencv/blob/3.4/modules/dnn/test/test_layers.cpp#L644
**File:** modules/dnn/src/layers/scale_layer.cpp
**Change Type:** modified
**Context:** PR #17919: Flownet2 with anysize
**Review Line:** 355

**Code Changes:**
```diff
         Mat data_mean_cpu = blobs[1].clone();
+        Mat mean_resize = Mat(inputs[0].size[3], inputs[0].size[2], CV_32FC3);
+        Mat mean_3d = Mat(data_mean_cpu.size[3], data_mean_cpu.size[2], CV_32FC3, data_mean_cpu.ptr<float>(0));
+        resize(mean_3d, mean_resize, Size(inputs[0].size[3], inputs[0].size[2]));
+        int new_size[] = {1, mean_resize.channels(), mean_resize.cols, mean_resize.rows};
+        Mat data_mean_cpu_resize = mean_resize.reshape(1, *new_size);
         Mat data_mean_per_channel_cpu = blobs[2].clone();
 
-        const int numWeights = data_mean_cpu.total();
+        const int numWeights = data_mean_cpu_resize.total();
         CV_Assert(numWeights != 0);
```

Review comment:
Sorry for the late reply. In Opencv `num_iter` increases in https://github.com/opencv/opencv/blob/master/modules/dnn/src/layers/scale_layer.cpp#L420. So, in OpenCV `num_iter = 1` at the very beginning just like in Caffe. We conducted several experiments with the DataAugmentation layer. In our experiments in `Forward_gpu` `num_iter` will always reinitialized and set to 1. We think this is bug in Сaffe implementation. We try to fix this, but when we increment `num_iter` visual results has become worse. I think in Caffe and OpenCV `num_iter` is set to be 1 for each image pair. If this is not right please provide the model where num_iter != 1 and we will rewrite `forward` in OpenCV. Why do you think Caffe doesn't support `recompute_mean = 1`? I only found this check: https://github.com/lmb-freiburg/flownet2/blob/master/src/caffe/layers/data_augmentation_layer.cu#L593 In OpenCV we get `recompute_mean` from proto (default value = 1) and check `recompute_mean > 0`: https://github.com/opencv/opencv/blob/master/modules/dnn/src/layers/scale_layer.cpp#L382
**File:** modules/dnn/src/layers/scale_layer.cpp
**Change Type:** modified
**Context:** PR #17919: Flownet2 with anysize

**Code Changes:**
```diff
@@ -15,6 +15,7 @@ Implementation of Scale layer.
 #include "../op_inf_engine.hpp"
 #include "../ie_ngraph.hpp"
 
+#include <opencv2/imgproc.hpp>
 #include <opencv2/dnn/shape_utils.hpp>
 
 namespace cv
@@ -324,7 +325,7 @@ class DataAugmentationLayerImpl CV_FINAL : public DataAugmentationLayer
                          std::vector<MatShape> &internals) const CV_OVERRIDE
```

Review comment:
Do we need this line?
**File:** modules/dnn/src/layers/scale_layer.cpp
**Change Type:** modified
**Context:** PR #17919: Flownet2 with anysize

**Code Changes:**
```diff
@@ -15,6 +15,7 @@ Implementation of Scale layer.
 #include "../op_inf_engine.hpp"
 #include "../ie_ngraph.hpp"
 
+#include <opencv2/imgproc.hpp>
 #include <opencv2/dnn/shape_utils.hpp>
 
 namespace cv
@@ -324,7 +325,7 @@ class DataAugmentationLayerImpl CV_FINAL : public DataAugmentationLayer
                          std::vector<MatShape> &internals) const CV_OVERRIDE
```

Review comment:
Oops, I have taken it out.
**File:** samples/dnn/optical_flow.py
**Change Type:** modified
**Context:** PR #17919: Flownet2 with anysize

**Code Changes:**
```diff
@@ -5,7 +5,7 @@
 Original repo:  https://github.com/lmb-freiburg/flownet2.
 
 Download the converted .caffemodel model from https://drive.google.com/open?id=16qvE9VNmU39NttpZwZs81Ga8VYQJDaWZ
-and .prototxt from https://drive.google.com/open?id=19bo6SWU2p8ZKvjXqMKiCPdK8mghwDy9b.
+and .prototxt from https://drive.google.com/file/d/1RyNIUsan1ZOh2hpYIH36A-jofAvJlT6a/view?usp=sharing.
 Otherwise download original model from https://lmb.informatik.uni-freiburg.de/resources/binaries/flownet2/flownet2-models.tar.gz,
 convert .h5 model to .caffemodel and modify original .prototxt using .prototxt from link above.
 '''
@@ -18,7 +18,7 @@
```

Review comment:
My last suggestion try using https://github.com/opencv/opencv/blob/master/modules/dnn/src/caffe/caffe_importer.cpp#L584 without creating temporary file. To do it we need using `self.net = cv.dnn.readNetFromCaffe(proto, model)` instead of `cv.dnn.readNet` And read weights from caffemodel to bytearray. ```python config = '' proto = open(args.proto).readlines() for line in proto: for key, value in var.items(): tag = "$%s$" % key line = line.replace(tag, str(value)) config += line caffemodel = open(args.model, "rb").read() opt_flow = OpticalFlow(bytearray(config.encode()), caffemodel, var['ADAPTED_HEIGHT'], var['ADAPTED_WIDTH']) ```
**File:** samples/dnn/optical_flow.py
**Change Type:** modified
**Context:** PR #17919: Flownet2 with anysize

**Code Changes:**
```diff
@@ -5,7 +5,7 @@
 Original repo:  https://github.com/lmb-freiburg/flownet2.
 
 Download the converted .caffemodel model from https://drive.google.com/open?id=16qvE9VNmU39NttpZwZs81Ga8VYQJDaWZ
-and .prototxt from https://drive.google.com/open?id=19bo6SWU2p8ZKvjXqMKiCPdK8mghwDy9b.
+and .prototxt from https://drive.google.com/file/d/1RyNIUsan1ZOh2hpYIH36A-jofAvJlT6a/view?usp=sharing.
 Otherwise download original model from https://lmb.informatik.uni-freiburg.de/resources/binaries/flownet2/flownet2-models.tar.gz,
 convert .h5 model to .caffemodel and modify original .prototxt using .prototxt from link above.
 '''
@@ -18,7 +18,7 @@
```

Review comment:
Please remove this line
**File:** modules/imgproc/src/resize.cpp
**Change Type:** modified
**Context:** PR #18053: Bit-exact Nearest Neighbor Resizing

**Code Changes:**
```diff
@@ -51,6 +51,7 @@
 #include "opencl_kernels_imgproc.hpp"
 #include "hal_replacement.hpp"
 #include "opencv2/core/hal/intrin.hpp"
+#include "opencv2/core/utils/buffer_area.private.hpp"
 
 #include "opencv2/core/openvx/ovx_defs.hpp"
 #include "resize.hpp"
@@ -1104,6 +1105,121 @@ resizeNN( const Mat& src, Mat& dst, double fx, double fy )
     }
```

Review comment:
It seems `(x >> 32) << 32` is optimized to `x` in the windows build.
**File:** modules/imgproc/src/resize.cpp
**Change Type:** modified
**Context:** PR #18053: Bit-exact Nearest Neighbor Resizing

**Code Changes:**
```diff
@@ -51,6 +51,7 @@
 #include "opencl_kernels_imgproc.hpp"
 #include "hal_replacement.hpp"
 #include "opencv2/core/hal/intrin.hpp"
+#include "opencv2/core/utils/buffer_area.private.hpp"
 
 #include "opencv2/core/openvx/ovx_defs.hpp"
 #include "resize.hpp"
@@ -1104,6 +1105,121 @@ resizeNN( const Mat& src, Mat& dst, double fx, double fy )
     }
```

Review comment:
avoid manual pointers arithmetic: `dst.ptr(y)`
**File:** modules/imgproc/test/test_resize_bitexact.cpp
**Change Type:** modified
**Context:** PR #18053: Bit-exact Nearest Neighbor Resizing

**Code Changes:**
```diff
@@ -152,4 +152,89 @@ TEST(Resize_Bitexact, Linear8U)
         }
 }
 
+PARAM_TEST_CASE(Resize_Bitexact, int)
+{
+public:
+    int depth;
+
+    virtual void SetUp()
```

Review comment:
> assignTo This method is "internal" and should not be used. Use `.convertTo()` instead.
**File:** modules/imgproc/test/test_resize_bitexact.cpp
**Change Type:** modified
**Context:** PR #18053: Bit-exact Nearest Neighbor Resizing

**Code Changes:**
```diff
@@ -152,4 +152,89 @@ TEST(Resize_Bitexact, Linear8U)
         }
 }
 
+PARAM_TEST_CASE(Resize_Bitexact, int)
+{
+public:
+    int depth;
+
+    virtual void SetUp()
```

Review comment:
Please make this as test parameter: - use `MatDepth` wrapped test type - look for `INSTANTIATE_TEST_CASE_P`
**File:** modules/imgproc/src/resize.cpp
**Change Type:** modified
**Context:** PR #18053: Bit-exact Nearest Neighbor Resizing

**Code Changes:**
```diff
@@ -51,6 +51,7 @@
 #include "opencl_kernels_imgproc.hpp"
 #include "hal_replacement.hpp"
 #include "opencv2/core/hal/intrin.hpp"
+#include "opencv2/core/utils/buffer_area.private.hpp"
 
 #include "opencv2/core/openvx/ovx_defs.hpp"
 #include "resize.hpp"
@@ -1104,6 +1105,121 @@ resizeNN( const Mat& src, Mat& dst, double fx, double fy )
     }
```

Review comment:
May be we should implement `int ufixedpoint64::cvFloor() const` method instead?
**File:** modules/imgproc/perf/perf_resize.cpp
**Change Type:** modified
**Context:** PR #18053: Bit-exact Nearest Neighbor Resizing

**Code Changes:**
```diff
@@ -254,4 +254,30 @@ PERF_TEST_P(MatInfo_Size_Scale_NN, ResizeNN,
     SANITY_CHECK_NOTHING();
 }
 
+PERF_TEST_P(MatInfo_Size_Scale_NN, ResizeNNExact,
+    testing::Combine(
+        testing::Values(CV_8UC1, CV_8UC3, CV_8UC4),
+        testing::Values(sz720p, sz1080p),
+        testing::Values(0.25, 0.5, 2.0)
+    )
```

Review comment:
Need to fix scope of perf tests. NN resize is usually used for downscaling (instead of upscaling), include 0.5: `0.25, 0.5, 2` should be enough. Please also reduce tested sizes (there are no significant changes in implementation) - `sz720p, sz1080p` is enough. Add `8UC3` type as frequently used case. Remove 8UC2.
**File:** modules/imgproc/perf/perf_resize.cpp
**Change Type:** modified
**Context:** PR #18053: Bit-exact Nearest Neighbor Resizing

**Code Changes:**
```diff
@@ -254,4 +254,30 @@ PERF_TEST_P(MatInfo_Size_Scale_NN, ResizeNN,
     SANITY_CHECK_NOTHING();
 }
 
+PERF_TEST_P(MatInfo_Size_Scale_NN, ResizeNNExact,
+    testing::Combine(
+        testing::Values(CV_8UC1, CV_8UC3, CV_8UC4),
+        testing::Values(sz720p, sz1080p),
+        testing::Values(0.25, 0.5, 2.0)
+    )
```

Review comment:
```suggestion testing::Combine( testing::Values(CV_8UC1, CV_8UC3, CV_8UC4), testing::Values(sz720p, sz1080p), testing::Values(0.25, 0.5, 2.0) ```
**File:** cmake/OpenCVModule.cmake
**Change Type:** modified
**Context:** PR #8947: build: added support for Visual Studio VERSIONINFO - Result for opencv_world: ![opencv_world_version](https://user-images.githubusercontent....
**Review Line:** 810

**Code Changes:**
```diff
+      set(_VS_VERSION_FILE "${OPENCV_VS_VERSIONINFO_FILE}")
+    elseif(DEFINED OPENCV_VS_VERSIONINFO_${the_module}_FILE)
+      set(_VS_VERSION_FILE "${OPENCV_VS_VERSIONINFO_${the_module}_FILE")
+    elseif(NOT OPENCV_VS_VERSIONINFO_SKIP_GENERATION)
+      set(_VS_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/vs_version.rc")
+      ocv_generate_vs_version_file("${_VS_VERSION_FILE}"
+        NAME "${the_module}"
+        FILEDESCRIPTION "OpenCV module: ${OPENCV_MODULE_${the_module}_DESCRIPTION}"
+        INTERNALNAME "${the_module}${OPENCV_DLLVERSION}"
+        ORIGINALFILENAME "${the_module}${OPENCV_DLLVERSION}.dll"
+      )
```

Review comment:
how is it used later? I mean how is it embedded into DLL?
**File:** cmake/OpenCVModule.cmake
**Change Type:** modified
**Context:** PR #8947: build: added support for Visual Studio VERSIONINFO - Result for opencv_world: ![opencv_world_version](https://user-images.githubusercontent....
**Review Line:** 810

**Code Changes:**
```diff
+      set(_VS_VERSION_FILE "${OPENCV_VS_VERSIONINFO_FILE}")
+    elseif(DEFINED OPENCV_VS_VERSIONINFO_${the_module}_FILE)
+      set(_VS_VERSION_FILE "${OPENCV_VS_VERSIONINFO_${the_module}_FILE")
+    elseif(NOT OPENCV_VS_VERSIONINFO_SKIP_GENERATION)
+      set(_VS_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/vs_version.rc")
+      ocv_generate_vs_version_file("${_VS_VERSION_FILE}"
+        NAME "${the_module}"
+        FILEDESCRIPTION "OpenCV module: ${OPENCV_MODULE_${the_module}_DESCRIPTION}"
+        INTERNALNAME "${the_module}${OPENCV_DLLVERSION}"
+        ORIGINALFILENAME "${the_module}${OPENCV_DLLVERSION}.dll"
+      )
```

Review comment:
.rc file is added as a source file (through `add_library()`)
**File:** samples/cpp/stereo_match.cpp
**Change Type:** modified
**Context:** PR #18129: Update the stereo sample:

**Code Changes:**
```diff
@@ -14,15 +14,16 @@
 #include "opencv2/core/utility.hpp"
 
 #include <stdio.h>
+#include <sstream>
 
 using namespace cv;
 
 static void print_help(char** argv)
 {
```

Review comment:
Please use consistent formatting across the file: ```.cpp if (...) { ... } ```
**File:** samples/cpp/stereo_match.cpp
**Change Type:** modified
**Context:** PR #18129: Update the stereo sample:

**Code Changes:**
```diff
@@ -14,15 +14,16 @@
 #include "opencv2/core/utility.hpp"
 
 #include <stdio.h>
+#include <sstream>
 
 using namespace cv;
 
 static void print_help(char** argv)
 {
```

Review comment:
`--color` option handling is missed here.
**File:** modules/flann/include/opencv2/flann/dist.h
**Change Type:** modified
**Context:** PR #18085: Add debug assert to check in FLANN the vectors size is multiple of th…
**Review Line:** 686

**Code Changes:**
```diff
@@ -683,6 +683,8 @@ struct Hamming2
     template <typename Iterator1, typename Iterator2>
     ResultType operator()(const Iterator1 a, const Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const
     {
+        CV_DbgAssert(!(size % long_word_size_) && "vectors size must be multiple of long words size (i.e. 8)");
+
 #ifdef FLANN_PLATFORM_64_BIT
         const uint64_t* pa = reinterpret_cast<const uint64_t*>(a);
         const uint64_t* pb = reinterpret_cast<const uint64_t*>(b);
@@ -711,6 +713,8 @@ struct Hamming2
```

Review comment:
Is it frequently used function (for example called from some loop)? Is overhead of this check measurable? If not then my suggestion is to use `CV_Assert()` instead to keep this check in Release builds too (almost all binary packages + python bindings). Or we need to add an upper level validation check for that (which is called once to reduce overhead).
**File:** modules/gapi/test/common/gapi_compoundkernel_tests.cpp
**Change Type:** modified
**Context:** PR #17163: Fixed cooperation of Compound kernel and GMatP type

**Code Changes:**
```diff
@@ -227,6 +227,73 @@ namespace
         }
     };
 
+    G_TYPED_KERNEL(GToInterleaved, <GMat(GMatP)>, "org.opencv.test.to_interleaved")
+    {
+        static GMatDesc outMeta(GMatDesc in)
+        {
+            GAPI_Assert(in.planar == true);
+            GAPI_Assert(in.chan == 3);
```

Review comment:
Better to use `cv::Mat::rowRange()`
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
Why not Ubuntu 18.04?
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
`crossbuild-essential-aarch64`
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
``` git clone --depth 1 https://github.com/opencv/opencv_contrib ../opencv_contrib ``` (without `cd ..`)
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
This is `ON` by default. Or not?
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
Maybe just `make -j$(nproc --all)`?
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
Actually, I got these flags from [existing arm64 build](https://pullrequest.opencv.org/buildbot/builders/master-contrib_ARMv8-lin), so I just keep it same with [link](https://pullrequest.opencv.org/buildbot/builders/master-contrib_ARMv8-lin/builds/11233/steps/cmake/logs/stdio). But I think you are right, I should cleanup some redundant flag: - [BUILD_SHARED_LIBS](https://github.com/opencv/opencv/blob/master/CMakeLists.txt#L438): NOT (ANDROID OR APPLE_FRAMEWORK), it would be ON in ARMv8, **will remove it**. - [BUILD_PERF_TESTS](https://github.com/opencv/opencv/blob/master/CMakeLists.txt#L446): NOT INSTALL_CREATE_DISTRIB IF (NOT APPLE_FRAMEWORK) ), it would be ON in ARMv8, **will remove it**. - [BUILD_TESTS](https://github.com/opencv/opencv/blob/master/CMakeLists.txt#L447): NOT INSTALL_CREATE_DISTRIB IF (NOT APPLE_FRAMEWORK) ), it would be ON in ARMv8, **will remove it**. - [WITH_OPENNI2](https://github.com/opencv/opencv/blob/master/CMakeLists.txt#L312): OFF by default, so it's okay to keep it ON. - [WITH_GDAL](https://github.com/opencv/opencv/blob/master/CMakeLists.txt#L399): OFF by default, so it's okay to keep it ON. - [BUILD_EXAMPLES](https://github.com/opencv/opencv/blob/master/CMakeLists.txt#L444): OFF by default, **will remove it**. - [WITH_OPENCL](https://github.com/opencv/opencv/blob/master/CMakeLists.txt#L369): (NOT ANDROID AND NOT CV_DISABLE_OPTIMIZATION), ON in ARMv8, so it's okay to keep it OFF. - [BUILD_DOCS](https://github.com/opencv/opencv/blob/master/CMakeLists.txt#L443): OFF IF (NOT WINRT AND NOT APPLE_FRAMEWORK)), OFF in ARMv8, **will remove it**. - [WITH_CUDA](https://github.com/opencv/opencv/blob/master/CMakeLists.txt#L243): OFF in ARMv8, **will remove it**. So, the finally flag list looks like: ``` cmake -DWITH_OPENNI2=ON \ -DWITH_GDAL=ON \ -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 \ -DWITH_OPENCL=OFF \ -DCMAKE_TOOLCHAIN_FILE=../platforms/linux/aarch64-gnu.toolchain.cmake \ -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ../ ```
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
Yep, `ON`, and I will clean up redundant flag in next patch
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
will fix it
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
sure, will change it
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
I believe that `WITH_OPENNI2` , `WITH_GDAL` and `WITH_OPENCL` are also extra
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
BTW, Alternative is keeping `cmake --build . --config release` and using `Ninja` build tool (`-GNinja`). - ninja doesn't don't mess error output in case of parallel builds (easy investigation of build failures) - parallel mode is enabled automatically (`-j` option is not required) - in general ninja is faster than make --- Also it make sense to test "install" target instead of just building. If GitHub Actions supports build artifacts (which can be downloaded later) then it would be nice to package install directory: ``` cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/install ... ``` (see also [DESTDIR](https://cmake.org/cmake/help/v3.5/variable/CMAKE_INSTALL_PREFIX.html#variable:CMAKE_INSTALL_PREFIX))
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
OpenCV does not depend on libusb
**File:** .github/workflows/arm64-build-checks.yml
**Change Type:** added
**Context:** PR #17989: Add arm64-build-checks github action

**Code Changes:**
```diff
@@ -0,0 +1,47 @@
+name: arm64 build checks
+
+on: [pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
```

Review comment:
Can you please show CMake summary?