{"id":13583647,"url":"https://github.com/tuan3w/visual_search","last_synced_at":"2025-04-06T21:32:39.478Z","repository":{"id":150088871,"uuid":"84587139","full_name":"tuan3w/visual_search","owner":"tuan3w","description":"A visual search engine based on Elasticsearch and Tensorflow","archived":true,"fork":false,"pushed_at":"2020-09-25T22:20:15.000Z","size":1294,"stargazers_count":444,"open_issues_count":1,"forks_count":126,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-05-22T20:34:12.359Z","etag":null,"topics":["docker","elasticsearch","tensorflow","visual-search"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/tuan3w.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,"dei":null}},"created_at":"2017-03-10T18:02:24.000Z","updated_at":"2024-04-02T17:40:49.000Z","dependencies_parsed_at":"2023-06-05T06:00:27.148Z","dependency_job_id":null,"html_url":"https://github.com/tuan3w/visual_search","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuan3w%2Fvisual_search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuan3w%2Fvisual_search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuan3w%2Fvisual_search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuan3w%2Fvisual_search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuan3w","download_url":"https://codeload.github.com/tuan3w/visual_search/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247556092,"owners_count":20957900,"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":["docker","elasticsearch","tensorflow","visual-search"],"created_at":"2024-08-01T15:03:40.467Z","updated_at":"2025-04-06T21:32:38.959Z","avatar_url":"https://github.com/tuan3w.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# Visual Search\nA visual search engine based on Elasticsearch and Tensorflow (now fully dockerized\nto run it in up-to-date development environments).\n\n![Visual search enging](visual_search/images/screenshot.png)\n\n\n## Description\n\nThis repository contains code in `Python 2.7` and utilizes `Faster-RCNN` (with `VGG-16` as backbone)\nimplemented in `Tensorflow 0.12.1` to extract features from images. An\n`Elasticsearch` instance is used to store feature vectors of the corresponding images,\nalong with a plugin to compute distance between them.\n\n**TODO**: Replace the outdated `Faster-RCNN` with a faster and more\naccurate model (suggestions or any collaboration is welcomed).\n\n## Requirements\n\nThe setup assumes you have a running installation of\n[nvidia-docker](https://github.com/NVIDIA/nvidia-docker) and driver version 367.48\nor above.\n\n## Setup Elasticsearch\n\nFirst, we need to build the `Elasticsearch` plugin to compute distance between\nfeature vectors. Make sure that you have [Maven](https://maven.apache.org/) installed.\n\n```bash\ncd elasticsearch/es-plugin\nmvn install\n```\nNext, we need to create a [docker network](https://docs.docker.com/engine/reference/commandline/network/)\nso that all other containers can resolve the IP address of our `elasticsearch`\ninstance.\n\n```bash\ndocker network create vs_es_net\n```\nFinally, start the `elasticsearch` container. It will automatically add the plugin, create a\n[named docker volume](https://docs.docker.com/storage/volumes/) for persistent\nstorage and connect the container to the network we just created:\n\n```bash\ncd ../ \u0026\u0026 docker-compose up -d\n```\n\n## Index images\n\nIn order to populate the `elasticsearch` db with images, we need to first process\nthem with a feature extractor (`Faster-RCNN`). The `indexer` services\ncan do this for any image we place inside `visual_search/images`.\n\nFirst we build a dockerized environment for the object detection model to run in:\n\n```bash\ncd visual_search \u0026\u0026 docker build --tag visual_search_env .\n```\nHere we use an earlier version implemented by [@Endernewton](https://github.com/endernewton).\nTo get pre-trained model, you can visit [release section](https://github.com/tuan3w/visual_search/releases),\ndownload and extract file `model.tar.gz` to `visual_search/models/` folder. Optionally,\nyou can run:\n\n```bash\nmkdir models \u0026\u0026 cd models\ncurl https://github.com/tuan3w/visual_search/releases/download/v0.0.1/model.tar.gz\ntar -xvf model.tar.gz\n```\n\nTo index the desired images, copy the corresponding compose file to the proper\ndirectory and start the indexing service:\n\n```bash\ncd ../ \u0026\u0026 cp indexer/docker-compose.yml .\ndocker-compose up\n```\n\n## Start server\n\nBefore starting the server, again copy the corresponding compose file (overwrite\nthe one used for indexing data) into the proper directory and start the containerized\n`flask` server:\n\n```bash\ncp server/docker-compose.yml .\ndocker-compose up -d\n```\n\n Now, you can access the link `http://localhost:5000/static/index.html` to test the search engine.\n\n## LICENSE\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuan3w%2Fvisual_search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuan3w%2Fvisual_search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuan3w%2Fvisual_search/lists"}