https://github.com/haltakov/natural-language-youtube-search
Search inside YouTube videos using natural language
https://github.com/haltakov/natural-language-youtube-search
clip computer-vision machine-learning search youtube
Last synced: about 1 month ago
JSON representation
Search inside YouTube videos using natural language
- Host: GitHub
- URL: https://github.com/haltakov/natural-language-youtube-search
- Owner: haltakov
- License: mit
- Created: 2021-02-01T21:59:25.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-15T10:44:05.000Z (over 3 years ago)
- Last Synced: 2024-10-28T06:01:35.661Z (6 months ago)
- Topics: clip, computer-vision, machine-learning, search, youtube
- Language: Jupyter Notebook
- Homepage:
- Size: 24.2 MB
- Stars: 915
- Watchers: 14
- Forks: 72
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-CLIP - [code
- awesome-semantic-search - natural-language-youtube-search
README
# Natural Language YouTube Search
[](https://colab.research.google.com/github/haltakov/natural-language-youtube-search/blob/main/natural-language-youtube-search.ipynb)
Use [OpenAI's CLIP](https://openai.com/blog/clip/) neural network to search inside YouTube videos. You can try it by running the [notebook](https://colab.research.google.com/github/haltakov/natural-language-youtube-search/blob/main/natural-language-youtube-search.ipynb) on Google Colab.
# New
* Integrated to [Huggingface Spaces](https://huggingface.co/spaces) with [Gradio](https://github.com/gradio-app/gradio). See demo: [](https://huggingface.co/spaces/akhaliq/Video_Search_CLIP)
## How it works
1. Download the YouTube video
2. Extract every N-th frame
3. Encode all frames using CLIP
4. Encode a natural language search query using CLIP
5. Find the images that best match the search queryFor more details see the [notebook](https://colab.research.google.com/github/haltakov/natural-language-youtube-search/blob/main/natural-language-youtube-search.ipynb).
## Examples
Here are some example searches from this [YouTube video](https://www.youtube.com/watch?v=PGMu_Z89Ao8) of a car driving around San Francisco.
### "A fire truck"


### "Road works"


### "People crossing the street"


### "The Embarcadero"


### "Waiting at the red light"


### "Green bike lane"


### "A street with tram tracks"


### "The Transamerica Pyramid"


## Natural language search on Unsplah
You can also try my other project to search from 2M photos on [Unsplash](https://unsplash.com/) using natural language queries:
#### [Natural Language Image Search](https://github.com/haltakov/natural-language-image-search)