First give
the open source code address of the code address LIFT. The
origin is that one day I saw the following article:
Deep learning combined with the research ideas of SLAM
found this open source code. If you add it to Biseli, it can be an innovation. So he started.
Don't configure the environment according to the author's instructions, no, follow this article: The configuration code running environment record of the big brother
emphasizes that I am running on a virtual machine, 16.04 is unsuccessful according to the above article, numpy The version is also killed in version 1.11. I ca n’t mention 1.16. I do n’t know why, the operation will report an error, suggesting that python ca n’t find numpy.core or something, and running numpy.test () in python will also report an error.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib/python2.7/dist-packages/numpy/core/tests/test_indexing.py", line 17, in <module>
cdll = np.ctypeslib.load_library('multiarray', np.core.multiarray.__file__)
File "/usr/lib/python2.7/dist-packages/numpy/ctypeslib.py", line 163, in load_library
raise OSError("no file with expected extension")
OSError: no file with expected extension
The solution given by foreigners
is to upgrade the numpy version.
What if I can't get up?
Install another ubuntu14.06 in the virtual machine.
This time numpy is going well.
If the error can not find cv2 run run.sh statement using sudo apt-get install python-opencv
methods source
Gangster configuration is gpu, I was AMD's notebook, 2500U, it is a virtual machine, CUDA what can be sidelined. Can only find a way to use the CPU. The
following is the CPU configuration method.
1 configure theano
sudo gedit ~/.theanorc
Write in the document
[global]
floatX = float32
device = cpu
#!/bin/bash
# ------------------------------------------------------------
# Example script for running LIFT
# Open MP Settings
export OMP_NUM_THREADS=1
# Cuda Settings
export CUDA_VISIBLE_DEVICES=0
# Theano Flags
export THEANO_FLAGS="device=gpu0,${THEANO_FLAGS}"
# ------------------------------------------------------------
# LIFT code settings
# Number of keypoints
_LIFT_NUM_KEYPOINT=1000
# Whether to save debug image for keypoints
_LIFT_SAVE_PNG=1
# Whether the use Theano when keypoint testing. CuDNN is required when turned
# on
_LIFT_USE_THEANO=0 <<<<<<主要把它从1改成0
3 Modify the compute_detector.py
file in the python-code folder
line 245
test_res_list += [np.pad(test_res,
int((param.model.nFilterSize - 1) / 2),
mode='edge')] <<<<修改后使用的
#mode='constant', <<<<原代码使用的
#constant_values=-np.inf)] <<<<<<原代码使用的,会报错-np.inf
This is almost the same.
Run run.sh to get a picture full of circles.
You are done . You successfully run LIFT in CPU mode.