Skip to content

Commit bd8187f

Browse files
committed
Updata README.md
1 parent e2177b5 commit bd8187f

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Polyp-Gen
22

3-
# 🛠Setup
3+
## Setup
44

55
```bash
66
git clone https://github.com/Saint-lsy/Polyp-Gen.git
@@ -14,15 +14,27 @@ pip install -r requirements.txt
1414
This model was trained by [LDPolypVideo](https://github.com/dashishi/LDPolypVideo-Benchmark) dataset.
1515

1616
We filtered out some low-quality images with blurry, reflective, and ghosting effects, and finally select 55,883 samples including 29,640 polyp frames and 26,243 non-polyp frames.
17-
## Checkpoint
18-
You can download the chekpoints of our Polyp_Gen on [HuggingFace](https://huggingface.co/Saint-lsy/Polyp-Gen-sd2-inpainting/tree/main)
1917

20-
## Sampling with Specified Mask
18+
Our dataset can be downloaded at [here](https://mycuhk-my.sharepoint.com/:u:/g/personal/1155225283_link_cuhk_edu_hk/EXcpsGPTYEBAiIuGOqpRTlQBgzc7uYgrkfP1BLo11_t63w?e=hP9W2g).
19+
20+
## Training
21+
The pre-trained model is Stable Diffusion Inpainting-2, availble on [Huggingface](https://huggingface.co/stabilityai/stable-diffusion-2-inpainting)
22+
23+
You can train your own model using the script:
24+
```bash
25+
bash scripts/train.sh
2126
```
27+
## Sampling
28+
29+
### Checkpoint
30+
You can download the chekpoints of our Polyp_Gen from [here](https://huggingface.co/Saint-lsy/Polyp-Gen-sd2-inpainting/tree/main).
31+
### Sampling with Specified Mask
32+
```bash
2233
python sample_one_image.py
2334
```
35+
### Sampling with Mask Proposer
36+
The weight of pretrained DINOv2 can be found [here](https://github.com/salihmarangoz/dinov2).
2437

25-
## Sampling with Mask Proposer
2638
The first step is building database and Global Retrieval.
2739
```bash
2840
python GlobalRetrieval.py --data_path /path/of/non-polyp/images --database_path /path/to/build/database --image_path /path/of/query/image/
@@ -37,3 +49,7 @@ python LocalMatching.py --ref_image demos/img_1513_neg.jpg --ref_mask demos/mas
3749
```
3850

3951
The third step is using the generated Mask to sample.
52+
## Acknowledgements
53+
The code is based on the following projects. Greatly thanks to these authors!
54+
- [Diffusers](https://github.com/huggingface/diffusers)
55+
- [DINOv2](https://github.com/salihmarangoz/dinov2)

0 commit comments

Comments
 (0)