Spaces:
Runtime error
Runtime error
beingcognitive
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,24 @@ import requests
|
|
11 |
from io import BytesIO
|
12 |
|
13 |
def main():
|
14 |
-
st.title("Image Segmentation
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
# Load SAM by Facebook
|
18 |
# processor = AutoProcessor.from_pretrained("facebook/sam-vit-huge")
|
|
|
11 |
from io import BytesIO
|
12 |
|
13 |
def main():
|
14 |
+
st.title("Image Segmentation with Object Detection")
|
15 |
+
|
16 |
+
# Introduction and How-to
|
17 |
+
st.markdown("""
|
18 |
+
Welcome to the Image Segmentation and Object Detection app, where cutting-edge AI models bring your images to life by identifying and segmenting objects. Here's how it works:
|
19 |
+
- **Upload an image**: Drag and drop or use the browse files option.
|
20 |
+
- **Detection**: The `facebook/detr-resnet-50` model detects objects and their bounding boxes.
|
21 |
+
- **Segmentation**: Following detection, `Zigeng/SlimSAM-uniform-77` segments the objects using the bounding box data.
|
22 |
+
- **Further Segmentation**: The app also provides additional segmentation insights using input points at positions (0.4, 0.4) and (0.5, 0.5) for a more granular analysis.
|
23 |
+
|
24 |
+
Please note that processing takes some time. We appreciate your patience as the models do their work!
|
25 |
+
""")
|
26 |
+
|
27 |
+
# Model credits
|
28 |
+
st.subheader("Powered by:")
|
29 |
+
st.write("- Object Detection Model: `facebook/detr-resnet-50`")
|
30 |
+
st.write("- Segmentation Model: `Zigeng/SlimSAM-uniform-77`")
|
31 |
+
|
32 |
|
33 |
# Load SAM by Facebook
|
34 |
# processor = AutoProcessor.from_pretrained("facebook/sam-vit-huge")
|