Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-medeiros committed Oct 16, 2024
1 parent a34a8d4 commit 1107c24
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,40 @@ 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
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
Expand All @@ -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

Expand Down
4 changes: 0 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1107c24

Please sign in to comment.