Spaces:
Build error
Build error
Commit
Β·
5232cb7
1
Parent(s):
bd01ffd
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,44 +20,6 @@ device = torch.device(
|
|
| 20 |
# Description
|
| 21 |
title = "<center><strong><font size='8'>π Fast Segment Anything π€</font></strong></center>"
|
| 22 |
|
| 23 |
-
news = """ # π News
|
| 24 |
-
π₯ 2023/07/14: Add a "wider result" button in text mode (Thanks for [gaoxinge](https://github.com/CASIA-IVA-Lab/FastSAM/pull/95)).
|
| 25 |
-
π₯ 2023/06/29: Support the text mode (Thanks for [gaoxinge](https://github.com/CASIA-IVA-Lab/FastSAM/pull/47)).
|
| 26 |
-
π₯ 2023/06/26: Support the points mode. (Better and faster interaction will come soon!)
|
| 27 |
-
π₯ 2023/06/24: Add the 'Advanced options" in Everything mode to get a more detailed adjustment.
|
| 28 |
-
"""
|
| 29 |
-
|
| 30 |
-
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.
|
| 31 |
-
|
| 32 |
-
π― Upload an Image, segment it with Fast Segment Anything (Everything mode). The other modes will come soon.
|
| 33 |
-
|
| 34 |
-
βοΈ It takes about 6~ seconds to generate segment results. The concurrency_count of queue is 1, please wait for a moment when it is crowded.
|
| 35 |
-
|
| 36 |
-
π To get faster results, you can use a smaller input size and leave high_visual_quality unchecked.
|
| 37 |
-
|
| 38 |
-
π£ You can also obtain the segmentation results of any Image through this Colab: [](https://colab.research.google.com/drive/1oX14f6IneGGw612WgVlAiy91UHwFAvr9?usp=sharing)
|
| 39 |
-
|
| 40 |
-
π A huge thanks goes out to the @HuggingFace Team for supporting us with GPU grant.
|
| 41 |
-
|
| 42 |
-
π Check out our [Model Card π](https://huggingface.co/An-619/FastSAM)
|
| 43 |
-
|
| 44 |
-
"""
|
| 45 |
-
|
| 46 |
-
description_p = """ # π― Instructions for points mode
|
| 47 |
-
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.
|
| 48 |
-
|
| 49 |
-
1. Upload an image or choose an example.
|
| 50 |
-
|
| 51 |
-
2. Choose the point label do('Add mask' means a positive point. 'Remove' Area means a negative point that is not segmented).
|
| 52 |
-
|
| 53 |
-
3. Add points one by one on the image.
|
| 54 |
-
|
| 55 |
-
4. Click the 'Segment with points prompt' button to get the segmentation results.
|
| 56 |
-
|
| 57 |
-
**5. If you get Error, click the 'Clear points' button and try again may help.**
|
| 58 |
-
|
| 59 |
-
"""
|
| 60 |
-
|
| 61 |
examples = [["examples/dogs.jpg"], ["examples/fruits.jpg"], ["examples/flowers.jpg"],]
|
| 62 |
|
| 63 |
default_example = examples[0]
|
|
|
|
| 20 |
# Description
|
| 21 |
title = "<center><strong><font size='8'>π Fast Segment Anything π€</font></strong></center>"
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
examples = [["examples/dogs.jpg"], ["examples/fruits.jpg"], ["examples/flowers.jpg"],]
|
| 24 |
|
| 25 |
default_example = examples[0]
|