annading commited on
Commit
68f46ec
1 Parent(s): 6e81f41

changed the way scaling factor is represented

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -33,7 +33,7 @@ def run_sam_dino(input_vid,
33
  box_threshold=box_threshold,
34
  text_threshold=text_threshold,
35
  fps_processed=fps_processed,
36
- scaling_factor=scaling_factor,
37
  video_options=video_options,
38
  batch_size=BATCH_SIZE)
39
  global CSV_PATH
@@ -81,11 +81,11 @@ with gr.Blocks() as demo:
81
  step=1)
82
  scaling_factor = gr.Slider(
83
  label="Downsample Factor",
84
- info="Adjust the downsample factor. I.e. a value of 0.5 will downsample the pixels in the video by a factor of 2. Note: the higher the number the slower the processing time, but detection may be more accurate.",
85
- minimum=0.1,
86
- maximum=1.0,
87
- value=0.5,
88
- step=0.1
89
  )
90
  video_options = gr.CheckboxGroup(choices=["Bounding boxes", "Masks"],
91
  label="Video Output Options",
 
33
  box_threshold=box_threshold,
34
  text_threshold=text_threshold,
35
  fps_processed=fps_processed,
36
+ scaling_factor=(1/scaling_factor), # size gets multplied by this so we need to invert it
37
  video_options=video_options,
38
  batch_size=BATCH_SIZE)
39
  global CSV_PATH
 
81
  step=1)
82
  scaling_factor = gr.Slider(
83
  label="Downsample Factor",
84
+ info="Adjust the downsample factor. Note: the higher the number the faster the processing time but lower the accuracy.",
85
+ minimum=1,
86
+ maximum=5,
87
+ value=2,
88
+ step=1
89
  )
90
  video_options = gr.CheckboxGroup(choices=["Bounding boxes", "Masks"],
91
  label="Video Output Options",