ducha-aiki / pymagsac Goto Github PK
View Code? Open in Web Editor NEWMAGSAC: marginalizing sample consensus, python version
License: Other
MAGSAC: marginalizing sample consensus, python version
License: Other
Hi @ducha-aiki - I just thought I'd let you know that the author of the MAGSAC algorithm licensed his repository under the GPL this morning (https://github.com/danini/magsac/blob/master/LICENSE), so you'll need to update this repository to reflect the GPL as well - this codebase can't be licensed under MIT and anyone who uses this would mistakenly violate his license!
Eigen is already installed.
Environment variable was set as: EIGEN3_INCLUDE_DIR=/usr/include/eigen3/Eigen
What happen ?= =
running install
running bdist_egg
running egg_info
writing src/pymagsac.egg-info/PKG-INFO
writing dependency_links to src/pymagsac.egg-info/dependency_links.txt
writing top-level names to src/pymagsac.egg-info/top_level.txt
reading manifest file 'src/pymagsac.egg-info/SOURCES.txt'
writing manifest file 'src/pymagsac.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
-- pybind11 v2.1.1
-- Configuring done
CMake Warning (dev) at lib/pybind11/tools/pybind11Tools.cmake:127 (add_library):
Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target. Run "cmake --help-policy CMP0028" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
Target "pymagsac" links to target "Eigen3::Eigen" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
Call Stack (most recent call first):
CMakeLists.txt:55 (pybind11_add_module)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /data/for_jr/pymagsac/build/temp.linux-x86_64-3.5
[ 33%] Linking CXX shared module ../lib.linux-x86_64-3.5/pymagsac/pymagsac.cpython-35m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lEigen3::Eigen
collect2: error: ld returned 1 exit status
CMakeFiles/pymagsac.dir/build.make:137: recipe for target '../lib.linux-x86_64-3.5/pymagsac/pymagsac.cpython-35m-x86_64-linux-gnu.so' failed
make[2]: *** [../lib.linux-x86_64-3.5/pymagsac/pymagsac.cpython-35m-x86_64-linux-gnu.so] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pymagsac.dir/all' failed
make[1]: *** [CMakeFiles/pymagsac.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 106, in
zip_safe=False,
File "/usr/local/lib/python3.5/dist-packages/setuptools/init.py", line 143, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/usr/lib/python3.5/distutils/command/install_lib.py", line 109, in build
self.run_command('build_ext')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 38, in run
self.build_extension(ext)
File "setup.py", line 69, in build_extension
cwd=self.build_temp)
File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2
Is there a way to estimate Essential Matrix using DefaultEssentialMatrixEstimator() for cameras which don't have camera intrinsic matrices (for eg, 360 degree cameras)
I find pymagsac will be stuck sometimes, it can run tens of minutes and do not stop even when just 40 points. Here is an example.
import numpy as np
import pymagsac
data = np.load('test_data.npz')
for idx in range(100):
print(idx)
F, mask = pymagsac.findFundamentalMatrix(data['p1'], data['p2'], 3.0)
I am able to compile zjhthu's pymagsac: https://github.com/zjhthu/pymagsac, but failed with this version. The title shows one of the errors. I am not sure whether it is due to this version incorporating magsac++, which might cause problems somewhere.
Hi. What does this file "img/graf_model.txt" store?
Hi,
Thank you for the bindings, they're very useful.
Is there any reason why in your implementation the minimum number of samples required for homography estimation is 7, as written here, and not 4?
I tried changing the line to 4 and rebuilt it, but the method started to return None, so I assume there are more changes required.
Hi @ducha-aiki
Thanks for your great work and sharing.
I tried your code on d2-net matching test.
I noticed the Homography results are different even I ran the same data in the same parameters(I mean the same threshold)
which the fluctuations can not be ignored.
Could you give me some suggestions to get a stable result?
python3 ./setup.py install
### gmake[2]: *** [CMakeFiles/pymagsac.dir/src/pymagsac/src/magsac_python.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/pymagsac.dir/all] Error 2
/home/admin/pymagsac/src/pymagsac/graph-cut-ransac/include/sampler.h:70:29: warning: inline function ‘bool gcransac::sampler::Sampler<_DataContainer, _IndexType>::sample(const std::vector&, _IndexType*, size_t) [with _DataContainer = cv::Mat; _IndexType = long unsigned int; size_t = long unsigned int]’ used but never defined [enabled by default]
OLGA_INLINE virtual bool sample(const std::vector<IndexType> &pool,
^
gmake[2]: *** [CMakeFiles/pymagsac.dir/src/pymagsac/src/magsac_python.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/pymagsac.dir/all] Error 2
gmake: *** [all] Error 2
Traceback (most recent call last):
File "./setup.py", line 106, in
zip_safe=False,
File "/usr/local/lib/python3.6/site-packages/setuptools/init.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/usr/local/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 174, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/local/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 160, in call_command
self.run_command(cmdname)
File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/usr/lib64/python3.6/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "./setup.py", line 38, in run
self.build_extension(ext)
File "./setup.py", line 69, in build_extension
cwd=self.build_temp)
File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
This is an amazing repo. Great work!
I wish to know if this is also includes the author's latest MAGSAC++ or if it is just MAGSAC.
Also, is there a way to use this to find the essential matrix?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.