From 4432ca3201a77e506a06134823286cdab8068d75 Mon Sep 17 00:00:00 2001 From: FengLi-ust Date: Sun, 16 Jul 2023 19:23:32 -0700 Subject: [PATCH] add demo --- .gitignore | 4 ++-- README.md | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index faff260..aa3c870 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ __pycache__ */__pycache__ */*/__pycache__ */*/*/__pycache__ -.gitignore -.gitattributes +*.gitignore +*.gitattributes diff --git a/README.md b/README.md index fbfa7c0..2a03552 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,16 @@ The currently released checkpoints are only trained with SA-1B data. +### Demo +For interactive segmentation. +```shell +python demo.py +``` +For mask auto-generation. +```shell +python demo_auto_generation.py +``` + ### Evaluation We do zero-shot evaluation on COCO val2017. `$n` is the number of gpus you use @@ -120,13 +130,7 @@ python train_net.py --resume --num-gpus $n --config-file configs/semantic_sam_o python train_net.py --resume --num-gpus $n --config-file configs/semantic_sam_reproduce_sam_swinL.yaml COCO.TEST.BATCH_SIZE_TOTAL=$n SAM.TEST.BATCH_SIZE_TOTAL=$n SAM.TRAIN.BATCH_SIZE_TOTAL=$n MODEL.WEIGHTS=/path/to/weights ``` This is a swinL backbone. The only difference of this script is to use many-to-one matching and 3 prompts as in SAM. -### Demo -```shell -python demo.py -``` -```shell -python demo_auto_generation.py -``` + ## Comparison with SAM and SA-1B Ground-truth ![compare_sam_v3](https://github.com/UX-Decoder/Semantic-SAM/assets/34880758/6c7b50eb-6fe4-4a4f-b3cb-71920e30193e)