Skip to content

Commit

Permalink
Update install instructions
Browse files Browse the repository at this point in the history
Recommending the stable 0.5.4 version for now. 
0.6.0 supports BLIP2 but requires newer transformers version and could use more love still.
  • Loading branch information
pharmapsychotic authored Mar 28, 2023
1 parent 3385e53 commit f4429b4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ Install with PIP
pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu117
# install clip-interrogator
pip install clip-interrogator==0.6.0
pip install clip-interrogator==0.5.4
# or for very latest WIP with BLIP2 support
#pip install clip-interrogator==0.6.0
```

You can then use it in your script
Expand Down Expand Up @@ -69,7 +72,7 @@ On systems with low VRAM you can call `config.apply_low_vram_defaults()` to redu
See the [run_cli.py](https://github.com/pharmapsychotic/clip-interrogator/blob/main/run_cli.py) and [run_gradio.py](https://github.com/pharmapsychotic/clip-interrogator/blob/main/run_gradio.py) for more examples on using Config and Interrogator classes.


## Ranking against your own list of terms
## Ranking against your own list of terms (requires version 0.6.0)

```python
from clip_interrogator import Config, Interrogator, LabelTable, load_list
Expand All @@ -80,4 +83,4 @@ image = Image.open(image_path).convert('RGB')
table = LabelTable(load_list('terms.txt'), 'terms', ci)
best_match = table.rank(ci.image_to_features(image), top_count=1)[0]
print(best_match)
```
```

0 comments on commit f4429b4

Please # to comment.