This repository contains a simple Python script which runs Mediapipe's hair segmentation model using OpenCV on RISC-V CPU.
-
Download a compiler: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-20220906.tar.gz and put to
opencv_riscv64
folder without unpacking. -
Build OpenCV:
docker build -t opencv opencv_riscv64 docker run -v $(pwd):/mnt opencv sh -c "cp *.tar.gz /mnt"
-
Download deep learning model
-
Start a telegram bot:
python bot.py --token=xxx
HW: Sipeed Lichee RV Dock (Allwinner D1 aka XuanTie C906 CPU)
OS: 20211230_LicheeRV_debian_d1_hdmi_8723ds
input | no RVV | RVV |
---|---|---|
512x512 | 3.5 seconds | 2.35 seconds (x1.48) |