This task aims to create a simple web-based Video Analytics System (VAS) to analyze content from videos with the following inputs and outputs:
-
Input:
- Any YouTube video URL
- Upload a video from a local computer
-
Ouput: Analyzing basic video content and display results on the web while playing the video. For example:
- Counting people and other objects in each frame and presenting the results synchronized while playing the video;
- Illustrating a canvas that exhibits detected objects (bounding box and object name) in each frame, synchronized with the video.
In this task, I utilize Flask
, a Python framework, to develop a basic website, while employing YOLOv8
model for content analysis in videos. Furthermore, in order to handle Youtube URLs, I employ pytube
library for downloading YouTube Videos.
Notably, all results in the Example results section were obtained using the nano YOLOv8 model(yolov8n.pt). Furthermore, if you have a strong GPU, you may consider using a larger YOLOv8 model, which provides more accurate predictions but takes longer to process.
I recommend creating an anaconda environment:
conda create --name vas python=3.9
Then, install Python requirements:
pip install -r requirements.txt
Finally, from the vas
project root, run:
python app.py
This section illustrates the website's layout and its functions
This section provides an overview of the results from the provided examples located in the Examples
folder. Furthermore, please access the complete video outputs by following this link.