{ "info": { "author": "WAN Ji", "author_email": "wanji@live.com", "bugtrack_url": null, "classifiers": [], "description": "=====\nHDIdx\n=====\n\n|pypi|_\n|downloads_month|_\n|license|_\n\n.. |pypi| image:: https://img.shields.io/pypi/v/hdidx.svg?style=flat-square\n.. _pypi: https://pypi.python.org/pypi/hdidx/\n\n.. |downloads_month| image:: https://img.shields.io/pypi/dm/hdidx.svg?style=flat-square\n.. _downloads_month: https://pypi.python.org/pypi/hdidx/\n\n.. |license| image:: https://img.shields.io/pypi/l/hdidx.svg?style=flat-square\n.. _license: https://raw.githubusercontent.com/wanji/hdidx/master/LICENSE.md\n\n**HDIdx**: Indexing High-Dimensional Data\n=========================================\n\nWhat is **HDIdx**?\n------------------\n\n**HDIdx** is a python package for approximate nearest neighbor (ANN)\nsearch. Nearest neighbor (NN) search is very challenging in\nhigh-dimensional space because of the `*Curse of\nDimensionality* `__\nproblem. The basic idea of **HDIdx** is to compress the original feature\nvectors into compact binary codes, and perform approximate NN search\ninstead of extract NN search. This can largely reduce the storage\nrequirements and can significantly speed up the search.\n\nArchitecture\n------------\n\n.. figure:: https://raw.githubusercontent.com/wanji/hdidx/master/doc/framework.png\n\n**HDIdx** has three main modules: 1) ``Encoder`` which can compress the\noriginal feature vectors into compact binary hash codes, 2) ``Indexer``\nwhich can index the database items and search approximate nearest\nneighbor for a given query item, and 3) ``Storage`` module which\nencapsulates the underlying data storage, which can be memory or NoSQL\ndatabase like LMDB, for the ``Indexer``.\n\nThe current version implements following feature compressing algorithms:\n\n- ``Product Quantization``\\ [1].\n- ``Spectral Hashing``\\ [2].\n\nTo use HDIdx, first you should learn a ``Encoder`` from some learning\nvectors. Then you can map the base vectors into hash codes using the\nlearned ``Encoder`` and building indexes over these hash codes by an\n``Indexer``, which will write the indexes to the specified storage\nmedium. When a query vector comes, it will be mapped to hash codes by\nthe same ``Encoder`` and the ``Indexer`` will find the similar items to\nthis query vector.\n\nInstallation\n------------\n\n**HDIdx** can be installed by ``pip``:\n\n.. code:: bash\n\n [sudo] pip install cython\n [sudo] pip install hdidx\n\nBy default, **HDIdx** use kmeans algorithm provided by\n`*SciPy* `__. To be more efficient, you can\ninstall python extensions of `*OpenCV* `__, which\ncan be installed via ``apt-get`` on Ubuntu. For other Linux\ndistributions, e.g. CentOS, you need to compile it from source.\n\n.. code:: bash\n\n [sudo] apt-get install python-opencv\n\n**HDIdx** will use `*OpenCV* `__ automatically if it\nis available.\n\nWindows Guide\n~~~~~~~~~~~~~\n\nGeneral dependencies:\n\n- `Anaconda `__\n- `Microsoft Visual C++ Compiler for\n Python `__\n\nAfter install the above mentioned software, download\n```stdint.h`` `__\nand put it under the ``include`` folder of Visual C++, e.g.\n``C:\\Users\\xxx\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\include``.\nThen hdidx can be installed by ``pip`` from the *Anaconda Command\nPrompt*.\n\nExample\n-------\n\nHere is a simple example. See this\n`notebook `__\nfor more examples.\n\n.. code:: python\n\n # import necessary packages\n\n import hdidx\n import numpy as np\n\n # generating sample data\n ndim = 16 # dimension of features\n ndb = 10000 # number of dababase items\n nqry = 10 # number of queries\n\n X_db = np.random.random((ndb, ndim))\n X_qry = np.random.random((nqry, ndim))\n\n # create Product Quantization Indexer\n idx = hdidx.indexer.IVFPQIndexer()\n # build indexer\n idx.build({'vals': X_db, 'nsubq': 8})\n # add database items to the indexer\n idx.add(X_db)\n # searching in the database, and return top-10 items for each query\n ids, dis = idx.search(X_qry, 10)\n print ids\n print dis\n\nReference\n---------\n\n::\n\n [1] Jegou, Herve, Matthijs Douze, and Cordelia Schmid.\n \"Product quantization for nearest neighbor search.\"\n Pattern Analysis and Machine Intelligence, IEEE Transactions on 33.1 (2011): 117-128.\n [2] Weiss, Yair, Antonio Torralba, and Rob Fergus.\n \"Spectral hashing.\"\n In Advances in neural information processing systems, pp. 1753-1760. 2009.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://wanji.me/hdidx", "keywords": null, "license": "LICENSE.md", "maintainer": null, "maintainer_email": null, "name": "hdidx", "package_url": "https://pypi.org/project/hdidx/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/hdidx/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://wanji.me/hdidx" }, "release_url": "https://pypi.org/project/hdidx/0.2.8.2/", "requires_dist": null, "requires_python": null, "summary": "ANN Search in High-Dimensional Spaces", "version": "0.2.8.2" }, "last_serial": 2976506, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "6a039f5c427b1e377749af1ce32fff07", "sha256": "cce668e8791a960473bebf23ff9e81a8a3ea36fed11f2eee399d1edde6b1b489" }, "downloads": -1, "filename": "hdidx-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6a039f5c427b1e377749af1ce32fff07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6544, "upload_time": "2014-11-04T13:01:28", "url": "https://files.pythonhosted.org/packages/66/b9/17242394bb952a112d801cbbd1f8057c77f1cb644f2f192e36c53744e789/hdidx-0.0.1.tar.gz" } ], "0.0.11": [ { "comment_text": "", "digests": { "md5": "2038959b22c658d86f4cf4ceb31a74f4", "sha256": "001beaea173bee020417d4c3d00a6a59a1cc0d5ee418ec20a62d61b6c5a1fdcd" }, "downloads": -1, "filename": "hdidx-0.0.11.tar.gz", "has_sig": false, "md5_digest": "2038959b22c658d86f4cf4ceb31a74f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10159, "upload_time": "2015-04-02T04:28:13", "url": "https://files.pythonhosted.org/packages/0a/2a/0efd5d927a6af9da576f496579e73835570bffa985fa345a46dcad313e6c/hdidx-0.0.11.tar.gz" } ], "0.0.12": [ { "comment_text": "", "digests": { "md5": "ae93819a746c0b260a3b54d0fd398753", "sha256": "c0cb8d8d9b2cfdcc390ec6fe9ed9c30e17b6cde7466fdca8b6c0a72b488163a8" }, "downloads": -1, "filename": "hdidx-0.0.12.tar.gz", "has_sig": false, "md5_digest": "ae93819a746c0b260a3b54d0fd398753", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10700, "upload_time": "2015-04-04T15:55:35", "url": "https://files.pythonhosted.org/packages/45/1d/11eabacd04cba6bdabdd44ea4ba161f2419fb26d24a0f278cd6e550e4663/hdidx-0.0.12.tar.gz" } ], "0.0.14": [ { "comment_text": "", "digests": { "md5": "fd78f212e0348e9d613f11a619974f7d", "sha256": "f9e9fe9f280c63f70105d9435267d64de22e3bd5a8debe10f173e8157828f9ac" }, "downloads": -1, "filename": "hdidx-0.0.14.tar.gz", "has_sig": false, "md5_digest": "fd78f212e0348e9d613f11a619974f7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12577, "upload_time": "2015-07-25T03:15:56", "url": "https://files.pythonhosted.org/packages/c5/1c/8f03473aca155b04134d623fffd8d6be2378d9b0b8c8fbb229ca69f0678d/hdidx-0.0.14.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "f1657124101b8cda5bdb3d98c04379b6", "sha256": "2164427503db090fb891ce35b50f5f95be6a0879a7d3a8564815336c457f0e27" }, "downloads": -1, "filename": "hdidx-0.0.2.tar.gz", "has_sig": false, "md5_digest": "f1657124101b8cda5bdb3d98c04379b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6545, "upload_time": "2014-11-04T13:03:43", "url": "https://files.pythonhosted.org/packages/ae/e6/8ae8f5456eb375410bb9c46f4dd4e76fd0f891a906d2e61a6329031a2d49/hdidx-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "6ffc0e5e2f0b9c7eeb8bb10128739f96", "sha256": "de527ff33a2c4184d3e57b0cbb6c921c76e857124657d1a6813f1276f414eb15" }, "downloads": -1, "filename": "hdidx-0.0.3.tar.gz", "has_sig": false, "md5_digest": "6ffc0e5e2f0b9c7eeb8bb10128739f96", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6568, "upload_time": "2014-11-04T14:04:00", "url": "https://files.pythonhosted.org/packages/52/db/905c5b6603135421cb676c9bbd539c83380776b37fc3be38c06a090ae9da/hdidx-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "c8a6d9592a4511cc6d586d72bf884d6b", "sha256": "75184cca14bb5ba0de4f097b387818aec32e24d549afdf008b38cbae78cb4f80" }, "downloads": -1, "filename": "hdidx-0.0.4.tar.gz", "has_sig": false, "md5_digest": "c8a6d9592a4511cc6d586d72bf884d6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6583, "upload_time": "2014-11-05T03:19:20", "url": "https://files.pythonhosted.org/packages/aa/a3/16113233ccb482e0d0f504667cf175db3723668a080eb198cf31f8ff254b/hdidx-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "81168bb6e3be18965b37eb3317a82cf4", "sha256": "b3f6667a05f2609427d33b7125d0584b403738f34ab179649b4af15a01be7d57" }, "downloads": -1, "filename": "hdidx-0.0.5.tar.gz", "has_sig": false, "md5_digest": "81168bb6e3be18965b37eb3317a82cf4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7884, "upload_time": "2014-11-05T11:50:27", "url": "https://files.pythonhosted.org/packages/a6/48/25ffb412e053abc1acf39f6142efb74a0184753d49bdd8a173a57fdcf7e1/hdidx-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "5e63ed54b69a4431097d6f3d3fc07253", "sha256": "53704d3076d82fcfba2b7d6c5e76d75e7296a2bfd9acdf8053add2c8446b5aff" }, "downloads": -1, "filename": "hdidx-0.0.6.tar.gz", "has_sig": false, "md5_digest": "5e63ed54b69a4431097d6f3d3fc07253", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7924, "upload_time": "2014-11-05T13:20:34", "url": "https://files.pythonhosted.org/packages/61/77/be6850a004f5f3a3e659d0f1b4bdf04e6deba632d74133ab8b42e09832c9/hdidx-0.0.6.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "700b831bc57cb6a1eed3e93f2bfeba9a", "sha256": "3bc179f352e9791abab0de5e5c707d7c5e17511b88778c65b5d5d4237863086d" }, "downloads": -1, "filename": "hdidx-0.0.8.tar.gz", "has_sig": false, "md5_digest": "700b831bc57cb6a1eed3e93f2bfeba9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9509, "upload_time": "2014-12-11T09:05:40", "url": "https://files.pythonhosted.org/packages/7a/be/483fb89e0f53a8a0eed295dec4809e9530b08b5057d705020a7eba9db44c/hdidx-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "7e7bb3e5343063817bc0bd310f5cfaee", "sha256": "145c06ee9de616b75ac63b3f678f9414420cf32665ccef6eec2b301809b7c027" }, "downloads": -1, "filename": "hdidx-0.0.9.tar.gz", "has_sig": false, "md5_digest": "7e7bb3e5343063817bc0bd310f5cfaee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9891, "upload_time": "2014-12-12T08:13:02", "url": "https://files.pythonhosted.org/packages/11/37/b1d7681270ffbb52c0ce2f6a81d81b0b8c28bccd7f35cd1de60c70bdd591/hdidx-0.0.9.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "c0ccadba1cfbe19eb311ec31fb1e14c7", "sha256": "fd2ac99bd255af851552298433d9796fbe89853906da8072c087eaba1212347d" }, "downloads": -1, "filename": "hdidx-0.1.tar.gz", "has_sig": false, "md5_digest": "c0ccadba1cfbe19eb311ec31fb1e14c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15796, "upload_time": "2015-07-31T13:15:16", "url": "https://files.pythonhosted.org/packages/6b/8d/b2d2d39b928a6e08d8085696d3a76bda7dd3baaaa60d93303752e284cae8/hdidx-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "1d5dfffcd88ba887186f5836c4482403", "sha256": "bb551faca2a6c308d89ad6bc7a94bb77881af85c3e09dececea83c0f700438b8" }, "downloads": -1, "filename": "hdidx-0.2.tar.gz", "has_sig": false, "md5_digest": "1d5dfffcd88ba887186f5836c4482403", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17704, "upload_time": "2015-08-11T03:27:25", "url": "https://files.pythonhosted.org/packages/c0/ba/edca27f3b5fdbab5294c42feca8ed298674ca2904a103421b60bfca05b41/hdidx-0.2.tar.gz" } ], "0.2.1": [], "0.2.2": [ { "comment_text": "", "digests": { "md5": "5c50ee3f9511c8ade63e360a94dc09f9", "sha256": "12eef74e8b47fa913b99767c9c65c2b145cc1210933814762db16f661f3d326d" }, "downloads": -1, "filename": "hdidx-0.2.2.tar.gz", "has_sig": false, "md5_digest": "5c50ee3f9511c8ade63e360a94dc09f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18056, "upload_time": "2015-09-19T06:19:24", "url": "https://files.pythonhosted.org/packages/81/8f/2b9ccc8ff2b42172968e61d2a4966c5e764cf5fd291424e51c8e6d1aa0dc/hdidx-0.2.2.tar.gz" } ], "0.2.8": [ { "comment_text": "", "digests": { "md5": "019430d1a3e4d490cc196a2466319355", "sha256": "ddf5e1778627450675af32652331f2b360aaf7cda4a5934e1f6ba51dddba62a2" }, "downloads": -1, "filename": "hdidx-0.2.8.tar.gz", "has_sig": false, "md5_digest": "019430d1a3e4d490cc196a2466319355", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25907, "upload_time": "2015-10-05T13:13:08", "url": "https://files.pythonhosted.org/packages/a2/d4/76dbcd847412344f32bd88b518868031f7c389b37f721d4337c99321f3a4/hdidx-0.2.8.tar.gz" } ], "0.2.8.1": [ { "comment_text": "", "digests": { "md5": "73d02ea8cae09b30993c0128dbe6b1cd", "sha256": "b0cb3f5b6b946a8d853cd264b653cb60525d5a1a97961a0ec59c83bc808d1907" }, "downloads": -1, "filename": "hdidx-0.2.8.1.tar.gz", "has_sig": false, "md5_digest": "73d02ea8cae09b30993c0128dbe6b1cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25756, "upload_time": "2017-01-10T00:25:15", "url": "https://files.pythonhosted.org/packages/ae/76/d05b85052845eabc99b1454b6a95e66f10139e6e12dcb6cfc9bf60ae87ab/hdidx-0.2.8.1.tar.gz" } ], "0.2.8.2": [ { "comment_text": "", "digests": { "md5": "aaf785e5e0cfadd13b32d53d81b13932", "sha256": "2243e2eb1b056a304578cca17cc88060e01dee4b031be462af730b659f3cf573" }, "downloads": -1, "filename": "hdidx-0.2.8.2.tar.gz", "has_sig": false, "md5_digest": "aaf785e5e0cfadd13b32d53d81b13932", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24402, "upload_time": "2017-06-25T00:40:39", "url": "https://files.pythonhosted.org/packages/69/57/80d49610fa6656f229a37796db48247c8979154fa901884e0e2bb1fe8632/hdidx-0.2.8.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aaf785e5e0cfadd13b32d53d81b13932", "sha256": "2243e2eb1b056a304578cca17cc88060e01dee4b031be462af730b659f3cf573" }, "downloads": -1, "filename": "hdidx-0.2.8.2.tar.gz", "has_sig": false, "md5_digest": "aaf785e5e0cfadd13b32d53d81b13932", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24402, "upload_time": "2017-06-25T00:40:39", "url": "https://files.pythonhosted.org/packages/69/57/80d49610fa6656f229a37796db48247c8979154fa901884e0e2bb1fe8632/hdidx-0.2.8.2.tar.gz" } ] }