Skip to content

Recognize faces and objects in the video based on Milvus.

Notifications You must be signed in to change notification settings

zilliz-bootcamp/video_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

❗❗ This repo will no longer be maintained, please visit https://github.com/milvus-io/bootcamp ❗ ❗

Video analysis based on Milvus

Common video analytics systems can automatically identify and track the types of moving targets that appear in the video area, and can monitor multiple targets in the same scene simultaneously. The analyzed video can be used in a wide range of applications, such as advertising recommendations, security and entertainment industries. This project uses YOLOv3 and insightface, combined with frame capturing technique of OpenCV, to recognize logos on objects that appear in the video and track and identify faces.

Environmental preparation

  • Milvus 2.0
  • pymilvus-orm==2.0.0rc2
  • tensorflow==1.14.0
  • opencv-python==4.2.0.34

Parameter description

This project contains webservice and webclient. Webservice provides the code for the backend service. Webclient provides the scripts for the frontend interface.

The following describes the important parameters of webservice.

common/config.py

Parameter Description Default
MILVUS_HOST Milvus service IP 127.0.0.1
MILVUS_PORT Milvus service port 19530
LOGO_DIMENSION Dimension of logo 2048
FACE_DIMENSION Dimension of face 512
MYSQL_USER MySql user name root
MYSQL_PASSWORD MySql password 123456
MYSQL_DB MySql database name mysql
COCO_MODEL_PATH Path of YOLOv3 model None
YOLO_CONFIG_PATH Path of config file None
FACE_MODEL_PATH Path of insightface model None

Steps

  1. Install Milvusv2.0 as described in installation overview.

  2. Install MySQL.

  3. Pull the source code.

    $ git clone https://github.com/zilliz-bootcamp/video_analysis.git
  4. Installation dependencies.

    $ pip install -r requirements.txt
  5. Download YOLOv3 model.

    $ cd webservice/yolov3_detector/data
    $ ./prepare_model.sh
  6. Start service.

    $ cd ../..
    $ python main.py
    # You are expected to see the following outputs.
    ...
    INFO:     Started server process [71037]
    INFO:     Waiting for application startup.
    INFO:     Application startup complete.
    INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ...

    Now, get the API by visiting http://127.0.0.1:8000/docs in your browser.

Results display

Logo recognition

pic_1

Who is he/she?

pic 2

Only him/her

pic 3

Releases

No releases published

Packages

No packages published