jeffaudi commited on
Commit
acdc5b0
1 Parent(s): 9769a62

Added examples

Browse files
Files changed (2) hide show
  1. app.py +6 -5
  2. demo/Pleiades_HD15_Miami_Marina.jpg +2 -2
app.py CHANGED
@@ -7,8 +7,6 @@ from pathlib import Path
7
  from loguru import logger
8
  import cv2
9
  import torch
10
- import ultralytics
11
- from ultralytics import YOLO
12
  import time
13
  import base64
14
  import requests
@@ -95,7 +93,9 @@ example_data = [
95
  #["./demo/airport01.jpg", "aircraft", 0.25, 0.25],
96
  #["./demo/SPOT_Storage.jpg", "storage", 0.25, 0.25],
97
  #["./demo/Satellite_Image_Marina_New_Zealand.jpg", "ship", 0.25, 0.25],
98
- #["./demo/Pleiades_HD15_Miami_Marina.jpg", "ship", 0.25, 0.25],
 
 
99
  ]
100
 
101
  # Define CSS for some elements
@@ -133,7 +133,7 @@ with demo:
133
  inputs = [input_image, text_prompt, box_threshold, text_threshold],
134
  outputs = [output_image, dimensions, detections, stopwatch],
135
  fn=predict_image,
136
- cache_examples=False,
137
  label='Try these images!'
138
  )
139
 
@@ -141,7 +141,8 @@ with demo:
141
  and <a href='https://www.dl4eo.com/'>DL4EO</a>. The demonstration images are Pléiades \
142
  images provided by CNES with distribution by Airbus DS. The model architecture and weights \
143
  are provided <a href='https://github.com/IDEA-Research/GroundingDINO'>Grounding DINO</a>. \
144
- This is a demonstration only. Please contact <a href='mailto:jeff@dl4eo.com'>me</a> \
 
145
  for more information on how you could get access to a commercial model or API. </p>")
146
 
147
  demo.launch(
 
7
  from loguru import logger
8
  import cv2
9
  import torch
 
 
10
  import time
11
  import base64
12
  import requests
 
93
  #["./demo/airport01.jpg", "aircraft", 0.25, 0.25],
94
  #["./demo/SPOT_Storage.jpg", "storage", 0.25, 0.25],
95
  #["./demo/Satellite_Image_Marina_New_Zealand.jpg", "ship", 0.25, 0.25],
96
+ ["./demo/Pleiades_HD15_Miami_Marina.jpg", "motorboat", 0.3, 0.0],
97
+ ["./demo/Pleiades_HD15_Miami_Marina.jpg", "palm tree", 0.15, 0.3],
98
+ ["./demo/Pleiades_HD15_Miami_Marina.jpg", "building", 0.3, 0.0],
99
  ]
100
 
101
  # Define CSS for some elements
 
133
  inputs = [input_image, text_prompt, box_threshold, text_threshold],
134
  outputs = [output_image, dimensions, detections, stopwatch],
135
  fn=predict_image,
136
+ cache_examples=True,
137
  label='Try these images!'
138
  )
139
 
 
141
  and <a href='https://www.dl4eo.com/'>DL4EO</a>. The demonstration images are Pléiades \
142
  images provided by CNES with distribution by Airbus DS. The model architecture and weights \
143
  are provided <a href='https://github.com/IDEA-Research/GroundingDINO'>Grounding DINO</a>. \
144
+ The model has not been trained specifically on satellite imagery and should be finetuned for this task. \
145
+ This is for demonstration only. Please contact <a href='mailto:[email protected]'>me</a> \
146
  for more information on how you could get access to a commercial model or API. </p>")
147
 
148
  demo.launch(
demo/Pleiades_HD15_Miami_Marina.jpg CHANGED

Git LFS Details

  • SHA256: fa33637d5c88610ac408043a1318995a765d3439cbf7812e301328541c390098
  • Pointer size: 132 Bytes
  • Size of remote file: 9.34 MB

Git LFS Details

  • SHA256: a537d1b645a85e55cdea591d4590c3632cc2fffceccc35816fea9e4a901aa7b4
  • Pointer size: 131 Bytes
  • Size of remote file: 657 kB