Recognition sleep state

The system according to the human gesture is determined whether the person sleeping in FIG.

A data crawling

Take pictures from Baidu climb to more than 1000 images of the body non-sleeping and sleeping posture pictures

Second, data extraction

A picture of each key point is detected, the data is stored to a csv file, and add the flag 0 (no sleep) and 1 (sleep). Since the decision to sleep posture is the key point

key_points = ['top_head', 'neck', 'left_shoulder', 'right_shoulder', 'left_elbow', 'right_elbow', 'left_wrist', 'right_wrist', 'left_hip', 'right_hip', 'left_knee', 'right_knee', 'left_ankle', 'right_ankle'],所以,只需获取这些关键点。

Third, data cleaning

Remove duplicate data containing a large amount of data with null values

Fourth, machine learning, modeling

Use sklearn random forest regression models for modeling

Fifth, the model evaluation

Confusion matrix:

[[125 0]
[ 13 11]]

Guess you like

Origin www.cnblogs.com/lzq666/p/12501677.html