rom1504 / clip-retrieval

Easily compute clip embeddings and build a clip retrieval system with them
https://rom1504.github.io/clip-retrieval/
MIT License
2.4k stars 209 forks source link

Build an end to end command #31

Open rom1504 opened 3 years ago

rom1504 commented 3 years ago

Url list -> filtering (dedup) -> downloading -> clip inference -> indexing -> back + front (subprocess or host with back too)

clip-retrieval end2end <url list> <config.json>

It would start a prefect UI with what's going on and wandb links for each subtask Then after a small while, it will start the back and front and open the demo in the browser

Build it with prefect, use a good config framework (fromconfig ?)

Would be ideal to make it incremental and schedulable too. Making it distributed potentially could also be interesting but not necessary.

rom1504 commented 3 years ago

Could even consider having some optional stats computation and even trainings at the end. A full dataset construction pipeline starting from urls. Important point:

rom1504 commented 3 years ago

result will look like this https://colab.research.google.com/github/criteo/autofaiss/blob/master/docs/notebooks/autofaiss_multimodal_search.ipynb but bette packaged

rom1504 commented 3 years ago

https://github.com/rom1504/img2dataset#api

the config is important. Figure out a way to expose all options and yet do the right things by default with as few as possible necessary arguments to pass

rom1504 commented 2 years ago

it should be possible to do url list -> index + metadata store at almost no memory usage and in one step when

would look like this: clip-retrieval end2end <url list> <output path> that would use for laion400m:

interesting possibility but might not be that important vs working incrementally

rom1504 commented 2 years ago

the basic is now done

next:

rom1504 commented 2 years ago

config modes:

Each one will be useful for maximum convenience or configurability

rom1504 commented 2 years ago

also consider the option of having end2end be an example and let people do their preferred config in python