PyVLAD-change.rar

  • o1_317305
    了解作者
  • 4.8MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-05 05:44
    上传日期
项目操作见https://github.com/jorjasso/VLAD,自己跑的时候发现里面一些代码有一些bug,文件是修改以后测试过的。
PyVLAD-change.rar
  • VLADlib
  • __pycache__
  • VLAD.cpython-37.pyc
    4.7KB
  • Descriptors.cpython-37.pyc
    791B
  • Descriptors.py
    1.1KB
  • VLAD.py
    8.1KB
  • papers
  • nextvlad.pdf
    703.2KB
  • paper.pdf
    1.7MB
  • arandjelovic13.pdf
    1.5MB
  • 05432202.pdf
    1.9MB
  • visualDictionary.py
    1.3KB
  • vladDescriptorsPerPDF.py
    1.6KB
  • pairwiseDistace.py
    1KB
  • vladDescriptors.py
    1.6KB
  • indexBallTree.py
    1.4KB
  • VLADtoCSV.py
    1021B
  • VLADtoPRJ.py
    1.8KB
  • README.md
    5.1KB
  • describe.py
    1.5KB
  • query.py
    2KB
内容介绍
# VLAD This is an extended VLAD implementation based on the original implementation by @jorjasso. **Major changes:** - Descriptor extraction is multi-threaded for a linear speedup, using the `--threads` argument (describe.py) - Visual Dictionary now uses MiniBatchKMeans instead of the regular implementation which falls over with more than a few thousand images. - I recommend setting `--batch-size` to something high like 10,000 (note that the number of descriptors will be a few orders of magnitude greater than the number of images, so batch size of 10k with 10k images is fine). ## Synopsis Python implementation of VLAD for a CBIR system. Reference: --- H. Jégou, F. Perronnin, M. Douze, J. Sánchez, P. Pérez and C. Schmid, "Aggregating Local Image Descriptors into Compact Codes," in IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 34, no. 9, pp. 1704-1716, Sept. 2012. doi: 10.1109/TPAMI.2011.235 ## Code Example A query (-q queries/0706.3046-img-1-22.jpg) looking for the seven most similar images (-r 7) using ORB descriptors (-d ORB) and a visual vocabulary of 16 words (-dV visualDictionary/visualDictionary16ORB.pickle) and a ball-tree data structure as index (-i ballTreeIndexes/index_ORB_W16.pickle) is given by: ```python python query.py -q queries/0706.3046-img-1-22.jpg -r 7 -d ORB -dV visualDictionary/visualDictionary16ORB.pickle -i ballTreeIndexes/index_ORB_W16.pickle ``` You must compute the following first: Descriptors, Visual Dictionaries, ball-tree indexes and VLAD descriptors, see section "Computing VLAD features for a new dataset" below for details. Another examples of queries: SIFT ```python python query.py -q queries/0706.3046-img-1-22.jpg -r 7 -d SIFT -dV visualDictionary/visualDictionary16SIFT.pickle -i ballTreeIndexes/index_SIFT_W16.pickle python query.py -q queries/1403.3290-img-5-14.jpg -r 10 -d SIFT -dV visualDictionary/visualDictionary64SIFT.pickle -i ballTreeIndexes/index_SIFT_W64.pickle python query.py -q queries/0801.2442-img-2-21.jpg -r 3 -d SIFT -dV visualDictionary/visualDictionary256SIFT.pickle -i ballTreeIndexes/index_SIFT_W256.pickle ``` SURF ```python python query.py -q queries/1409.1047-img-3-06.jpg -r 7 -d SURF -dV visualDictionary/visualDictionary256SURF.pickle -i ballTreeIndexes/index_SURF_W256.pickle python query.py -q queries/0903.1780-img-1-32.jpg -r 7 -d SURF -dV visualDictionary/visualDictionary256SURF.pickle -i ballTreeIndexes/index_SURF_W256.pickle python query.py -q queries/1409.1047-img-3-06.jpg -r 7 -d SURF -dV visualDictionary/visualDictionary16SURF.pickle -i ballTreeIndexes/index_SURF_W16.pickle ``` ORB ```python python query.py -q queries/0706.3046-img-1-22.jpg -r 7 -d ORB -dV visualDictionary/visualDictionary16ORB.pickle -i ballTreeIndexes/index_ORB_W16.pickle python query.py -q queries/1506.05863-img-3-21.jpg -r 7 -d ORB -dV visualDictionary/visualDictionary16ORB.pickle -i ballTreeIndexes/index_ORB_W16.pickle ``` ## Computing VLAD features for a new dataset Example VLAD with ORB descriptors with a visual dictionary with 2 visual words and an a ball tree as index. (Of course, 2 visual words is not useful, instead, try 16, 32, 64, or 256 visual words) Remark: Create folders: /ballTreeIndexes, /descriptors, /visualDictionary, /VLADdescriptors 1. compute descriptors from a dataset. The supported descriptors are ORB, SIFT and SURF: ```python python describe.py --dataset dataset --descriptor descriptorName --output output ``` *Example ```python python describe.py --dataset dataset --descriptor ORB --output descriptors/descriptorORB ``` 2. Construct a visual dictionary from the descriptors in path -d, with -w visual words: ```python python visualDictionary.py -d descriptorPath -w numberOfVisualWords -o output ``` *Example : ```python python visualDictionary.py -d descriptors/descriptorORB.pickle -w 2 -o visualDictionary/visualDictionary2ORB ``` 3. Compute VLAD descriptors from the visual dictionary: ```python python vladDescriptors.py -d dataset -dV visualDictionaryPath --descriptor descriptorName -o output ``` *Example : ```python python vladDescriptors.py -d dataset -dV visualDictionary/visualDictionary2ORB.pickle --descriptor ORB -o VLADdescriptors/VLAD_ORB_W2 ``` 4. Make an index from VLAD descriptors using a ball-tree DS: ```python python indexBallTree.py -d VLADdescriptorPath -l leafSize -o output ``` *Example : ```python python indexBallTree.py -d VLADdescriptors/VLAD_ORB_W2.pickle -l 40 -o ballTreeIndexes/index_ORB_W2 ``` 5. Query: ```python python query.py --query image --descriptor descriptor --index indexTree --retrieve retrieve ``` *Example ```python python query.py -q queries/0706.3046-img-1-22.jpg -r 11 -d ORB -dV visualDictionary/visualDictionary2ORB.pickle -i ballTreeIndexes/index_ORB_W2.pickle ``` ## Motivation This project is part of the pipeline of DOCRetrieval project ## Installation First install conda , then: ```python conda create --name openCV-Python numpy scipy scikit-learn matplotlib python=3 source activate openCV-Python conda install -c menpo opencv3=3.1.0 ``` ## Contributor jorge.jorjasso@gmail.com
评论
    相关推荐
    • introduction-to-git:https
      谨慎使用 Git 丸山新平 介绍 本文档旨在以通俗易懂的方式解释 Git 的基本概念和用法。通过阅读本书 易于使用的 Git 你可以使用一个分支 多人可以一起工作 如果你有任何问题,你可以用谷歌找出“我应该查什么词” ...
    • git使用文档
      git使用文档。清晰的pdf版本。一些基础git介绍和使用
    • git 教材 progit
      git资源,不错的git入门教程.适合初学者使用
    • git-kurs:na podstawie https
      git-kurs:na podstawie https
    • Mercurial to Git
      转换脚本 博文链接:https://qianjigui.iteye.com/blog/1561197
    • TVDbLib:httpsGit 克隆
      电视数据库 Git 克隆
    • git-mdp:mdp (https
      git-mdp 用于介绍 git 的甲板
    • git GUI使用
      NULL 博文链接:https://weiliuhong1.iteye.com/blog/2033484
    • kbd:httpsgit.kernel.orgpubscmlinuxkernelgitlegionkbd.git
      git clone git://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git NLS(订单翻译) PO文件通过以下方式维护: : 执照 Kbd已获得GNU通用公共许可(GPL)版本2的许可,或根据您的选择选择更高版本的许可。...
    • progit 中文
      progit 中文版,教你如何使用progit来管理项目中的源码.