joshangngoching commited on
Commit
1c6b417
·
verified ·
1 Parent(s): 5f6db54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -32,5 +32,10 @@ if uploaded_file is not None:
32
  st.image(image, caption='Uploaded Image.', use_column_width=True)
33
  st.write("")
34
 
35
- results = semantic_segmentation(image)
36
- st.json(results)
 
 
 
 
 
 
32
  st.image(image, caption='Uploaded Image.', use_column_width=True)
33
  st.write("")
34
 
35
+ segmentation_results = semantic_segmentation(image)
36
+ st.json(segmentation_results)
37
+
38
+ image_with_masks = draw_masks_fromDict(image_np, segmentation_results)
39
+
40
+ image_with_masks_pil = Image.fromarray(image_with_masks, 'RGB')
41
+ st.image(image_with_masks_pil, caption='Image with Masks.', use_column_width=True)