6652 views|7 replies

381

Posts

9

Resources
The OP
 

Post a warm-up post for the 3rd RISC-V Application Innovation Competition of Xuantie Cup [Copy link]

I tried to install the inference framework on LicheePi 4A, but it crashed halfway through the installation. After repeated checks, I found that it was caused by insufficient space. So I tried a lightweight inference framework NCNN. First, I reinstalled the system. At this time, there was no cmake, no g++, and no opencv in the system. After installing these, less than 20% of the entire /root was left. I will not go into details about the specific installation method. In short, install cmake and g++ through apt, and the command is

sudo apt install cmake g++ --fix-missing

If opencv cannot be installed directly through apt, put the opencv source code compressed package (download path is https://codeload.github.com/opencv/opencv/zip/refs/tags/4.8.0 ) in a directory and unzip it. The command is

sudo unzip 4.8.0.zip

After decompression, enter the directory opencv-4.8.0, create a build directory and compile, you can execute the command

sudo cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..

You can see various configuration information, such as

Then use sudo make and sudo make install to complete the compilation and installation.

Installing NCNN is a little more troublesome, and requires the use of git, but you can also git to your computer first, then drag the entire directory into the board using sftp, and download the ncnn package from github:

sudo git clone --depth=1 https://github.com/Tencent/ncnn.git

There are still frequent errors. Use https://ghproxy.com to speed up.

git clone --depth=1 https://ghproxy.com/https://github.com/Tencent/ncnn.git

Then install it, it is very familiar

cd ncnn

sudo mkdir build

cd build

sudo cmake -DNCNN_VULKAN=OFF ..

sudo make

sudo make install

The installation is complete:

You can see that it supports converting various format models to use on ncnn (I will study it in depth when I have time, here I will only use the reference example squeezenet).

Copy squeezenet_v1.1.bin and squeezenet_v1.1.param in the examples file to the build/examples directory, and put a panda photo tobot.jpg in the same directory.

Using the command line to detect images

./ squeezent tobot.jpg

You can see that the top3 classifications of the image are output.

Open the synset_words.txt file again and you can see line 388

This means that the panda can be identified very accurately (with a probability of 99.9%).

After this installation, there is basically no space left under root, and the app will basically freeze after running for a few minutes. I will study later how to install the app on a TF card.

This post is from Electronics Design Contest

Latest reply

Does anyone have the schematic diagram of this power supply? Or something similar is also OK. I want to modify it into a power supply with adjustable current and voltage.  Details Published on 2024-3-22 14:36
 
 

5213

Posts

239

Resources
2
 

Can be sent to the Pingtouge RISC-V activity area

This post is from Electronics Design Contest
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
 
 
 

6818

Posts

11

Resources
3
 
You got the development board so soon? It seems that you have a chance to win the first place.
This post is from Electronics Design Contest
 
 
 

6742

Posts

2

Resources
4
 

Have you received the first batch of boards? I don’t know if they have passed yet.

This post is from Electronics Design Contest
 
 
 

4764

Posts

12

Resources
5
 
Looks like my board is almost ready.
This post is from Electronics Design Contest
 
 
 

623

Posts

0

Resources
6
 

The host is too fast.

This post is from Electronics Design Contest
 
 
 

6062

Posts

4

Resources
7
 

The system crashed and exited halfway through the installation. After repeated checking, I found out that it was caused by insufficient space. The OP was too quick!

This post is from Electronics Design Contest
 
 
 

1

Posts

0

Resources
8
 
Does anyone have the schematic diagram of this power supply? Or something similar is also OK. I want to modify it into a power supply with adjustable current and voltage.
This post is from Electronics Design Contest
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list