leopoldmaillard commited on
Commit
459cd3a
·
1 Parent(s): 3ab006f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -58,15 +58,15 @@ def retrieve(query_image_name, embeddings_type, metric_type):
58
  return io.imread('smallholidays/'+top[0]), [io.imread('smallholidays/'+img) for img in top[1:]]
59
 
60
  input_button = gr.inputs.Dropdown(query_images, label='Choice of the query image')
61
- embeddings_selection = gr.inputs.Radio(['MobileNetV2', 'BoVW', 'Baseline'], label='Embeddings to use')
62
  metric_selection = gr.inputs.Radio(['L1 Norm', 'Cosine'], label='Similarity Metric')
63
- retrieved_images = gr.outputs.Carousel(["image"]*10, label='Ranked retrieved images')
64
 
65
- description = "This is a demo of the content-based image retrieval system developed as part of the IR course project, 2022.\n \nThe indexed dataset is [INRIA Holidays](https://lear.inrialpes.fr/~jegou/data.php). \n\nSeveral image embeddings can be used :\n \n-**MobileNetV2** : feature extraction is performed using a MobileNet architecture trained on ImageNet.\n\n-**BoVW (Bag of Visual Words)** : embedding is the BoVW histogram using color histogram as a descriptor.\n\n-**Baseline** : basic descriptor that uses pixel values of the downsized images."
66
 
67
  iface = gr.Interface(fn=retrieve,
68
  inputs=[input_button, embeddings_selection, metric_selection],
69
- outputs=[gr.outputs.Image(label='Query Image'), retrieved_images],
70
  title='Image Retrieval on INRIA Holidays',
71
  article=description)
72
  iface.launch()
 
58
  return io.imread('smallholidays/'+top[0]), [io.imread('smallholidays/'+img) for img in top[1:]]
59
 
60
  input_button = gr.inputs.Dropdown(query_images, label='Choice of the query image')
61
+ embeddings_selection = gr.inputs.Radio(['MobileNetV2', 'BoVW', 'Baseline'], label='Embeddings')
62
  metric_selection = gr.inputs.Radio(['L1 Norm', 'Cosine'], label='Similarity Metric')
63
+ retrieved_images = gr.outputs.Carousel(["image"]*10, label='Retrieved images')
64
 
65
+ description = "This is a demo of the content-based image retrieval system developed as part of the IR course project, 2022. The indexed dataset is [INRIA Holidays](https://lear.inrialpes.fr/~jegou/data.php). \n\nSeveral image embeddings can be used :\n \n-**MobileNetV2** : feature extraction is performed using a MobileNet architecture trained on ImageNet.\n\n-**BoVW (Bag of Visual Words)** : embedding is the BoVW histogram using color histogram as a descriptor.\n\n-**Baseline** : basic descriptor that uses pixel values of the downsized images."
66
 
67
  iface = gr.Interface(fn=retrieve,
68
  inputs=[input_button, embeddings_selection, metric_selection],
69
+ outputs=[gr.outputs.Image(label='Query image'), retrieved_images],
70
  title='Image Retrieval on INRIA Holidays',
71
  article=description)
72
  iface.launch()