配置和运行 MatchNet CVPR 2015

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

最近一个同学在配置,测试这个网络,但是总是遇到各种问题. 我也尝试了一下,结果也是一堆问题. 这里记录一下.

问题1.  ImportError: No module named leveldb

wangxiao@AHU:~/Downloads/matchnet-master$ ./run_gen_data.sh
Traceback (most recent call last):
File "generate_patch_db.py", line 19, in <module>
import leveldb, numpy as np, skimage
ImportError: No module named leveldb
Traceback (most recent call last):
File "generate_patch_db.py", line 19, in <module>
import leveldb, numpy as np, skimage
ImportError: No module named leveldb
Traceback (most recent call last):
File "generate_patch_db.py", line 19, in <module>
import leveldb, numpy as np, skimage
ImportError: No module named leveldb

可以看到, 总是提示没有这个 leveldb . Ok, 没有就安装就是了:   

wangxiao@AHU:~$ 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

然后,这个问题就解决了.

但是, 新出了一个问题2: No module named caffe.proto 

wangxiao@AHU:~/Downloads/matchnet-master$ ./run_gen_data.sh
Traceback (most recent call last):
File "generate_patch_db.py", line 21, in <module>
from caffe.proto import caffe_pb2
ImportError: No module named caffe.proto
Traceback (most recent call last):
File "generate_patch_db.py", line 21, in <module>
from caffe.proto import caffe_pb2
ImportError: No module named caffe.proto
Traceback (most recent call last):
File "generate_patch_db.py", line 21, in <module>
from caffe.proto import caffe_pb2
ImportError: No module named caffe.proto

Ok, 感觉其实, 这个工程代码没有提示 caffe 该放在哪个文件夹, 是麻烦的问题所在. 那么, 现在只有猜测了.

我们在编译 pycaffe 的时候, 终端有提示我们 caffe.proto 的位置 :

wangxiao@AHU:~/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
wangxiao@AHU:~/Downloads/matchnet-master/caffe-master$

---- to be continued ...

终于找到原因了: 是 caffe 文件夹放置的路径不对 !

我之前一直将 caffe 文件夹放置在下载的  match net 文件夹下, 如下图所示:

但是, 其实这样子是不对的. 应该将下载的代码放到 caffe 文件中, 或者你也可以将 caffe 中的文件 拷贝到 matchnet 文件中.

 然后运行

./run_gen_data.sh 

就可以开始处理数据,然后运行了. 

Acturally, we also need to export path to the environments. like followings: 

  export PATH=/usr/local/cuda-8.0/bin:$PATH
  export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
  export PYTHONPATH=/home/wangxiao/Documents/Siamese_Matching/matchnet-master/python:$PYTHONPATH

with pre-processed data, and we can now test this code with evaluate scripts. 

  $ ./run_eval.sh liberty notredame "--use_gpu --gpu_id=0"


Reference:

@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}
}

Compared with only test this code, we also want to know how to train/finetune the network on our own data ? 
But, how ???

配置和运行 MatchNet CVPR 2015 MatchNet: Unifying Feature and Metric Learning for Patch-Based Matching的更多相关文章

  1. 论文笔记之:MatchNet: Unifying Feature and Metric Learning for Patch-Based Matching

    MatchNet: Unifying Feature and Metric Learning for Patch-Based Matching CVPR  2015 本来都写到一半了,突然笔记本死机了 ...

  2. 论文笔记 — MatchNet: Unifying Feature and Metric Learning for Patch-Based Matching

    论文:https://github.com/ei1994/my_reference_library/tree/master/papers 本文的贡献点如下: 1. 提出了一个新的利用深度网络架构基于p ...

  3. CVPR 2015 papers

    CVPR2015 Papers震撼来袭! CVPR 2015的文章可以下载了,如果链接无法下载,可以在Google上通过搜索paper名字下载(友情提示:可以使用filetype:pdf命令). Go ...

  4. Official Program for CVPR 2015

    From:  http://www.pamitc.org/cvpr15/program.php Official Program for CVPR 2015 Monday, June 8 8:30am ...

  5. hadoop1.2.1配置与运行子串统计程序

    一.虚拟机版本 VirtualBox-4.3.30 二.操作系统 CentOS-6.7-x86_64-bin-DVD1.iso 下载地址1:http://www.centoscn.com/Centos ...

  6. AgileEAS.NET SOA 中间件平台5.2版本下载、配置学习(三):配置ActiveXForm运行环境

    一.前言 AgileEAS.NET SOA 中间件平台是一款基于基于敏捷并行开发思想和Microsoft .Net构件(组件)开发技术而构建的一个快速开发应用平台.用于帮助中小型软件企业建立一条适合市 ...

  7. Editplus配置java运行环境

    Editplus配置java运行环境 下载及安装: editplus官网下载地址:https://www.editplus.com/ 安装方法和安装普通exe应用程序一样,选在安装路径,下一步下一步, ...

  8. mysql5.6.16绿色版配置、运行

    原文:mysql5.6.16绿色版配置.运行 1.从该地址http://dev.mysql.com/downloads/mysql/中选择windows的版本,选择下载. 2.将下载的压缩包解压. 3 ...

  9. LNMP1.3一键安装Linux环境,配置Nginx运行ThinkPHP3.2

    LNMP1.3一键安装Linux环境,配置Nginx运行ThinkPHP3.2 你是否遇见过:安装LNMP1.3环境后,运行ThinkPHP 3.2,只能打开首页,不能访问控制器,报404错误. 按照 ...

随机推荐

  1. html5 随机数函数

    function selec(low,high){var ch=high-low+1;return Math.floor(Math.random()*ch+low);}for (var i = 0; ...

  2. poj2417 Baby-StepGiant-StepAlgorithm a^x=b%P

    #include <iostream> #include <algorithm> #include <string.h> #include <cstdio&g ...

  3. Sitecore CMS中的项目如何配置帮助文本

    如何在Sitecore CMS中的项目上配置帮助文本. 所有Sitecore项目都有长短描述字段,以及“帮助链接”字段.这些字段有助于向内容编辑者提供其他信息.这对于很少编辑的项目和字段尤其重要,因为 ...

  4. ReactiveCocoa(I)

    ReactiveCocoa常见类 1. RAC中最核心的类RACSiganl: RACSiganl:信号类,一般表示将来有数据传递,只要有数据改变,信号内部接收到数据,就会马上发出数据 解析: 信号类 ...

  5. Applegate 方法使用

    1. - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotif ...

  6. Python学习记录之----网络通信(二)

    网络通信   socket 这一节太难了,还是看TA的吧 http://www.cnblogs.com/alex3714/articles/5830365.html 不能执行top等类似的 会持续输出 ...

  7. video control

    function VideoControls(option){ this.id = option.videoId; this.videoId = document.getElementsByTagNa ...

  8. JS-向数组指定位置添加元素

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  9. 英文名为什么最好不用joe?JOE英文名的寓意是什么?

    英文名为什么最好不用joe?JOE英文名的寓意是什么? Joe 的意思是乔,人名.意为,上帝还会赐予 Joe 乔(男子名, 对不相识者非正式的称呼; Joseph的昵称)(=GIJoe)[美俚]美国兵 ...

  10. 算法提高 P0101

    一个水分子的质量是3.0*10-23克,一夸脱水的质量是950克.写一个程序输入水的夸脱数n(0 <= n <= 1e10),然后输出水分子的总数.输入 109.43输出 3.465283 ...