{"id":13528036,"url":"https://github.com/haltakov/natural-language-image-search","last_synced_at":"2026-01-16T14:18:45.228Z","repository":{"id":41270937,"uuid":"330162907","full_name":"haltakov/natural-language-image-search","owner":"haltakov","description":"Search photos on Unsplash using natural language","archived":false,"fork":false,"pushed_at":"2022-10-13T21:20:00.000Z","size":10161,"stargazers_count":1004,"open_issues_count":6,"forks_count":103,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-01T11:37:51.921Z","etag":null,"topics":["clip","computer-vision","image-search","machine-learning","photos","unsplash"],"latest_commit_sha":null,"homepage":"","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/haltakov.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}},"created_at":"2021-01-16T12:57:18.000Z","updated_at":"2025-03-13T06:43:11.000Z","dependencies_parsed_at":"2023-01-19T23:32:12.205Z","dependency_job_id":null,"html_url":"https://github.com/haltakov/natural-language-image-search","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/haltakov/natural-language-image-search","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haltakov%2Fnatural-language-image-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haltakov%2Fnatural-language-image-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haltakov%2Fnatural-language-image-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haltakov%2Fnatural-language-image-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haltakov","download_url":"https://codeload.github.com/haltakov/natural-language-image-search/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haltakov%2Fnatural-language-image-search/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["clip","computer-vision","image-search","machine-learning","photos","unsplash"],"created_at":"2024-08-01T06:02:10.867Z","updated_at":"2026-01-16T14:18:45.210Z","avatar_url":"https://github.com/haltakov.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook","Applications"],"sub_categories":["Information Retrieval"],"readme":"# Unsplash Image Search\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/haltakov/natural-language-image-search/blob/main/colab/unsplash-image-search.ipynb)\n\nSearch photos on Unsplash using natural language descriptions. The search is powered by OpenAI's [CLIP model](https://github.com/openai/CLIP) and the [Unsplash Dataset](https://unsplash.com/data).\n\n### \"Two dogs playing in the snow\"\n\n![Search results for \"Two dogs playing in the snow\"](images/example_dogs.png)\n\u003csub\u003ePhotos by [Richard Burlton](https://unsplash.com/@richardworks?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral), [Karl Anderson](https://unsplash.com/@karlkiwi90?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral) and [Xuecheng Chen](https://unsplash.com/@samaritan_?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral) on [Unsplash](https://unsplash.com/?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral).\u003c/sub\u003e\n\n### \"The word love written on the wall\"\n\n![Search results for \"The word love written on the wall\"](images/example_love.png)\n\u003csub\u003ePhotos by [Genton Damian](https://unsplash.com/@damiangenton96?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral) , [Anna Rozwadowska](https://unsplash.com/@arozwadowska?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral), [Jude Beck](https://unsplash.com/@judebeck?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral) on [Unsplash](https://unsplash.com/?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral).\u003c/sub\u003e\n\n### \"The feeling when your program finally works\"\n\n![Search results for \"The feeling when your program finally works\"](images/example_feeling.png)\n\u003csub\u003ePhotos by [bruce mars](https://unsplash.com/@brucemars?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral), [LOGAN WEAVER](https://unsplash.com/@lgnwvr?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral), [Vasyl Skunziak](https://unsplash.com/@vskvsk1?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral) on [Unsplash](https://unsplash.com/?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral).\u003c/sub\u003e\n\n### \"The Syndey Opera House and the Harbour Bridge at night\"\n\n![Search results for \"The Syndey Opera House and the Harbour Bridge at night\"](images/example_sydney.png)\n\u003csub\u003ePhotos by [Dalal Nizam](https://unsplash.com/@dilson?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral) and [Anna Tremewan](https://unsplash.com/@annatre?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral) on [Unsplash](https://unsplash.com/?utm_source=NaturalLanguageImageSearch\u0026utm_medium=referral).\u003c/sub\u003e\n\n## How It Works?\n\nOpenAI's [CLIP](https://openai.com/blog/clip/) neural network is able to transform both images and text into the same latent space, where they can be compared using a similarity measure.\n\nFor this project, all photos from the full [Unsplash Dataset](https://unsplash.com/data) (almost 2M photos) were downloaded and processed with CLIP.\n\nThe pre-computed feature vectors for all images can then be used to find the best match to a natural language search query.\n\n## How To Run The Code?\n\n### On Google Colab\n\nIf you just want to play around with different queries jump to the [Colab notebook](https://colab.research.google.com/github/haltakov/natural-language-image-search/blob/main/colab/unsplash-image-search.ipynb).\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/haltakov/natural-language-image-search/blob/main/colab/unsplash-image-search.ipynb)\n\n### On your machine\n\nBefore running any of the code, make sure to install all dependencies:\n\n```\npip install -r requirements.txt\n```\n\nIf you want to run all the code yourself open the Jupyter notebooks in the order they are numbered and follow the instructions there:\n\n- `01-setup-clip.ipynb` - setup the environment checking out and preparing the CLIP code.\n- `02-download-unsplash-dataset.ipynb` - download the photos from the Unsplash dataset\n- `03-process-unsplash-dataset.ipynb` - process all photos from the dataset with CLIP\n- `04-search-image-dataset.ipynb` - search for a photo in the dataset using natural language queries\n- `09-search-image-api.ipynb` - search for a photo using the Unsplash Search API and filter the results using CLIP.\n\n\u003e NOTE: only the Lite version of the Unsplash Dataset is publicly available. If you want to use the Full version, you will need to [apply](https://unsplash.com/data) for (free) access.\n\n\u003e NOTE: searching for images using the Unsplash Search API doesn't require access to the Unsplash Dataset, but will probably deliver worse results.\n\n## Acknowledgements\n\nThis project was inspired by these projects:\n\n- [Beyond tags and entering the semantic search era on images with OpenAI CLIP](https://towardsdatascience.com/beyond-tags-and-entering-the-semantic-search-era-on-images-with-openai-clip-1f7d629a9978) by [Ramsri Goutham Golla](https://twitter.com/ramsri_goutham)\n- [Alph, The Sacred River](https://github.com/thoppe/alph-the-sacred-river) by [Travis Hoppe](https://twitter.com/metasemantic)\n- [OpenAI's CLIP](https://github.com/openai/CLIP)\n- [Unsplash](https://unsplash.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaltakov%2Fnatural-language-image-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaltakov%2Fnatural-language-image-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaltakov%2Fnatural-language-image-search/lists"}