Giter Club home page Giter Club logo

video-analytics-dashboard's Introduction

Video Analytics Tool using YoloV5 and Streamlit

😇 Motivation

As AI engineers, we love data and we love to see graphs and numbers! So why not project the inference data on some platform to understand the inference better? When a model is deployed on the edge for some kind of monitoring, it takes up rigorous amount of frontend and backend developement apart from deep learning efforts — from getting the live data to displaying the correct output. So, I wanted to replicate a small scale video analytics tool and understand what all feature would be useful for such a tool and what could be the limitations?

🖼️ Demo

dashboard_1_local_video.mp4

🔑 Features

For detailed insights, do check out my Medium Blog

  1. Choose input source - Local, RTSP or Webcam
  2. Input class threshold
  3. Set FPS drop warning threshold
  4. Option to save inference video
  5. Input class confidence for drift detection
  6. Option to save poor performing frames
  7. Display objects in current frame
  8. Display total detected objects so far
  9. Display System stats - Ram, CPU and GPU usage
  10. Display poor performing class
  11. Display minimum and maximum FPS recorded during inference

💫 How to use?

  1. Clone this repo
  2. Install all the dependencies
  3. Download deepsort checkpoint file and paste it in deep_sort_pytorch/deep_sort/deep/checkpoint
  4. Run -> streamlit run app.py

⭐ Recent changelog

  1. Updated yolov5s weight file name in detect() in app.py
  2. Added drive link to download DeepSort checkpoint file (45Mb).

🤯 FAQs

  1. How to use custom Yolov5 weight or DeepSort checkpoint file?
  2. Unable to use webcam
  3. AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

❤️ Extras

Do checkout the Medium article and give this repo a ⭐

Note

The input video should be in same folder where app.py is. If you want to deploy the app in cloud and use it as a webapp then - download the user uploaded video to temporary folder and pass the path and video name to the respective function in app.py . This is Streamlit bug. Check Stackoverflow.

video-analytics-dashboard's People

Contributors

bharath5673 avatar sahilchachra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

video-analytics-dashboard's Issues

File missing in deep sort folder

Hello,
While running the code in my anaconda environment i found that in the deep_sort_pytorch/deep_sort/deep/checkpoint
a file named ckpt.t7 is missing which is giving error. Kindly fix it. I have to separately download it from another repo.
Thank you,

So Slow

I checked speed on Strong_sort git and your app on video streaming. it is sooo slow on everything: video, stream webcam, but STRONG_sort is the way faster

Ask questions

Hello, what should I do if I want to display data in real time in the form of statistical chart,thanks

Crop 1 image for every new object

Well I'm facing some issues bout cropping, when cropping is set to True, it does its job, but it exports detected objects from every frame, but I need to export 1 cropped image for every new car. for example if the first 3 second of video there is 1 car I need 1 crop, if there appears another car I need second 1 crop. Is there any suggestions how to make it workable , that would be interesting for everybody

Error Module numpy has no attribute float (RTMP source)

After getting rid the compute error, I got another error Module Numpy (source from RTMP):

AttributeError: module 'numpy' has no attribute 'float'
Traceback:
File "C:\Users\mikah\miniconda3\envs\analyticdashboard\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
File "D:\00_research\streamlit\Video-Analytics-Dashboard\app.py", line 232, in <module>
    main()
File "D:\00_research\streamlit\Video-Analytics-Dashboard\app.py", line 226, in main
    detect(source=rtsp_input, stframe=stframe, kpi1_text=kpi1_text, kpi2_text=kpi2_text, kpi3_text=kpi3_text, js1_text=js1_text, js2_text=js2_text, js3_text=js3_text, conf_thres=float(conf_thres), nosave=nosave, display_labels=display_labels, conf_thres_drift = float(conf_thres_drift), save_poor_frame__= save_poor_frame__, inf_ov_1_text=inf_ov_1_text, inf_ov_2_text=inf_ov_2_text, inf_ov_3_text=inf_ov_3_text, inf_ov_4_text=inf_ov_4_text, fps_warn=fps_warn, fps_drop_warn_thresh = float(fps_drop_warn_thresh))
