Comments (7)
Compile source code has succeed;
but Compile example failed.
g++: error: openmp: 没有那个文件或目录
g++: error: thread: 没有那个文件或目录
g++: error: test.cpp: 没有那个文件或目录
Please help me!!! thank u
from ncnn.
@Pratyeka Have you installed openmp? For thread, maybe use -lpthread instead. And test.cpp is the source code file.
from ncnn.
Compile source code has succeed but compile example failed(we can't find test.cpp).
so what's your test.cpp?
How can I convert the caffe-cnn to ncnn-cnn and apply them in the phone?
Thanks!
from ncnn.
@BiranLi Hi, After I compile the ncnn source file, I write a makefile as follows:
NCNN = /home/vac/Desktop/ncnn
OPENCV = /home/vac/opencv/opencv-3.2.0
INCPATH = -I${NCNN}/build/install/include \
-I${OPENCV}/modules/objdetect/include \
-I${OPENCV}/modules/highgui/include \
-I${OPENCV}/modules/imgproc/include \
-I${OPENCV}/modules/core/include \
-I${OPENCV}/modules/imgcodecs/include \
-I${OPENCV}/modules/videoio/include
LIBS = -lopencv_core -lopencv_highgui -lopencv_imgproc \
-fopenmp -pthread
LIBPATH = -L${OPENCV}/build/lib
%:%.cpp
$(CXX) $(INCPATH) $(LIBPATH) $^ ${NCNN}/build/install/lib/libncnn.a $(LIBS) -o $@
Then I type `make squeezenet```,
however, I got a error:
g++ -I/home/vac/Desktop/ncnn/build/install/include -I/home/vac/opencv/opencv-3.2.0/modules/objdetect/include -I/home/vac/opencv/opencv-3.2.0/modules/highgui/include -I/home/vac/opencv/opencv-3.2.0/modules/imgproc/include -I/home/vac/opencv/opencv-3.2.0/modules/core/include -I/home/vac/opencv/opencv-3.2.0/modules/imgcodecs/include -I/home/vac/opencv/opencv-3.2.0/modules/videoio/include -L/home/vac/opencv/opencv-3.2.0/build/lib squeezenet.cpp /home/vac/Desktop/ncnn/build/install/lib/libncnn.a -lopencv_core -lopencv_highgui -lopencv_imgproc -fopenmp -pthread -o squeezenet
/tmp/ccIJ8RWP.o: In function `main':
squeezenet.cpp:(.text+0x507): undefined reference to `cv::imread(cv::String const&, int)'
collect2: error: ld returned 1 exit status
makefile:19: recipe for target 'squeezenet' failed
make: *** [squeezenet] Error 1
It seems a ld problem, but I can pretty sure nothing wrong with my opencv address.
Any suggestion? Thank u very much.
from ncnn.
依赖的protobuf:
sudo apt-get install protobuf-compiler
sudo apt-get install libprotobuf-dev
from ncnn.
@Vandermode Try to modify your opencv to version 2 . My working opencv's version is 2.4.13.
from ncnn.
@Vandermode this is probably because imread was moved to opencv_imgcodecs. Try to add -lopencv_imgcodecs to linker flags
from ncnn.
Related Issues (20)
- yolov8训练完成的模型转成ncnn的模型后,推理不出结果,网上查了说要进行前后处理,确实不会,能发个cpp的例子看看么! HOT 4
- ncnn-20240410使用-DNCNN_BF16=OFF编译报错 HOT 3
- rnn(lstm,gru),解卷积的量化以及增加weight only的量化 HOT 1
- 可以给生成的pnnx.py中的pytorch model 增加初始化权重默认入参么,方便迁移到其他地方使用
- 预编译库中,希望能增加macOS下的动态库版本供下载
- [pnnx]:torch.clamp_min convert failed HOT 2
- 目前RISCV版本中用到的RVV intrinsic代码已经不是最新版本了,有升级riscv intrinsic代码的计划吗?
- Android下的build,为什么默认关闭exception呢? HOT 5
- openmp冲突引起crash
- iPhone创建ncnn::net崩溃 HOT 2
- benchmark测试占用率低
- 手动创建的net,推理慢了很多
- yolov8n模型在鲲鹏ARM机器的检测结果和pytorch结果不一样 HOT 6
- 我有3个GPU,但get_gpu_count()=1 HOT 8
- pnnx和ncnn输出不一致
- I convert onnx to ncnn successfully, but all my inference is all nan. Eg, the output of net.extract() is all nan.
- 鲲鹏920环境,yolov8n模型int8量化速度比默认的fp16慢了50% HOT 5
- 在对mtcnn模型第二层进行./ncnn2table过程中出现了段错误
- Bad performance for int8 inference on XuanTie 906 (RISC-V) HOT 1
- intrinsic code 没有体现算法的原本的设计,是否有计划升级intrinsic code,并设置vset为ta mu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ncnn.