Skip to content

Commit

Permalink
revise readme
Browse files Browse the repository at this point in the history
  • Loading branch information
KyanChen committed Feb 27, 2024
1 parent 866b605 commit 62223b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ sh ./tools/dist_test.sh configs/TTP/xxx.py ${CHECKPOINT_FILE} ${GPU_NUM} # xxx.
#### 单张图像预测:

```shell
python demo/image_demo_with_cdinferencer.py ${IMAGE_FILE1} ${IMAGE_FILE2} configs/TTP/ttp_sam_large_levircd_infer.py --weights ${CHECKPOINT_FILE} --out-dir ${OUTPUT_DIR} # IMAGE_FILE 为你想要预测的图像文件,xxx.py 为使用的配置文件,CHECKPOINT_FILE 为你想要使用的检查点文件,OUTPUT_DIR 为预测结果的输出路径
python demo/image_demo_with_cdinferencer.py ${IMAGE_FILE1} ${IMAGE_FILE2} configs/TTP/ttp_sam_large_levircd_infer.py --checkpoint ${CHECKPOINT_FILE} --out-dir ${OUTPUT_DIR} # IMAGE_FILE 为你想要预测的图像文件,xxx.py 为使用的配置文件,CHECKPOINT_FILE 为你想要使用的检查点文件,OUTPUT_DIR 为预测结果的输出路径
```


Expand Down
4 changes: 3 additions & 1 deletion demo/image_demo_with_cdinferencer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys
sys.path.append(sys.path[0] + "/..")
from argparse import ArgumentParser
from opencd.apis import OpenCDInferencer

Expand Down Expand Up @@ -39,7 +41,7 @@ def main():
args.checkpoint,
dataset_name=args.dataset_name,
device=args.device,
classes=('unchanged', 'changed'),
# classes=['unchanged', 'changed'],
palette=[[0, 0, 0], [255, 255, 255]]
)

Expand Down

0 comments on commit 62223b3

Please sign in to comment.