AAAAAAAyq
commited on
Commit
ยท
99c2e65
1
Parent(s):
901ea42
Add instructions for points mode
Browse files
app.py
CHANGED
|
@@ -19,11 +19,9 @@ news = """ # ๐ News
|
|
| 19 |
|
| 20 |
๐ฅ 2023/06/26: Support the points mode. (Better and faster interaction will come soon!)
|
| 21 |
|
| 22 |
-
"""
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
description_e = """This is a demo on Github project ๐ [Fast Segment Anything Model](https://github.com/CASIA-IVA-Lab/FastSAM).
|
| 27 |
|
| 28 |
๐ฏ Upload an Image, segment it with Fast Segment Anything (Everything mode). The other modes will come soon.
|
| 29 |
|
|
@@ -39,19 +37,18 @@ description_e = """This is a demo on Github project ๐ [Fast Segment Anything
|
|
| 39 |
|
| 40 |
"""
|
| 41 |
|
| 42 |
-
description_p = """
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
๐ Check out our [Model Card ๐](https://huggingface.co/An-619/FastSAM)
|
| 55 |
|
| 56 |
"""
|
| 57 |
|
|
@@ -70,8 +67,8 @@ def segment_everything(
|
|
| 70 |
conf_threshold=0.25,
|
| 71 |
better_quality=False,
|
| 72 |
withContours=True,
|
| 73 |
-
mask_random_color=True,
|
| 74 |
use_retina=True,
|
|
|
|
| 75 |
):
|
| 76 |
input_size = int(input_size) # ็กฎไฟ imgsz ๆฏๆดๆฐ
|
| 77 |
|
|
|
|
| 19 |
|
| 20 |
๐ฅ 2023/06/26: Support the points mode. (Better and faster interaction will come soon!)
|
| 21 |
|
| 22 |
+
"""
|
| 23 |
|
| 24 |
+
description_e = """This is a demo on Github project ๐ [Fast Segment Anything Model](https://github.com/CASIA-IVA-Lab/FastSAM). Welcome to give a star โญ๏ธ to it.
|
|
|
|
|
|
|
| 25 |
|
| 26 |
๐ฏ Upload an Image, segment it with Fast Segment Anything (Everything mode). The other modes will come soon.
|
| 27 |
|
|
|
|
| 37 |
|
| 38 |
"""
|
| 39 |
|
| 40 |
+
description_p = """ # ๐ฏ Instructions for points mode
|
| 41 |
+
This is a demo on Github project ๐ [Fast Segment Anything Model](https://github.com/CASIA-IVA-Lab/FastSAM). Welcome to give a star โญ๏ธ to it.
|
| 42 |
|
| 43 |
+
1. Upload an image or choose an example.
|
| 44 |
|
| 45 |
+
2. Choose the point label ('Add mask' means a positive point. 'Remove' Area means a negative point that is not segmented).
|
| 46 |
|
| 47 |
+
3. Add points one by one on the image.
|
| 48 |
|
| 49 |
+
4. Click the 'Segemnt with points prompt' button to get the segmentation results.
|
| 50 |
|
| 51 |
+
**5. If you get Error, click the 'Clear points' button and try again may help.**
|
|
|
|
|
|
|
| 52 |
|
| 53 |
"""
|
| 54 |
|
|
|
|
| 67 |
conf_threshold=0.25,
|
| 68 |
better_quality=False,
|
| 69 |
withContours=True,
|
|
|
|
| 70 |
use_retina=True,
|
| 71 |
+
mask_random_color=True,
|
| 72 |
):
|
| 73 |
input_size = int(input_size) # ็กฎไฟ imgsz ๆฏๆดๆฐ
|
| 74 |
|