# CLIP Image to Text search

**URL:** <https://discuss.huggingface.co/t/clip-image-to-text-search/28127>\
**Category:** Beginners\
**Created:** [December 19, 2022, 3:34pm UTC](https://discuss.huggingface.co/t/clip-image-to-text-search/28127 "2022-12-19T15:34:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![johncash1990](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@johncash1990](https://discuss.huggingface.co/u/johncash1990)\
**Post date:** [December 19, 2022, 3:34pm UTC](https://discuss.huggingface.co/t/clip-image-to-text-search/28127/1 "2022-12-19T15:34:55Z")

</div>

Hi! I would like to use the CLIP model for image to text search (captioning).

Given an image I would like to retrieve the most similar text in the latent space I suppose, which is one that was already in the training data right? I wouldn’t be able to retrieve a generated text from the latent space for the specific image?

How would I go about it? I guess I would need to write a decoder for that?

Best wishes
