The project is about gait recognition based on deep-learning using NPU on AMD PC AI. I convert GaitSet(a gait recognition model in pytorch) from pytorch to onnx model and quantize it for NPU. And with the codes, the onnx model can be deployed on NPU. It can predict the feature results with the input of silhouettes and use the feature to distinguish different people. The silhouettes can be get from camera or videos with the help of OpenCV.
As an emerging biometric method, gait recognition has the advantages of being easy to adapt to the environment, unable to camouflage, can be acquired from a distance, and requires lower image resolution compared to face recognition and fingerprint recognition. At present, researchers at China and abroad have gradually applied gait recognition to identification, security monitoring, and disease prediction. Transplanting the gait recognition technology to the NPU of PC AI will become an important research direction.
In the program, I first extract silhouettes(small grey image with a person) from camera and videos by OpenCV. Then we assign the silhouettes as NCHW format([1, 100, 64, 44]). After that, the silhouettes are sent as onnx model's input. And the onnx model predicts result (feature) on NPU of PC AI. Finally, I analyze the result (feature) to distinguish different persons.
In the following picture, there are some results. I test the onnx model on CASIA-B dataset. NM is normal walking state, BG is walking with a bag and CL is walking with a coat. The result is very close to the GaitSet(Pytorch)'s result on the same dataset.
Comments