{"id":24973004,"url":"https://github.com/weaviate-tutorials/demo-image-search-dogs","last_synced_at":"2025-03-29T06:11:05.384Z","repository":{"id":196854400,"uuid":"694601898","full_name":"weaviate-tutorials/DEMO-image-search-dogs","owner":"weaviate-tutorials","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-01T08:36:40.000Z","size":495,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T18:11:24.987Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weaviate-tutorials.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2023-09-21T10:22:36.000Z","updated_at":"2023-11-01T08:27:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4c84c58-a026-4c39-aca7-787fb9846419","html_url":"https://github.com/weaviate-tutorials/DEMO-image-search-dogs","commit_stats":null,"previous_names":["weaviate-tutorials/demo-image-search-dogs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2FDEMO-image-search-dogs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2FDEMO-image-search-dogs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2FDEMO-image-search-dogs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaviate-tutorials%2FDEMO-image-search-dogs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weaviate-tutorials","download_url":"https://codeload.github.com/weaviate-tutorials/DEMO-image-search-dogs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246145079,"owners_count":20730495,"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":["hacktoberfest"],"created_at":"2025-02-03T18:11:18.079Z","updated_at":"2025-03-29T06:11:05.365Z","avatar_url":"https://github.com/weaviate-tutorials.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dog Search \n\nThis project's origin is [here](https://github.com/weaviate/weaviate-examples/tree/main/nearest-neighbor-dog-search).\n\n## Description\n\nIn this demo, we will use Weaviate to create an image-search application. We'll develop a dog image-search application that lets users upload a photo of a dog and receive a list of dog breeds that are the most similar.\n\n(TODO: Add demo video)\n\n## Used Technologies\n\n- Weaviate Vector DB\n- Python Programming Language (v3.10+)\n- Weaviate Python Client Library\n- Flask (For WebApp interface development)\n- Docker Desktop\n\n### Weaviate Modules\n\n**Image Vectorization**\n\nIn this demonstration, we will work with a dataset of dog images. The current dataset includes ten images of different dog breeds. However, you can easily replace these images with any other dataset to suit your specific use case. To do this, add your images to the `flask-app/static/img` folder and execute the `images-to-base64.py` and `upload-data-objects.py` files.\n\nFor this use case, it's essential that image vectorization captures information about the dogs, such as breed, size, and color. Weaviate's `img2vec-neural` module is designed to solve this problem. It vectorizes each image, enabling semantic similarity-based searches.\n\n**Img2vec-neural Module**\n\nWeaviate's `img2vec-neural` module is a flexible vectorizer that converts images into meaningful vectors. It supports the ResNet-50 model, a Convolutional Neural Network (CNN) trained on the ImageNet database, which contains over 10 million images and 20,000 classes.\n\n## Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n\n- Docker Desktop should be installed and running.\n- Python 3.10 or later should be installed.\n\n## Setup Instructions\n\nNote: We recommend you create a new virtual environment for this.\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate\n```\n\n1. Install the Python packages.\n\n```bash\npip install -r requirements.txt\n```\n\n2. Run the Docker file.\n\n```bash\ndocker compose up\n```\n\n3. Create the class definition.\n\n```bash\npython create-collection.py\n```\n\n4. Convert images to base64 encodings.\n\n```bash\npython images-to-base64.py\n```\n\n5. Upload the encoded images.\n\n```bash\npython upload-data-objects.py\n```\n\n## Usage Instructions\n\n### Run the application.\n\n```bash\npython flask-app/application.py\n```\n\nAccess the application by opening your web browser and visiting http://localhost:5001.\n\n### Run the query\n\nRun the query to see dogs that are under 60 pounds.\n\n```bash\npython query.py\n```\n\n## Dataset License\n\nThe dataset currently contains ten images of different dog breeds. You can also build on this and add your own images to the dataset!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaviate-tutorials%2Fdemo-image-search-dogs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweaviate-tutorials%2Fdemo-image-search-dogs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaviate-tutorials%2Fdemo-image-search-dogs/lists"}