Configure and run Matchnet CVPR matchnet:unifying Feature and Metric learning for patch-based Matching

Source: Internet
Author: User

Configuring and running Matchnet CVPR 2015

GitHub: https://github.com/hanxf/matchnet

Recently a classmate in the configuration, testing the network, but always encountered a variety of problems. I also tried, and the result was a bunch of problems. Here's a note.

Question 1. Importerror:no module named Leveldb

[email protected]:~/downloads/matchnet-master$./run_gen_data.sh
Traceback (most recent):
File "generate_patch_db.py", line A, in <module>
import Leveldb, numpy as NP, Skimage
importerror:no module named Leveldb
Traceback (most recent):
File "generate_patch_db.py", line A, in <module>
import Leveldb, numpy as NP, Skimage
importerror:no module named Leveldb
Traceback (most recent):
File "generate_patch_db.py", line A, in <module>
import Leveldb, numpy as NP, Skimage
importerror:no module named Leveldb

As you can see, always prompt without this leveldb . Ok, there is no installation is:  

[email protected]:~$ pip install leveldb
collecting Leveldb
downloading leveldb-0.194.tar.gz (228kB)
100% |████████████████████████████████| 235kB 13kb/s
Building Wheels for collected packages:leveldb
Running setup.py bdist_wheel for leveldb ... done
Stored in directory:/home/wangxiao/.cache/pip/wheels/36/8f/73/ 51df0d55dae7b540bc560eb223fff5f909033954552eae8d15
successfully built Leveldb
Installing collected Packages:leveldb
successfully installed leveldb-0.194

Then, the problem is solved.

But there 's a new problem. 2: No module named Caffe.proto

[email protected]:~/downloads/matchnet-master$./run_gen_data.sh
Traceback (most recent):
File "generate_patch_db.py", line, in <module>
From caffe.proto import CAFFE_PB2
importerror:no module named Caffe.proto
Traceback (most recent):
File "generate_patch_db.py", line, in <module>
From caffe.proto import CAFFE_PB2
importerror:no module named Caffe.proto
Traceback (most recent):
File "generate_patch_db.py", line, in <module>
From caffe.proto import CAFFE_PB2
importerror:no module named Caffe.proto

Ok, feel in fact, this project code does not prompt Caffe to put in which folder, is the problem of trouble.  Well, now it's only speculation.

We compile the Pycaffe, the terminal has prompted US Caffe.proto location:

[Email protected]:~/downloads/matchnet-master/caffe-master$ make Pycaffe
Cxx/ld-o python/caffe/_caffe.so Python/caffe/_caffe.cpp
Touch python/caffe/proto/__init__.py
Protoc (python) Src/caffe/proto/caffe.proto
[Email protected]:~/downloads/matchnet-master/caffe-master$

Finally found the reason: is the Caffe folder placement of the wrong path!

I've been placing the Caffe folder under the downloaded Match Net Folder, as shown in:

However, this is not the way it is. You should put the downloaded code in the Caffe file, or you can copy the files in the Caffe to the Matchnet file.

And then run





@inproceedings{matchnet_cvpr_15,  Author = {Han, Xufeng and Leung, Thomas and Jia, Yangqing and Sukthankar, Rahul and Berg, Alexander. C.},  Booktitle = {CVPR},  Title = {MatchNet: Unifying Feature and Metric Learning for Patch-Based Matching},  Year = {2015}}

Configure and run Matchnet CVPR matchnet:unifying Feature and Metric learning for patch-based Matching

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.