{"id":13602827,"url":"https://github.com/RedisAI/vecsim-demo","last_synced_at":"2025-04-11T13:31:32.086Z","repository":{"id":38026045,"uuid":"418449592","full_name":"RedisAI/vecsim-demo","owner":"RedisAI","description":"Explore vector similarity in Redis","archived":false,"fork":false,"pushed_at":"2023-07-26T18:01:51.000Z","size":13617,"stargazers_count":114,"open_issues_count":4,"forks_count":25,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-02T18:43:18.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedisAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-10-18T10:22:44.000Z","updated_at":"2024-07-25T15:13:47.000Z","dependencies_parsed_at":"2024-01-11T12:27:54.424Z","dependency_job_id":null,"html_url":"https://github.com/RedisAI/vecsim-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisAI%2Fvecsim-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisAI%2Fvecsim-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisAI%2Fvecsim-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisAI%2Fvecsim-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedisAI","download_url":"https://codeload.github.com/RedisAI/vecsim-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223470273,"owners_count":17150525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T18:01:39.212Z","updated_at":"2024-11-07T06:30:25.906Z","avatar_url":"https://github.com/RedisAI.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"readme":"# Visual and Semantic Similarity with Redis\n\nThis demo goes along with the [Announcement of a New Redis Vector Similarity Search](https://redis.com/blog/build-intelligent-apps-redis-vector-similarity-search/)\n\nYou will experiment with two key applications of Vector Similarity Search application using a realistic dataset:\n\n* Semantic Search: Given a sentence check products with semantically similar text in the product keywords\n* Visual Search: Given a query image, find the Top K most \"visually\" similar in the catalogue\n\n# About the Amazon Product dataset\nThe CSV product data used in this demo was derived from the [\"Amazon Berkeley Objects Dataset\"](https://amazon-berkeley-objects.s3.amazonaws.com/index.html)\n\nEach row in the CSV file correspond to a product in the original dataset.\n\n\n# Before you start\n* Install [Git LFS](https://git-lfs.github.com/)\n    * Make sure you initialize LFS by runing\n    ```sh\n    git lfs install\n    ```\n* Docker\n* [Docker Compose](https://docs.docker.com/compose/install/)\n\n# Clone the Repo\n```sh\ngit clone https://github.com/RedisAI/vecsim-demo.git\n```\n# Fire Up the Docker containers\nUse `docker compose` to start up 2 containers:\n* vesim: A redis container with Vector Similarity Search (VSS) on port 6379\n* jupyter: A python notebook server on port 8888 pre-loaded with 4 notebooks\n    * 2 notebooks illustrating how to perform Visual Similarity with Redis VSS\n    * 2 notebooks illustrating how to perform semantic Similarity with Redis VSS\n```sh\ncd vecsim-demo\ndocker compose up\n```\n**NOTE**: The first time you run the above command, it will take 5-10 minutes (depending on your network)\nThe jupyter container downloads a 3.25GB tar file with product images from the [\"Amazon Berkeley Objects Dataset\"](https://amazon-berkeley-objects.s3.amazonaws.com/index.html)\n\n# Launch the Jupyter Notebooks\nMonitor the logs and look out for the link to launch jupyter on your local machine\n![copy the URL](./docs/jupyter-log.png)\nOr run the following:\n```sh\njupyter notebook\n```\n\nOpen a local browser to this link\n\n\n# Step 1: Semantic Similarity - Part I\nOpen this notebook [http://127.0.0.1:8888/notebooks/SemanticSearch1k.ipynb](http://127.0.0.1:8888/notebooks/SemanticSearch1k.ipynb)\n\nRun All Cells and check the outputs\n\nYou will generate embeddings for 1,000 products and perform semantic similarity using two indexing methods(HNSW and brute-force)\n\n# Step 2: Semantic Similarity - Part II\nOpen this notebook [http://127.0.0.1:8888/notebooks/SemanticSearch100k.ipynb](http://127.0.0.1:8888/notebooks/SemanticSearch100k.ipynb)\n\nRun All Cells and check the outputs\n\nYou will load ~100k previously-generated embeddings for the first 100,000 products in the dataset.\nYou'll perform semantic similarity on a larger dataset\n\n# Step 3: Visual Similarity - Part I\nOpen this notebook [http://127.0.0.1:8888/notebooks/VisualSearch1k.ipynb](http://127.0.0.1:8888/notebooks/VisualSearch1k.ipynb)\n\nRun All Cells and check the outputs\n\nYou will generate embeddings for 1,000 product images and perform visual similarity using two indexing methods\n\n# Step 4: Visual Similarity - Part II\nOpen this notebook [http://127.0.0.1:8888/notebooks/VisualSearch100k.ipynb](http://127.0.0.1:8888/notebooks/VisualSearch100k.ipynb)\n\nYou'll perform visual similarity on a larger dataset using two indexing methods (HNSW and brute-force)\n\n# Stop the Docker containers\n```sh\ndocker compose down\n```\n\n# About the Amazon Product data\nThe dataset used in this demo was derived from the [\"Amazon Berkeley Objects Dataset\"](https://amazon-berkeley-objects.s3.amazonaws.com/index.html)\n\nIn particular, each long text field in the product_data.csv was extracted from the original JSON encoded object representing each product.\n\nThanks to Amazon.com for sharing the original dataset. This includes all product data, images and 3D models under the [Creative Commons Attribution-NonCommercial 4.0 International Public License (CC BY-NC 4.0)](https://creativecommons.org/licenses/by-nc/4.0/)\n\nCredit to the creators of the dataset:\nMatthieu Guillaumin Amazon.com\nThomas Dideriksen Amazon.com\nKenan Deng Amazon.com\nHimanshu Arora Amazon.com\nArnab Dhua Amazon.com\nXi (Brian) Zhang Amazon.com\nTomas Yago-Vicente Amazon.com\nJasmine Collins UC Berkeley\nShubham Goel UC Berkeley\nJitendra Malik UC Berkeley\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRedisAI%2Fvecsim-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRedisAI%2Fvecsim-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRedisAI%2Fvecsim-demo/lists"}