The correct code is stored in lifang535/dance.
Mainly including VideoToFrame, ObjectDetection, PostureRecognition, PersonRecognition, GenderRecognition, AgeRecognition, ExpressionRecognition and FrameToVideo.
The modules are in dance/module:
VideoToFrame: Extracts frames from video, and sends them toObjectDetection.ObjectDetection: Detects persons, and sends them with boxes toPostureRecognitionandPersonRecognitionrespectively.PostureRecognition: Reads the posture in the box of the frame, and sends frame with box and label toFrameToVideo.PersonRecognition: Recognizes the face in the box of the frame, and sends frame with box and label toGenderRecognition.GenderRecognition: Recognizes the gender in the box of the frame, and sends frame with box and label toAgeRecognition.AgeRecognition: Recognizes the age in the box of the frame, and sends frame with box and label toExpressionRecognition.ExpressionRecognition: Recognizes the expression in the box of the frame, and sends frame with box and label toFrameToVideo.FrameToVideo: Collects frames with boxes, labels and postures, and combines them into a video.
ObjectDetection: YOLOs TinyPostureRecognition: OpenposePersonRecognition: Face RecognitionGenderRecognition: Gender RecognitionAgeRecognition: Age RecognitionExpressionRecognition: Expression Recognition
Install the required libraries:
$ pip3 install -r requirements.txtAdjust configuration in dance/module/configs.py.
Execute:
$ cd module
$ python3 pipeline.pyThen, the pipeline will read the videos from dance/input_video, process them, and save the processed videos in dance/output_video.
Note: This is an image of the traffic monitoring pipeline. Please make sure to clone the dance monitoring pipeline repository first.
$ docker search traffic_monitoring_pipeline$ docker pull lifang535/traffic_monitoring_pipeline_with_git_v3$ docker run --gpus all -it --rm --name temp traffic_monitoring_pipeline_with_git_v3All dependencies have been installed. Execute the following commands:
$ cd /
$ git clone https://github.com/lifang535/dance.gitExecute:
$ cd dance/module
$ python3 pipeline.py