forked from PaddlePaddle/PaddleMIX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
26 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
# | ||
# Segment Anything | ||
|
||
## 1. 模型简介 | ||
|
||
Paddle implementation of [Segment Anything](https://ai.facebook.com/research/publications/segment-anything/), produces high quality object masks from input prompts such as points or boxes. | ||
该模型是 [Segment Anything](https://ai.facebook.com/research/publications/segment-anything/)的 paddle 实现, 可输入点或框进行分割。 | ||
|
||
|
||
## 2. Demo | ||
## 2. 示例 | ||
|
||
## 2.2 Export model for static inference | ||
## 2.2 静态图导出与预测 | ||
```bash | ||
#export sam model input_type box | ||
#导出输入类型是 bbox 的静态图 | ||
python export.py --model_type Sam/SamVitH-1024 --input_type boxs --save_dir sam_export | ||
|
||
#export sam model input_type points | ||
#导出输入类型是 points 的静态图 | ||
python export.py --model_type Sam/SamVitH-1024 --input_type points --save_dir sam_export | ||
|
||
|
||
|
||
#boxs prompt | ||
#bbox 提示词 | ||
python predict.py | ||
--input_image image_you_want_to_detect.jpg \ | ||
--box_prompt 548 372 593 429 443 374 482 418 \ | ||
--input_type boxs \ | ||
--model_name_or_path Sam/SamVitH-1024 \ | ||
--cfg sam_export_SamVitH_boxs/deploy.yaml | ||
|
||
#points prompt | ||
#points 提示词 | ||
python predict.py \ | ||
--input_image mage_you_want_to_detect.jpg \ | ||
--points_prompt 548 372 \ | ||
--input_type points \ | ||
--model_name_or_path Sam/SamVitH-1024 \ | ||
--cfg sam_export_SamVitH_points/deploy.yaml | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters