Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4465360
  • 博文数量: 356
  • 博客积分: 10458
  • 博客等级: 上将
  • 技术积分: 4734
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-24 14:59
文章分类

全部博文(356)

文章存档

2020年(17)

2019年(9)

2018年(26)

2017年(5)

2016年(11)

2015年(20)

2014年(2)

2013年(17)

2012年(15)

2011年(4)

2010年(7)

2009年(14)

2008年(209)

分类: 大数据

2018-06-07 20:12:21

delf作用有点类似于常见的特征点匹配比如orb, sift, surf等,只是它是深度模型
从网上下载tensorflow的models代码,然后进入delf的python代码目录,这一步很重要,不然后面可能会有错误ImportError: No module named delf
cd ~/workspace/flower/models/research/delf/delf/python/examples


Oxford buildings dataset 牛津建筑物数据库
mkdir data && cd data
wget ~vgg/data/oxbuildings/oxbuild_images.tgz
mkdir oxford5k_images oxford5k_features
tar -xvzf oxbuild_images.tgz -C oxford5k_images/
cd ../
echo data/oxford5k_images/hertford_000056.jpg >> list_images.txt
echo data/oxford5k_images/oxford_000317.jpg >> list_images.txt


模型文件
mkdir parameters && cd parameters
wget
tar -xvzf delf_v1_20171026.tar.gz
cd ../


对hertford_000056.jpg oxford_000317.jpg 提取特征点,以便后续进行图片相似匹配
python extract_features.py \
  --config_path examples/delf_config_example.pbtxt \
  --list_images_path list_images.txt \
  --output_dir data/oxford5k_features


开始匹配
python match_images.py \
  --image_1_path data/oxford5k_images/hertford_000056.jpg \
  --image_2_path data/oxford5k_images/oxford_000317.jpg \
  --features_1_path data/oxford5k_features/hertford_000056.delf \
  --features_2_path data/oxford5k_features/oxford_000317.delf \
  --output_image matched_images.png
结果是产生一张新图片matched_images.png, 会把匹配的点用线连接起来显示在图片中


安装过程其他的一些问题:
1) 在安装matplotlib库时有可能会出错
gcc: error: unrecognized command line option ‘-fstack-clash-protection’
gcc: error: unrecognized command line option ‘-fstack-clash-protection’
gcc版本需要在5.4以上,如果是低于这个版本的,则安装新的版本。


2) Failed to build subprocess32
object-detection 0.1 requires Cython>=0.28.1, which is not installed.
object-detection 0.1 requires Pillow>=1.0, which is not installed.
pip install Pillow Cython


3) ImportError: No module named Tkinter
系统需要安装python-tk

作者:帅得不敢出门


阅读(3998) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~