Commit ·
c2a5995
1
Parent(s): 95aa979
ft: Hikvision CD
Browse files
app.py
CHANGED
|
@@ -229,6 +229,47 @@ with gr.Blocks() as demo:
|
|
| 229 |
detection_img = gr.Interface(object_detection_stream,
|
| 230 |
inputs=gr.Textbox(label="Classes: Enter the classes", value = "one bird, one airplane, one kite,a flying object,sky"),
|
| 231 |
outputs="image")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
|
| 233 |
with gr.Tab("Using a custom Video"):
|
| 234 |
with gr.Row():
|
|
|
|
| 229 |
detection_img = gr.Interface(object_detection_stream,
|
| 230 |
inputs=gr.Textbox(label="Classes: Enter the classes", value = "one bird, one airplane, one kite,a flying object,sky"),
|
| 231 |
outputs="image")
|
| 232 |
+
|
| 233 |
+
with gr.Tab("Using a Hikvision Camera (Change Detection)"):
|
| 234 |
+
with gr.Row():
|
| 235 |
+
with gr.Column():
|
| 236 |
+
with gr.Row():
|
| 237 |
+
video_address_CD = gr.Textbox(label="Hikvision Camera Address (RTSP)")
|
| 238 |
+
with gr.Row():
|
| 239 |
+
example_addresses_CD = gr.Examples(
|
| 240 |
+
examples=EXAMPLE_VIDEOS_LIST+[
|
| 241 |
+
'rtsp://admin:Admin123@192.168.254.200:554/Streaming/Channels/101',
|
| 242 |
+
'rtsp://admin:Admin123@192.168.254.201:554/Streaming/Channels/101',
|
| 243 |
+
'rtsp://admin:Admin123@192.168.254.202:554/Streaming/Channels/101',
|
| 244 |
+
'rtsp://admin:Admin123@192.168.254.203:554/Streaming/Channels/101'
|
| 245 |
+
],
|
| 246 |
+
inputs=[video_address_CD],
|
| 247 |
+
)
|
| 248 |
+
|
| 249 |
+
with gr.Column():
|
| 250 |
+
hikvision_stream_CD = gr.Interface(
|
| 251 |
+
video_stream_HIKvision,
|
| 252 |
+
inputs=[
|
| 253 |
+
video_address_CD,
|
| 254 |
+
gr.Textbox(label="Acquisition: Enter the frame rate", value=2.0)
|
| 255 |
+
],
|
| 256 |
+
outputs="image"
|
| 257 |
+
)
|
| 258 |
+
|
| 259 |
+
with gr.Row():
|
| 260 |
+
with gr.Column():
|
| 261 |
+
optical_flow_img_HIK_CD = gr.Interface(
|
| 262 |
+
compute_optical_flow,
|
| 263 |
+
inputs=gr.Slider(label="Optical Flow: Noise Tolerance", minimum=0.0, maximum=1.0, value=0.4),
|
| 264 |
+
outputs="image"
|
| 265 |
+
)
|
| 266 |
+
|
| 267 |
+
with gr.Column():
|
| 268 |
+
detection_img_HIK_CD = gr.Interface(
|
| 269 |
+
change_detection_stream,
|
| 270 |
+
inputs=gr.Textbox(label="Changes will be detected here", value="DUMMY"),
|
| 271 |
+
outputs="image"
|
| 272 |
+
)
|
| 273 |
|
| 274 |
with gr.Tab("Using a custom Video"):
|
| 275 |
with gr.Row():
|
histogram_of_change_detection_runtime.png
CHANGED
|
|
histogram_of_object_detection_runtime.png
CHANGED
|
|
histogram_of_optical_flow_runtime.png
CHANGED
|
|