download directly at weiyun or google driver
or export onnx:
git clone https://github.com/thepowerfuldeez/facemesh.pytorch
# Please use the alpha_export.py script provided by this repo to export onnx
cp alpha_export.py facemesh.pytorch
cd facemesh.pytorch
python alpha_export.py --weights=facemesh.pth
# note: If you have obtained onnx by downloading, this step can be ignored
ignore
# put your onnx file in this path:tensorrt-alpha/data/facemesh
cd tensorrt-alpha/data/facemesh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/TensorRT-8.4.2.4/lib
../../../../TensorRT-8.4.2.4/bin/trtexec --onnx=facemesh.onnx --saveEngine=facemesh.trt --minShapes=image:2x3x192x192 --optShapes=image:2x3x192x192 --maxShapes=image:8x3x192x192
git clone https://github.com/FeiYull/tensorrt-alpha
cd tensorrt-alpha/facemesh
mkdir build
cd build
cmake ..
make -j10
# note: the dstImage will be saved in tensorrt-alpha/facemesh/build by default
./app_facemesh --model=../../data/facemesh/facemesh.trt --size=192 --imgs_dir=../../data/ --show --savePath
ignore