File "C:\Users\mikah\miniconda3\envs\analyticdashboard\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
File "D:\00_research\streamlit\Video-Analytics-Dashboard\deep_list.py", line 235, in detect
    outputs = deepsort.update(xywhs, confss, im0)
File "D:\00_research\streamlit\Video-Analytics-Dashboard\deep_sort_pytorch\deep_sort\deep_sort.py", line 31, in update
    detections = [Detection(bbox_tlwh[i], conf, features[i]) for i, conf in enumerate(
File "D:\00_research\streamlit\Video-Analytics-Dashboard\deep_sort_pytorch\deep_sort\deep_sort.py", line 31, in <listcomp>
    detections = [Detection(bbox_tlwh[i], conf, features[i]) for i, conf in enumerate(
File "D:\00_research\streamlit\Video-Analytics-Dashboard\deep_sort_pytorch\deep_sort\sort\detection.py", line 30, in __init__
    self.tlwh = np.asarray(tlwh, dtype=np.float)
File "C:\Users\mikah\miniconda3\envs\analyticdashboard\lib\site-packages\numpy\__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "

Disable SORT in some RTMP

I have 3 RTMP link

  • water level
  • traffic 1
  • traffic 2

I want to use deep sort only for traffic 1 and 2, while at water level I don't need it. How to achieve this? (I can duplicate the detect() but I don't know at which part to disable the Deep Sort).

Webcam do not release

When i open webcam is show succesfully. However it do not release or totally closed when you choose rtsp or local video. I try to add this code below but its not working

if stop_button:
detect(vid_cap=True)

In deeplist:
def detect(vid_cap = False):
if vid_cap:
vid_cap.release()

How can I use a GPU for video inference?

Thank you very much for your post. I would like to ask how to use a GPU instead of a CPU for video inference to improve the speed of video inference analysis. My current environment is CUDA 12.3, torch 2.1.2, torchvision 0.16.2, and the GPU I'm using is an RTX 4060.
I look forward to your reply.

MOT-16 MOTA score

Have you evaluated the model yolov5s using MOT-16? What were the results?

AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

error 1
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\intel\Desktop\Video-Analytics-Dashboard-main> streamlit run app.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501
Network URL: http://192.168.29.114:8501

2022-08-31 18:58:38.650 Loading weights from deep_sort_pytorch/deep_sort/deep/checkpoint/ckpt.t7... Done!
Folder exists, overwriting...
2022-08-31 18:58:38.674 YOLOv5 2022-8-4 torch 1.12.1+cpu CPU

2022-08-31 18:58:38.686 YOLOv5 2022-8-4 torch 1.12.1+cpu CPU

2022-08-31 18:58:38.792 Fusing layers...
2022-08-31 18:58:39.092 Model Summary: 213 layers, 7225885 parameters, 0 gradients
2022-08-31 18:58:39.093 WARNING: --img-size (640, 640) must be multiple of max stride 32, updating to [640, 640]
2022-08-31 18:58:39.598 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 556, in run_script
exec(code, module.dict)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\app.py", line 232, in
main()
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\app.py", line 97, in main
detect(source=video.name, stframe=stframe, kpi1_text=kpi1_text, kpi2_text=kpi2_text, kpi3_text=kpi3_text, js1_text=js1_text, js2_text=js2_text, js3_text=js3_text, conf_thres=float(conf_thres), nosave=nosave, display_labels=display_labels, conf_thres_drift = float(conf_thres_drift), save_poor_frame
_= save_poor_frame__, inf_ov_1_text=inf_ov_1_text, inf_ov_2_text=inf_ov_2_text, inf_ov_3_text=inf_ov_3_text, inf_ov_4_text=inf_ov_4_text, fps_warn=fps_warn, fps_drop_warn_thresh File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\deep_list.py", line 170, in detect
pred = model(im, augment=augment, visualize=visualize)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\yolov5\models\common.py", line 402, in forward
y = self.model(im) if self.jit else self.model(im, augment=augment, visualize=visualize)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main./yolov5\models\yolo.py", line 126, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main./yolov5\models\yolo.py", line 149, in _forward_once
x = m(x) # run
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\upsampling.py", line 154, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1207, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
Stopping...
PS C:\Users\intel\Desktop\Video-Analytics-Dashboard-main> streamlit run app.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501
Network URL: http://192.168.29.114:8501

2022-08-31 19:01:35.927 Loading weights from deep_sort_pytorch/deep_sort/deep/checkpoint/ckpt.t7... Done!
Folder exists, overwriting...
2022-08-31 19:01:35.949 YOLOv5 2022-8-4 torch 1.12.1+cpu CPU

2022-08-31 19:01:35.962 YOLOv5 2022-8-4 torch 1.12.1+cpu CPU

2022-08-31 19:01:36.090 Fusing layers...
2022-08-31 19:01:36.410 Model Summary: 213 layers, 7225885 parameters, 0 gradients
2022-08-31 19:01:36.412 WARNING: --img-size (640, 640) must be multiple of max stride 32, updating to [640, 640]
2022-08-31 19:01:36.500 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 556, in run_script
exec(code, module.dict)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\app.py", line 232, in
main()
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\app.py", line 162, in main
detect(source='1', stframe=stframe, kpi1_text=kpi1_text, kpi2_text=kpi2_text, kpi3_text=kpi3_text, js1_text=js1_text, js2_text=js2_text, js3_text=js3_text, conf_thres=float(conf_thres), nosave=nosave, display_labels=display_labels, conf_thres_drift = float(conf_thres_drift), save_poor_frame
_= save_poor_frame__, inf_ov_1_text=inf_ov_1_text, inf_ov_2_text=inf_ov_2_text, inf_ov_3_text=inf_ov_3_text, inf_ov_4_text=inf_ov_4_text, fps_warn=fps_warn, fps_drop_warn_thresh = float(fps_drop_warn_thresh))
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\deep_list.py", line 136, in detect
dataset = LoadStreams(source, img_size=imgsz, stride=stride, auto=pt)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\yolov5\utils\datasets.py", line 309, in init
assert cap.isOpened(), f'{st}Failed to open {s}'
AssertionError: 1/1: 1... Failed to open 1
2022-08-31 19:08:09.912 Loading weights from deep_sort_pytorch/deep_sort/deep/checkpoint/ckpt.t7... Done!
Folder exists, overwriting...
2022-08-31 19:08:09.946 YOLOv5 2022-8-4 torch 1.12.1+cpu CPU

2022-08-31 19:08:09.964 YOLOv5 2022-8-4 torch 1.12.1+cpu CPU

2022-08-31 19:08:10.071 Fusing layers...
2022-08-31 19:08:10.591 Model Summary: 213 layers, 7225885 parameters, 0 gradients
2022-08-31 19:08:10.594 WARNING: --img-size (640, 640) must be multiple of max stride 32, updating to [640, 640]
2022-08-31 19:08:11.045 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 556, in run_script
exec(code, module.dict)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\app.py", line 232, in
main()
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\app.py", line 97, in main
detect(source=video.name, stframe=stframe, kpi1_text=kpi1_text, kpi2_text=kpi2_text, kpi3_text=kpi3_text, js1_text=js1_text, js2_text=js2_text, js3_text=js3_text, conf_thres=float(conf_thres), nosave=nosave, display_labels=display_labels, conf_thres_drift = float(conf_thres_drift), save_poor_frame
_= save_poor_frame__, inf_ov_1_text=inf_ov_1_text, inf_ov_2_text=inf_ov_2_text, inf_ov_3_text=inf_ov_3_text, inf_ov_4_text=inf_ov_4_text, fps_warn=fps_warn, fps_drop_warn_thresh = float(fps_drop_warn_thresh))
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\deep_list.py", line 170, in detect
pred = model(im, augment=augment, visualize=visualize)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\yolov5\models\common.py", line 402, in forward
y = self.model(im) if self.jit else self.model(im, augment=augment, visualize=visualize)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main./yolov5\models\yolo.py", line 126, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main./yolov5\models\yolo.py", line 149, in _forward_once
x = m(x) # run
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\upsampling.py", line 154, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1207, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
2022-08-31 19:12:05.900 Loading weights from deep_sort_pytorch/deep_sort/deep/checkpoint/ckpt.t7... Done!
Folder exists, overwriting...
2022-08-31 19:12:05.940 YOLOv5 2022-8-4 torch 1.12.1+cpu CPU

2022-08-31 19:12:05.970 YOLOv5 2022-8-4 torch 1.12.1+cpu CPU

2022-08-31 19:12:06.074 Fusing layers...
2022-08-31 19:12:06.440 Model Summary: 213 layers, 7225885 parameters, 0 gradients
2022-08-31 19:12:06.444 WARNING: --img-size (640, 640) must be multiple of max stride 32, updating to [640, 640]
2022-08-31 19:13:37.880 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 556, in run_script
exec(code, module.dict)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\app.py", line 232, in
main()
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\app.py", line 226, in main
detect(source=rtsp_input, stframe=stframe, kpi1_text=kpi1_text, kpi2_text=kpi2_text, kpi3_text=kpi3_text, js1_text=js1_text, js2_text=js2_text, js3_text=js3_text, conf_thres=float(conf_thres), nosave=nosave, display_labels=display_labels, conf_thres_drift = float(conf_thres_drift), save_poor_frame
_= save_poor_frame__, inf_ov_1_text=inf_ov_1_text, inf_ov_2_text=inf_ov_2_text, inf_ov_3_text=inf_ov_3_text, inf_ov_4_text=inf_ov_4_text, fps_warn=fps_warn, fps_drop_warn_thresh = float(fps_drop_warn_thresh))
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\deep_list.py", line 136, in detect
dataset = LoadStreams(source, img_size=imgsz, stride=stride, auto=pt)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\yolov5\utils\datasets.py", line 309, in init
assert cap.isOpened(), f'{st}Failed to open {s}'
AssertionError: 1/1: rtsp://192.168.0.1... Failed to open rtsp://192.168.0.1
2022-08-31 19:13:43.080 Loading weights from deep_sort_pytorch/deep_sort/deep/checkpoint/ckpt.t7... Done!
Folder exists, overwriting...
2022-08-31 19:13:43.109 YOLOv5 2022-8-4 torch 1.12.1+cpu CPU

2022-08-31 19:13:43.122 YOLOv5 2022-8-4 torch 1.12.1+cpu CPU

2022-08-31 19:13:43.233 Fusing layers...
2022-08-31 19:13:43.638 Model Summary: 213 layers, 7225885 parameters, 0 gradients
2022-08-31 19:13:43.640 WARNING: --img-size (640, 640) must be multiple of max stride 32, updating to [640, 640]
2022-08-31 19:13:44.094 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 556, in run_script
exec(code, module.dict)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\app.py", line 232, in
main()
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\app.py", line 97, in main
detect(source=video.name, stframe=stframe, kpi1_text=kpi1_text, kpi2_text=kpi2_text, kpi3_text=kpi3_text, js1_text=js1_text, js2_text=js2_text, js3_text=js3_text, conf_thres=float(conf_thres), nosave=nosave, display_labels=display_labels, conf_thres_drift = float(conf_thres_drift), save_poor_frame
_= save_poor_frame__, inf_ov_1_text=inf_ov_1_text, inf_ov_2_text=inf_ov_2_text, inf_ov_3_text=inf_ov_3_text, inf_ov_4_text=inf_ov_4_text, fps_warn=fps_warn, fps_drop_warn_thresh = float(fps_drop_warn_thresh))
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\deep_list.py", line 170, in detect
pred = model(im, augment=augment, visualize=visualize)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main\yolov5\models\common.py", line 402, in forward
y = self.model(im) if self.jit else self.model(im, augment=augment, visualize=visualize)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main./yolov5\models\yolo.py", line 126, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "C:\Users\intel\Desktop\Video-Analytics-Dashboard-main./yolov5\models\yolo.py", line 149, in _forward_once
x = m(x) # run
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\upsampling.py", line 154, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "C:\Users\intel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\torch\nn\modules\module.py", line 1207, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

Exception: ERROR: fire_cut2.mp4 does not exist

Traceback:
File "C:\Users\Bob\AppData\Roaming\Python\Python39\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in run_script
exec(code, module.dict)
File "C:\Users\Bob\Video-Analytics-Dashboard\app.py", line 287, in
main()
File "C:\Users\Bob\Video-Analytics-Dashboard\app.py", line 131, in main
detect(source = video.name, stframe=stframe, kpi1_text=kpi1_text, kpi2_text=kpi2_text, kpi3_text=kpi3_text, js1_text=js1_text, js2_text=js2_text, js3_text=js3_text, conf_thres=float(conf_thres), nosave=nosave, display_labels=display_labels, conf_thres_drift = float(conf_thres_drift), save_poor_frame
_= save_poor_frame__, inf_ov_1_text=inf_ov_1_text, inf_ov_2_text=inf_ov_2_text, inf_ov_3_text=inf_ov_3_text, inf_ov_4_text=inf_ov_4_text, fps_warn=fps_warn, fps_drop_warn_thresh = float(fps_drop_warn_thresh))
File "C:\Users\Bob\AppData\Roaming\Python\Python39\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Users\Bob\Video-Analytics-Dashboard\deep_list.py", line 139, in detect
dataset = LoadImages(source, img_size=imgsz, stride=stride, auto=pt)
File "C:\Users\Bob\Video-Analytics-Dashboard\yolov5\utils\datasets.py", line 170, in init
raise Exception(f'ERROR: {p} does not exist')

the file is successfully uploaded but does not start when clicking the start tracking

multi streaming

How can I deploy multi streaming on streamlit app?
Well, In video upload, I upload cameras.txt where is rtsp:// urls, it works, but it shows only 1 stream in streamlit frontend, So I really don't get how to add another stframe = st.empty() and how to pass it another streaming video

Nothing on the screen

I have done exactly the same steps mentioned in the readme.
I see a blank screen(dashboard).

How do i execute the yolo weights to see through webcam or any video. Please see the screenshot of my screen.
Nothing opens up.
Screenshot from 2022-07-14 18-11-41

Filter with model.class

I want to filter detections with model.class = 1 or 2 but I couldn't get when you load model below I wrote model.class = 1 but didn't work.

Azure deploy

Hello, do you have any info what is system requirements for the azure to deploy it with cuda(So I need gpu server)?

and also I've searched it but didnt get any info for my question. is azure supports gpu servers with cuda
if you have infor bout it, please share it

.ckpt file

I want to ask about this ckpt file. I didn't see it in the checkpoint folder.
Thank you
image

CPU higher than GPU

Why the CPU usage higher than GPU (and fps too low) while already active GPU?
RTX 3070 8GB

AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

File "C:\Users\Bob\AppData\Roaming\Python\Python39\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in run_script
exec(code, module.dict)
File "C:\Users\Bob\Video-Analytics-Dashboard\app.py", line 232, in
main()
File "C:\Users\Bob\Video-Analytics-Dashboard\app.py", line 162, in main
detect(source='0', stframe=stframe, kpi1_text=kpi1_text, kpi2_text=kpi2_text, kpi3_text=kpi3_text, js1_text=js1_text, js2_text=js2_text, js3_text=js3_text, conf_thres=float(conf_thres), nosave=nosave, display_labels=display_labels, conf_thres_drift = float(conf_thres_drift), save_poor_frame
_= save_poor_frame__, inf_ov_1_text=inf_ov_1_text, inf_ov_2_text=inf_ov_2_text, inf_ov_3_text=inf_ov_3_text, inf_ov_4_text=inf_ov_4_text, fps_warn=fps_warn, fps_drop_warn_thresh = float(fps_drop_warn_thresh))
File "C:\Users\Bob\AppData\Roaming\Python\Python39\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Users\Bob\Video-Analytics-Dashboard\deep_list.py", line 170, in detect
pred = model(im, augment=augment, visualize=visualize)
File "C:\Users\Bob\AppData\Roaming\Python\Python39\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Bob\Video-Analytics-Dashboard\yolov5\models\common.py", line 402, in forward
y = self.model(im) if self.jit else self.model(im, augment=augment, visualize=visualize)
File "C:\Users\Bob\AppData\Roaming\Python\Python39\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Bob\Video-Analytics-Dashboard./yolov5\models\yolo.py", line 126, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "C:\Users\Bob\Video-Analytics-Dashboard./yolov5\models\yolo.py", line 149, in _forward_once
x = m(x) # run
File "C:\Users\Bob\AppData\Roaming\Python\Python39\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Bob\AppData\Roaming\Python\Python39\site-packages\torch\nn\modules\upsampling.py", line 157, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "C:\Users\Bob\AppData\Roaming\Python\Python39\site-packages\torch\nn\modules\module.py", line 1269, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.