[update] main inference script
This commit is contained in:
52
README.md
52
README.md
@@ -6,9 +6,57 @@ This repository is the official implementation of SAMURAI: Adapting Segment Anyt
|
||||
|
||||
https://github.com/user-attachments/assets/9d368ca7-2e9b-4fed-9da0-d2efbf620d88
|
||||
|
||||
## Code
|
||||
## Getting Started
|
||||
|
||||
Coming soon!
|
||||
#### SAMURAI Installation
|
||||
|
||||
SAM 2 needs to be installed first before use. The code requires `python>=3.10`, as well as `torch>=2.3.1` and `torchvision>=0.18.1`. Please follow the instructions [here](https://github.com/facebookresearch/sam2?tab=readme-ov-file) to install both PyTorch and TorchVision dependencies. You can install **the SAMURAI version** of SAM 2 on a GPU machine using:
|
||||
```
|
||||
cd sam2
|
||||
pip install -e .
|
||||
pip install -e ".[notebooks]"
|
||||
```
|
||||
|
||||
Please see [INSTALL.md](https://github.com/facebookresearch/sam2/blob/main/INSTALL.md) from the original SAM 2 repository for FAQs on potential issues and solutions.
|
||||
```
|
||||
pip install requirements.txt
|
||||
```
|
||||
|
||||
#### SAM 2.1 Checkpoint Download
|
||||
|
||||
```
|
||||
cd checkpoints && \
|
||||
./download_ckpts.sh && \
|
||||
cd ..
|
||||
```
|
||||
|
||||
#### Data Preparation
|
||||
|
||||
Please prepare the data in the following format:
|
||||
```
|
||||
data/LaSOT
|
||||
├── airplane/
|
||||
│ ├── airplane-1/
|
||||
│ │ ├── full_occlusion.txt
|
||||
│ │ ├── groundtruth.txt
|
||||
│ │ ├── img
|
||||
│ │ ├── nlp.txt
|
||||
│ │ └── out_of_view.txt
|
||||
│ ├── airplane-2/
|
||||
│ ├── airplane-3/
|
||||
│ ├── ...
|
||||
├── basketball
|
||||
├── bear
|
||||
├── bicycle
|
||||
...
|
||||
├── training_set.txt
|
||||
└── testing_set.txt
|
||||
```
|
||||
|
||||
#### Main Inference
|
||||
```
|
||||
python scripts/main_inference.py
|
||||
```
|
||||
|
||||
## Acknowledgment
|
||||
|
||||
|
Reference in New Issue
Block a user