❗❗ This repo will no longer be maintained, please visit https://github.com/milvus-io/bootcamp ❗ ❗
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.
- Milvus 2.0
- pymilvus-orm==2.0.0rc2
- tensorflow==1.14.0
- opencv-python==4.2.0.34
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 |
-
Install Milvusv2.0 as described in installation overview.
-
Install MySQL.
-
Pull the source code.
$ git clone https://github.com/zilliz-bootcamp/video_analysis.git
-
Installation dependencies.
$ pip install -r requirements.txt
-
Download YOLOv3 model.
$ cd webservice/yolov3_detector/data $ ./prepare_model.sh
-
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.
Logo recognition
Who is he/she?
Only him/her