MCPcopy Index your code
hub / github.com/SahilChachra/Video-Analytics-Dashboard

github.com/SahilChachra/Video-Analytics-Dashboard @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
627 symbols 2,145 edges 64 files 97 documented · 15% updated 2y ago★ 903 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Video Analytics Tool using YoloV5 and Streamlit

:innocent: 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?

:framed_picture: Demo

https://user-images.githubusercontent.com/37156032/160282244-42f6bd8c-bfc8-47af-8973-d3d199140e44.mp4

:key: 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

:dizzy: 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

:star: Recent changelog

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

:exploding_head: 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'

:heart: Extras

Do checkout the Medium article and give this repo a :star:

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.

Core symbols most depended-on inside this repo

info
called by 151
yolov5/models/yolo.py
colorstr
called by 34
yolov5/utils/general.py
time_sync
called by 26
yolov5/utils/torch_utils.py
run
called by 22
yolov5/utils/callbacks.py
save
called by 21
yolov5/models/common.py
check_requirements
called by 18
yolov5/utils/general.py
plot
called by 18
yolov5/utils/metrics.py
tolist
called by 18
yolov5/models/common.py

Shape

Method 298
Function 235
Class 93
Route 1

Languages

Python100%

Modules by API surface

yolov5/models/common.py76 symbols
yolov5/utils/general.py67 symbols
yolov5/models/tf.py52 symbols
yolov5/utils/datasets.py48 symbols
deep_sort_pytorch/utils/json_logger.py30 symbols
yolov5/utils/plots.py27 symbols
yolov5/utils/torch_utils.py24 symbols
yolov5/utils/loggers/wandb/wandb_utils.py22 symbols
yolov5/utils/activations.py20 symbols
yolov5/models/yolo.py18 symbols
yolov5/utils/metrics.py17 symbols
yolov5/utils/loss.py14 symbols

For agents

$ claude mcp add Video-Analytics-Dashboard \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact