From 1107c244ba1f1875b7f8294676763a6d988f4b50 Mon Sep 17 00:00:00 2001 From: luca-medeiros Date: Wed, 16 Oct 2024 10:45:03 +0900 Subject: [PATCH] docs --- README.md | 17 +++++++++++++++-- requirements.txt | 4 ---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3a2fa7e..c41efa7 100644 --- a/README.md +++ b/README.md @@ -21,16 +21,27 @@ Language Segment-Anything is an open-source project that combines the power of i ### Installation +#### Installing PyTorch Dependencies + +Before installing `lang-sam`, please install PyTorch using the following command: + +```bash +pip install torch==2.4.1 torchvision==0.19.1 --extra-index-url https://download.pytorch.org/whl/cu124 + ``` + pip install -U git+https://github.com/luca-medeiros/lang-segment-anything.git + ``` Or Clone the repository and install the required packages: ``` + git clone https://github.com/luca-medeiros/lang-segment-anything && cd lang-segment-anything pip install -e . + ``` #### Docker Installation @@ -38,10 +49,12 @@ pip install -e . Build and run the image. ``` + git clone https://github.com/luca-medeiros/lang-segment-anything && cd lang-segment-anything docker build --tag lang-segment-anything:latest . docker run --gpus all -p 8000:8000 lang-segment-anything:latest -``` + +```` ### Usage @@ -60,7 +73,7 @@ model = LangSAM() image_pil = Image.open("./assets/car.jpeg").convert("RGB") text_prompt = "wheel." results = model.predict([image_pil], [text_prompt]) -``` +```` ## Examples diff --git a/requirements.txt b/requirements.txt index 26def0e..abc556f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,9 +6,5 @@ sam-2 @ git+https://github.com/facebookresearch/segment-anything-2@7e1596c0b6462 supervision==0.23.0 ; python_full_version > '3.10' transformers==4.44.2 uvloop==0.20.0 - - ---extra-index-url https://download.pytorch.org/whl/cu124 torch==2.4.1 ---extra-index-url https://download.pytorch.org/whl/cu124 torchvision==0.19.1