This paper proposes a traffic police gesture recognition algorithm based on a nine-axis Inertial measurement unit(IMU). Two wearable devices are attached to both hands of the tester, and then eight types of standard traffic police gestures are performed 150 times. During the experiment, the two-channel data of three-axis acceleration, three-axis angular velocity, and three-axis magnetometer from both hands is collected for model training and validation. A Butterworth filter is utilized for denoising and then a Kalman filter is utilized for the fusion of data from two channels. After that, the feature extraction is implemented using the Fast Fourier transform (FFT), and the extracted feature values are used for training on a random forest model. Experimental results demonstrate that the proposed method has higher classification accuracy than related works in traffic police gesture recognition and can be applied in various areas such as autonomous driving, traffic police gesture training, etc.