NCNN on VisionFive

Congratulation for Nihui on successfully running ncnn on VisionFive.

  • ncnn RISC-V — The Optimization Status
https://github.com/Tencent/ncnn.git
  • ncnn RISC-V — Download & Compilation
# ncnn uses simpleocv (replace opencv) to compile samples
git clone https://github.com/Tencent/ncnn.git
cd ncnn
mkdir build
cd build
cmake -DNCNN_DISABLE_RTTI=ON -DNCNN_DISABLE_EXCEPTION=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_RVV=OFF -DNCNN_SIMPLEOCV=ON ..
make -j2
  • ncnn RISC-V — Test benchncnn
# copy ncnn/benchmark/*.param to ncnn/build/benchmark
./benchncnn 8 2 0 -1 0
  • ncnn RISC-V — Test Example
# copy testing picture to VisionFive
# models could be downloaded here github.com/nihui/ncnn-assets/tree/master/models
./scrfd test.jpg
./yolov5 test.jpg

You could click on the following link to read the original article (written in Chinese).

3 Likes

I’m trying to make an inference on an image with a custom model, do you know how can I make it? I’ve tried copying the classes from the python examples and modifying the path to the model pasting the path of my model instead of using the function get_model(). I keep on getting errors and I can’t seem to find any solution.
FYI: I’m using a VisionFive2 with Ubuntu 22.04