Upload model files
Browse files- README.md +31 -2
- config.json +1 -1
- model-00001-of-00004.safetensors +2 -2
- model-00002-of-00004.safetensors +2 -2
- model-00003-of-00004.safetensors +2 -2
- model-00004-of-00004.safetensors +2 -2
- model.safetensors.index.json +0 -0
README.md
CHANGED
@@ -28,6 +28,35 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
28 |
import torch
|
29 |
|
30 |
# load model
|
31 |
-
model =
|
32 |
-
tokenizer =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
```
|
|
|
28 |
import torch
|
29 |
|
30 |
# load model
|
31 |
+
model = Qwen2_5_VLForConditionalGeneration.from_pretrained("Ricky06662/Seg-Zero-7B")
|
32 |
+
tokenizer = Qwen2_5_VLForConditionalGeneration.from_pretrained("Ricky06662/Seg-Zero-7B")
|
33 |
+
```
|
34 |
+
|
35 |
+
## Installation
|
36 |
+
|
37 |
+
```bash
|
38 |
+
git clone https://github.com/dvlab-research/Seg-Zero.git
|
39 |
+
cd Seg-Zero
|
40 |
+
conda create -n seg_zero python=3.11
|
41 |
+
conda activate seg_zero
|
42 |
+
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1
|
43 |
+
pip install -e .
|
44 |
+
pip install sam2
|
45 |
+
pip install matplotlib
|
46 |
+
```
|
47 |
+
|
48 |
+
## Inference
|
49 |
+
|
50 |
+
```bash
|
51 |
+
python inference_scripts/infer.py
|
52 |
+
```
|
53 |
+
|
54 |
+
The default question is:
|
55 |
+
|
56 |
+
> "the unusual object in the image."
|
57 |
+
|
58 |
+
You will get the thinking process in the command line and the mask will be saved in the **inference_scripts** folder. You can also provide your own image_path and text:
|
59 |
+
|
60 |
+
```bash
|
61 |
+
python inference_scripts/infer.py --image_path "your_image_path" --text "your question text"
|
62 |
```
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "/gpfs/yuqiliu/easyr1_workdir/
|
3 |
"architectures": [
|
4 |
"Qwen2_5_VLForConditionalGeneration"
|
5 |
],
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "/gpfs/yuqiliu/easyr1_workdir/22_run_qwen2_5_vl_7b_refcocog_add_boxl1_kl1e-2_lr1e-6_strict_format_n8/global_step_562/actor/huggingface",
|
3 |
"architectures": [
|
4 |
"Qwen2_5_VLForConditionalGeneration"
|
5 |
],
|
model-00001-of-00004.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:38c48425cee36ddfd4fbbc0b2993f36f06fa4ac8e460c1b79be0b59efc953fdd
|
3 |
+
size 4888372856
|
model-00002-of-00004.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:139ba86b1b9750588060df19471bbcaf4735933e90e98c0433bd7d965397f591
|
3 |
+
size 4930885376
|
model-00003-of-00004.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9d2fd346eb88c8164a9c4c34fef43aa15d9b913ae1f21d2c1d408ccd487fa992
|
3 |
+
size 4490074192
|
model-00004-of-00004.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1d33376846110acadfe1735ebd6309a20235a365289a2b599b75a37c9d2a51ef
|
3 |
+
size 2275082104
|
model.safetensors.index.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|