ananthu-aniraj commited on
Commit
5daa6d0
·
1 Parent(s): c95a7e0

update description

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -7,6 +7,14 @@ from utils import VisualizeAttentionMaps
7
  from utils.transform_utils import make_test_transforms
8
 
9
  st.title("PdiscoFormer Part Discovery Visualizer")
 
 
 
 
 
 
 
 
10
  model_options = ["ananthu-aniraj/pdiscoformer_cub_k_8", "ananthu-aniraj/pdiscoformer_cub_k_16",
11
  "ananthu-aniraj/pdiscoformer_cub_k_4", "ananthu-aniraj/pdiscoformer_part_imagenet_ood_k_8",
12
  "ananthu-aniraj/pdiscoformer_part_imagenet_ood_k_25",
@@ -31,12 +39,6 @@ if model_name is not None:
31
  amap_vis = VisualizeAttentionMaps(num_parts=num_parts + 1, bg_label=num_parts)
32
  test_transforms = make_test_transforms(image_size)
33
 
34
- # Instructions
35
- st.write("If you choose to upload an image, the part assignment will be visualized. "
36
- "The model is trained to discover parts of the salient objects in the image depending on the training dataset.")
37
- st.write("If you choose one of the CUB or NABirds models, please choose a bird image.")
38
- st.write("If you choose one of the Flower models, please choose a flower image.")
39
- st.write("If you choose one of the PartImageNet models, please choose an image of classes from PartImageNet like land animals/birds/cars/bottles/airplanes.")
40
 
41
  image_name = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"]) # Upload an image
42
  if image_name is not None:
 
7
  from utils.transform_utils import make_test_transforms
8
 
9
  st.title("PdiscoFormer Part Discovery Visualizer")
10
+ # Instructions
11
+ st.write("First of all choose a model from the dropdown list."
12
+ "If you choose to upload an image, the part assignment will be visualized. "
13
+ "The model is trained to discover parts of the salient objects in the image depending on the training dataset.")
14
+ st.write("If you choose one of the CUB or NABirds models, please choose a bird image.")
15
+ st.write("If you choose one of the Flower models, please choose a flower image.")
16
+ st.write("If you choose one of the PartImageNet models, please choose an image of classes from PartImageNet like land animals/birds/cars/bottles/airplanes.")
17
+
18
  model_options = ["ananthu-aniraj/pdiscoformer_cub_k_8", "ananthu-aniraj/pdiscoformer_cub_k_16",
19
  "ananthu-aniraj/pdiscoformer_cub_k_4", "ananthu-aniraj/pdiscoformer_part_imagenet_ood_k_8",
20
  "ananthu-aniraj/pdiscoformer_part_imagenet_ood_k_25",
 
39
  amap_vis = VisualizeAttentionMaps(num_parts=num_parts + 1, bg_label=num_parts)
40
  test_transforms = make_test_transforms(image_size)
41
 
 
 
 
 
 
 
42
 
43
  image_name = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"]) # Upload an image
44
  if image_name is not None: