Comments (24)
The builds are now up in PyPI: https://pypi.python.org/pypi/opencv-contrib-python
Release notes: https://github.com/skvark/opencv-python/releases/tag/7
Remember to uninstall opencv-python
before installing opencv-contrib-python
because the packages use same namespace. Same rule applies if you change from opencv-contrib-python
to opencv-python
.
from opencv-python.
It's coming when I or someone else implements it. Probably later this month.
from opencv-python.
I have now made most of the changes to enable the contrib builds. Windows builds seem to be fine. However, there's at least one issue related to build times. Travis terminates OS X builds (don't know yet about the Linux builds, still compiling at the moment) at 50 min which is the limit for open source builds. So, builds times require some optimizations before I can make this happen.
from opencv-python.
Thanks. This means that a new package entry has to be created to PyPI to keep the opencv_contrib separated from the plain opencv package. After this we will have two entries in PyPI:
- opencv-python, which will remain the same
- opencv-contrib-python, which will have the contrib modules and a note about the usage in commercial applications
How this will be done in practice is still open. There are few options:
- Make a separate repository for opencv_contrib
- this would duplicate most of the code which is not very practical
- Run both builds via this repo, with and without opencv_contrib
- needs some parameters to the build matrix to decide which build to run
Option 2 is probably the best. Opencv_contrib can be added as a submodule to this repo, and after that it should be pretty easy to parameterize the builds and add new entries to the build matrices. Build times will be of course very long đ
from opencv-python.
From reading that email exchange, it just seems you cannot use them commercially, but you should be able to redistribute them. Additionally, the validity of software patents at all very significantly from country to country so as long as you give the option of not having them included, it should be fine.
from opencv-python.
opencv-python is an excellent project, I am looking forward to the new branch "opencv-contrib-python" on pypi.
from opencv-python.
Good news. I had a better look into the build time issue and it turned out that there was a bug in build-wheels.sh
file. The script looped through available Python installations and ended up compiling OpenCV multiple times in some cases (related to different unicode width's in Python 2.7). I'm going to do some cleaning and testing before merging the changes into master, but if everything goes as expected, the opencv-contrib-python
package should be available pretty soon in PyPI.
from opencv-python.
As far as I can understand, some of the opencv_contrib algorithms are non-free/patented and I'm not sure if I can redistribute OpenCV if I add them to the package. More information is needed about opencv_contrib licenses and redistribution rules before any decision can be made.
from opencv-python.
the opencv_contrib released with license BSD. looks well for now.
from opencv-python.
from opencv-python.
looks like they do not like it published.
from opencv-python.
Seems have to use opencv2.4 if I want to use SIFT feature.
from opencv-python.
Hi Skvark, is the new entry on Pypi "opencv-contrib-python" coming soon? :)
from opencv-python.
Glad to know that. "opencv-contrib-python" is meaningful to many of us.
from opencv-python.
Some of the Linux builds have the same problem as above. I did run one of them with ninja-build but it took still over 50 minutes. All build speed optimization tips for Travis are welcome.
from opencv-python.
@skvark I have no experience with Travis, but have you considered trying to get Travis to parrallelize the build process? Just looking around, it appears that each TravisVM has 1.5 cores so you might be able to significantly increase the speed by setting the environment variables properly.
env:
global:
- MAKEFLAGS="-j 2"
Apparently, Ninja can use too much memory on Travis-CI causing the SWAP space to be used. Limiting the number of parrallel jobs Ninja can do it does apparently speed things up according to other repos.
from opencv-python.
Linux builds use -j5 and OS X -j4. I tested them with -j2 too but it had no effect. I will try how it goes when ninja is forced to -j2.
from opencv-python.
Is it possible to upload to pypi manualy at present?
from opencv-python.
Is any progress, @skvark
from opencv-python.
You can follow the progress in https://github.com/skvark/opencv-python/tree/opencv_contrib. Please don't spam to this thread, it will not have any effect to the development process.
from opencv-python.
@skvark have you considered caching intermediary build artifacts? It might help to speed up builds if used properly.
from opencv-python.
Do you mean like pip cache? I managed somehow to get a single macOS build to compile in 31 minutes by adding some OpenCV build flags and -j8, but I don't believe those changes alone made the build faster. Maybe there has been come changes in the Travis macOS environment... Still, some Linux builds take too long. I'll have to see if there are some OpenCV build flags which can be disabled to boost the compilation speed.
from opencv-python.
Do you mean like pip cache?
No, I was more thinking of object files for example. You can cache an arbitrary directory in travis: https://docs.travis-ci.com/user/caching/#Arbitrary-directories
from opencv-python.
Yes, that would indeed make the build faster since the build changes only when the OpenCV version is updated. I'll have to see if that can be done easily for example by caching the whole cmake generated build directory.
from opencv-python.
Related Issues (20)
- PyPI: macOS arm64 wheel missing
- cv2.createThinPlateSplineShapeTransformer not exist in 4.10
- imdecode jpeg2000 segfault or deadlock in multithreading HOT 2
- Typing of compare does not allow scalar for src1 or src2
- Why Building wheel for opencv-python when using "pip install opencv-python"
- Typing stubs generation has failed when building wheel HOT 1
- error: OpenCV(4.9.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\layers\convolution_layer.cpp:396: error: (-2:Unspecified error) Number of input channels should be multiple of 3 but got 4 in function 'cv::dnn::ConvolutionLayerImpl::getMemoryShapes'
- Gstreamer support on windows 10
- why Äą am getting this error
- BUG: cv2.fillPoly() causing segmentation fault on Ubuntu 22.04.4 LTS HOT 1
- [Suggestion] Metapackage as solution to current issues with opencv as dependency HOT 1
- Build from source python 3.12 fails HOT 6
- error: OpenCV(4.8.0) /io/opencv/modules/core/src/copy.cpp:71: error: (-215:Assertion failed) cn <= 4 in function 'scalarToRawData'
- ModuleNotFoundError: No module named 'distutils' in latest release HOT 7
- MacOS arm64 wheels missing from PyPI 4.10 release HOT 2
- ImportError: numpy.core.multiarray --- Numpy 2.0.0 HOT 1
- cv2/cv2.abi3.so, 2): Library not loaded: /usr/local/opt/libunistring/lib/libunistring.2.dylib Referenced from: /usr/local/opt/gnutls/lib/libgnutls.30.dylib HOT 1
- When will opencv-python support numpy 2.0? HOT 6
- compile bug
- AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv-python.