Repository navigation
Provide prebuilt Windows ARM64 packages #806
Description
Activity
Technically OpenCV-Python could be built for Windows ARM. See instructions in the PR here: #644 (comment)
OpenCV team does not have Windows host on ARM right now for builds and testing. I'll return to the issue later in case of higher demand.OpenCV team does not have Windows host on ARM right now for builds and testing
- MSVC can cross-compile binaries on x64 hosts for arm64 target
- Testing can be done on macOS M1 / M2 on Windows virtual machines installed via Parallel Desktops.
- You can also consider purchasing this board and connecting it to github actions.
Related: opencv/opencv#25383
I second this, especially in regard to the build issues with #993
- Reacted by Avasam
https://github.com/xavave/opencvsharp.win.arm64
i've implemented a github action for building dll for windows Arm64Is there any way to get opencv-python via pip install in Windows 11 with ARM64 processor?
I faild after trying different option, including rebuild.
I think it would be highly appreciated.
Is there any way to get opencv-python via pip install in Windows 11 with ARM64 processor?
I faild after trying different option, including rebuild.
I think it would be highly appreciated.
All I had to do was set
CMAKE_ARGS=-DBUILD_opencv_dnn=OFF -DENABLE_NEON=OFF: https://github.com/Toufool/AutoSplit/blob/d9c5e3b48eeda52a13c08e75b5ffd61873ce5b8f/.github/workflows/lint-and-build.yml#L34-L37See #1092 (comment)
Edit: note I'm using the headless version of opencv-contrib (opencv-contrib-python-headless), so I also get to skip building a bunch of gui-related stuff
Is there any way to get opencv-python via pip install in Windows 11 with ARM64 processor?
I faild after trying different option, including rebuild.
I think it would be highly appreciated.All I had to do was set
CMAKE_ARGS=-DBUILD_opencv_dnn=OFF -DENABLE_NEON=OFF: https://github.com/Toufool/AutoSplit/blob/d9c5e3b48eeda52a13c08e75b5ffd61873ce5b8f/.github/workflows/lint-and-build.yml#L34-L37See #1092 (comment)
No hope, I had many errors like the following:
set CMAKE_ARGS="-DBUILD_opencv_dnn=OFF -DENABLE_NEON=OFF"
pip install opencv-python --no-binary=all
Collecting opencv-python
Using cached opencv-python-4.12.0.88.tar.gz (95.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Collecting numpy<2.3.0,>=2 (from opencv-python)
Using cached numpy-2.2.6-cp314-cp314-win_arm64.whl
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (pyproject.toml) ... error
error: subprocess-exited-with-error× Building wheel for opencv-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [525 lines of output]-------------------------------------------------------------------------------- -- Trying 'Ninja (Visual Studio 17 2022 ARM64 v144)' generator -------------------------------- --------------------------- ---------------------- ----------------- ------------ ------- -- Not searching for unused variables given on the command line. CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. CMake Error at CMakeLists.txt:2 (PROJECT): Generator Ninja does not support platform specification, but platform ARM64 was specified. -- Configuring incomplete, errors occurred! -- ------- ------------ ----------------- ---------------------- --------------------------- -------------------------------- -- Trying 'Ninja (Visual Studio 17 2022 ARM64 v144)' generator - failure -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Trying 'Visual Studio 17 2022 ARM64 v144' generator -------------------------------- --------------------------- ---------------------- ----------------- ------------ ------- -- Not searching for unused variables given on the command line. CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. CMake Error at CMakeLists.txt:2 (PROJECT): Generator Visual Studio 17 2022 could not find any instance of Visual Studio. -- Configuring incomplete, errors occurred! -- ------- ------------ ----------------- ---------------------- --------------------------- -------------------------------- -- Trying 'Visual Studio 17 2022 ARM64 v144' generator - failure -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Trying 'Ninja (Visual Studio 17 2022 ARM64 v143)' generator -------------------------------- --------------------------- ---------------------- ----------------- ------------ ------- -- Not searching for unused variables given on the command line. CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. CMake Error at CMakeLists.txt:2 (PROJECT): Generator Ninja does not support platform specification, but platform ARM64 was specified.@lucalista you can try these builds, or fork repo and rebuild from your. PR is ready, no activity from maintainers since Sep 17 👀
Reacted by Luca Lista and Daniel Kornev@lucalista you can try these builds, or fork repo and rebuild from your. PR is ready, no activity from maintainers since Sep 17 👀
Thank you, it worked!
Reacted by Gleb KhmyznikovI've also made a PR shimat/opencvsharp#179 with zip released https://github.com/xavave/opencvsharp.win.arm64/releases/tag/4.11.0.20250505
OpenCvSharpExtern.dll here: https://github.com/xavave/opencvsharp.win.arm64/releases/download/4.11.0.20250505/OpenCvSharpExtern.zipAll I had to do was set
CMAKE_ARGS=-DBUILD_opencv_dnn=OFF -DENABLE_NEON=OFFGiven OpenCV 5's claims of improved ARM support, as well as DNN and NEON related rewrites, I wonder if this will still be necessary ?!
The Headline: A Brand-New DNN Engine
[...]
- Arm KleidiCV: a drop-in HAL for AArch64 that accelerates core image processing and DNN kernels using NEON [...]
[...]
Underneath all of this sits Universal Intrinsics 2.0, a single vector codebase that maps to SSE, AVX2/512, NEON, SVE, RVV, and more. It is mostly an internal detail, but it is the reason one implementation can target so many architectures, and the team reports 3-4x speedups on common ARM operations like resizing and warping because of it.
[...]
What OpenCV 5.0 Ships With
Feature OpenCV 5.0 Compared to 4.x DNN engine Rewritten graph engine with fusion and a buffer pool No modern memory pooling or dynamic shapes [...] [...] [...] Edit: Just tested, and opencv-python 5.0 sdist builds fail on missing ffmpeg for Windows on ARM :/ Which is fixed by https://github.com/opencv/opencv-python/pull/1143/changes#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7R108-R110 and idk of any build flag fix for this.