Changed defaults
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
import sys
|
3 |
# set CUDA_HOME
|
4 |
-
os.environ["CUDA_HOME"] =
|
5 |
|
6 |
import gradio as gr
|
7 |
from tqdm import tqdm
|
@@ -29,7 +33,8 @@ def run_owl(input_vid,
|
|
29 |
text_prompt,
|
30 |
confidence_threshold,
|
31 |
fps_processed=fps_processed,
|
32 |
-
scaling_factor=1/scaling_factor
|
|
|
33 |
|
34 |
global CSV_PATH
|
35 |
CSV_PATH = csv_path
|
@@ -70,12 +75,12 @@ with gr.Blocks() as demo:
|
|
70 |
minimum=1,
|
71 |
maximum=120,
|
72 |
value=10,
|
73 |
-
step=
|
74 |
scaling_factor = gr.Slider(
|
75 |
label="Downsample Factor",
|
76 |
info="Adjust the downsample factor. Note: the higher the number the faster the processing time but lower the accuracy.",
|
77 |
minimum=1,
|
78 |
-
maximum=
|
79 |
value=4,
|
80 |
step=1
|
81 |
)
|
|
|
1 |
+
BATCH_SIZE = 6 # Change this to your desired batch size
|
2 |
+
CUDA_PATH = "/usr/local/cuda-12.3/" # Change this to your CUDA path
|
3 |
+
|
4 |
+
|
5 |
import os
|
6 |
import sys
|
7 |
# set CUDA_HOME
|
8 |
+
os.environ["CUDA_HOME"] = CUDA_PATH
|
9 |
|
10 |
import gradio as gr
|
11 |
from tqdm import tqdm
|
|
|
33 |
text_prompt,
|
34 |
confidence_threshold,
|
35 |
fps_processed=fps_processed,
|
36 |
+
scaling_factor=1/scaling_factor,
|
37 |
+
batch_size=BATCH_SIZE)
|
38 |
|
39 |
global CSV_PATH
|
40 |
CSV_PATH = csv_path
|
|
|
75 |
minimum=1,
|
76 |
maximum=120,
|
77 |
value=10,
|
78 |
+
step=2)
|
79 |
scaling_factor = gr.Slider(
|
80 |
label="Downsample Factor",
|
81 |
info="Adjust the downsample factor. Note: the higher the number the faster the processing time but lower the accuracy.",
|
82 |
minimum=1,
|
83 |
+
maximum=10,
|
84 |
value=4,
|
85 |
step=1
|
86 |
)
|