caffe

“/usr/bin/ld: cannot find -lopenblas” error in Caffe compilation

夙愿已清 提交于 2020-07-06 12:06:56
问题 When I was compiling Caffe, I had this error, despite OpenBLAS is installed: AR -o .build_release/lib/libcaffe.a LD -o .build_release/lib/libcaffe.so /usr/bin/ld: cannot find -lopenblas collect2: ld devolvió el estado de salida 1 make: *** [.build_release/lib/libcaffe.so] Error 1 Is there a solution for it? 回答1: Including the base packs even after cloning OpenBlas and making will link the appropriate libraries in 14.04 and 16. apt install liblapack-dev liblapack3 libopenblas-base libopenblas

“/usr/bin/ld: cannot find -lopenblas” error in Caffe compilation

烂漫一生 提交于 2020-07-06 12:05:55
问题 When I was compiling Caffe, I had this error, despite OpenBLAS is installed: AR -o .build_release/lib/libcaffe.a LD -o .build_release/lib/libcaffe.so /usr/bin/ld: cannot find -lopenblas collect2: ld devolvió el estado de salida 1 make: *** [.build_release/lib/libcaffe.so] Error 1 Is there a solution for it? 回答1: Including the base packs even after cloning OpenBlas and making will link the appropriate libraries in 14.04 and 16. apt install liblapack-dev liblapack3 libopenblas-base libopenblas

How to modify the Imagenet Caffe Model?

|▌冷眼眸甩不掉的悲伤 提交于 2020-06-22 08:12:25
问题 I would like to modify the ImageNet caffe model as described bellow: As the input channel number for temporal nets is different from that of spatial nets (20 vs. 3), we average the ImageNet model filters of first layer across the channel, and then copy the average results 20 times as the initialization of temporal nets. My question is how can I achive the above results? How can I open the caffe model to be able to do those changes to it? I read the net surgery tutorial but it doesn't cover

How to increase validation accuracy with deep neural net?

耗尽温柔 提交于 2020-05-24 08:23:41
问题 I am trying to build a 11 class image classifier with 13000 training images and 3000 validation images. I am using deep neural network which is being trained using mxnet. Training accuracy is increasing and reached above 80% but validation accuracy is coming in range of 54-57% and its not increasing. What can be the issue here? Should I increase the no of images? 回答1: The issue here is that your network stop learning useful general features at some point and start adapting to peculiarities of

protobuf深坑-版本冲突-彻底解决

ⅰ亾dé卋堺 提交于 2020-05-09 20:22:36
由于安装了anaconda ,caffe,后面又安装了pytorch,mmdetection,tensorboardX,导致环境中protoc和protobuf相当混乱 后面在编译caffe的时候,已经编辑不过去了。所以折腾了一段时间,终于知道如何彻底解决这个问题了,麻麻在也不用担心我的protobuf的冲突了。 1:一般protobuf安装有3种方式 apt-get install libprotobuf-dev protobuf-compiler[安装在系统] pip install protobuf==3.0.0[安装在python] conda install libprotobuf=3.0.0[安装在anaconda] 2:针对3种分别卸载 sudo apt-get remove libprotobuf-dev sudo apt-get remove protobuf-compiler sudo apt-get remove python-protobuf sudo rm -rf /usr/local/bin/protoc sudo rm -rf /usr/bin/protoc sudo rm -rf /usr/local/include/google sudo rm -rf /usr/local/include/protobuf* sudo rm -rf /usr

《一》TensorRT之基本概念

早过忘川 提交于 2020-05-08 17:53:28
以下内容根据个人理解整理而成,如有错误,欢迎指出,不胜感激。 0. 写在前面 由于近期的工作需要用到TensorRT和TensorRT Inference Server,自己也是第一次接触,因此在这里记录下相关的学习和使用笔记,内容主要来自于官方相关文档,如 TensorRT Developer Guide 等。 本文主要记录TensorRT相关的基础知识,主要包括以下几个方面: 什么是TensorRT TensorRT的工作原理 TensorRT学习资源总结 1. 什么是TensorRT 可以把TensorRT看做一个“深度学习框架”,不同于常用的TensorFlow、PyTorch和Caffe等深度学习框架,TensorRT的目的不是如何训练我们的深度学习模型,而是考虑如何将那些使用其他框架训练好的模型进行高效快速的Inference。 官方 的这张图可以很明确的说明TensorRT的作用:用于模型训练完之后的部署阶段,以进行高效低延时的Inference: 要注意,TensorRT是NVIDIA配套其相关GPU提供的,并不支持在CPU和其他GPU上使用。 2. TensorRT的工作原理 这里会有疑问: 直接使用TensorFlow和PyTorch等模型进行部署不可以吗? 这当然是可以的,只是TensorRT是一个专用的Inference工具,使用它进行部署会使模型运行更高效

Deep Convolutional Network Cascade for Facial Point Detection实践总结

点点圈 提交于 2020-05-08 08:06:08
测试代码:https://github.com/luoyetx/mini-caffe/tree/master (example中deeplandmark例子) 训练代码:https://github.com/luoyetx/deep-landmark 测试代码的配置参考:http://blog.csdn.net/xzzppp/article/details/68495341 训练代码,在配置好GPU版本caffe后,按github步骤,很好配置。 测试阶段: 一,用作者提供的正脸图像进行测试,发现效果较好,如下图所示: 二,思考:是不是对其他图片识别效果也不错,用其他图像进行测试,发现效果如下(贴出部分检测到的图片): 图片效果: 直观上看,关键点定位还行,人脸检测比较差,很多人脸检测不出,人脸检测用opencv实现的。 三,发现:有难度的基本没检测出来,解决方法两个思路:要么换个效果较好的检测器,要么手动截取人脸做landmark。我先手动截取人脸,输入到CNN网络中做landmark。 整图是我抠出的人脸,红色框是程序自带的缩小人脸中关键点检测范围。对于同一个图片,我抠出了不同大小的人脸。但效果测试下来不太理想,甚至比用自带检测器检测做的人脸关键点检测的demo的效果还差 四、分析和解决问题 分析:可能是检测器的问题,继续试验:对自带检测器检测到的人脸框,分别进行放大、缩小操作

jquery+flask+keras+nsfw快速搭建一个简易鉴黄工具

此生再无相见时 提交于 2020-05-06 02:07:47
1. demo 地址: http://www.huchengchun.com:8127/porn_classification 接口说明: 1. http://www.huchengchun.com:8127/porn_classification 提供了一个简易的网页工具,用户可以上传若干张图片,服务端会传回每一张图片是否是色情图片的判定,结果的形式是json格式。截图如下: 返回结果的说明: 返回结果整体是一个json,key是加上时间戳后缀的上传图片名称,value是上传图片的色情的判定,其中: hentai 表示变态图片;drawings 表示普通的绘画图片;porn表示色情图片(可能会漏点),sexy 表示性感图片,neutral 表示中性图片。 status 字段表示本次判定的结果是否正常。status = 'normal' 表示正常;status = 'error'表示异常。 2. 还支持了http get 对网页图片进行判定,请求的格式为: http://www.huchengchun.com:8127/porn_classification?img_url=xxx 其中 xxx 是网络图片的地址,目前只支持以jpg 和png结尾的格式。比如如下的请求返回的结果 http: // www.huchengchun.com:8127/porn

使用Anaconda虚拟环境编译caffe-gpu pycaffe

北慕城南 提交于 2020-05-04 02:07:51
#1. 前提: 安装前服务器情况,已经安装好了: CUDNN=7.3.0 CUDA=10.0.130 Opencv 2.4.13 相应命令为: cuda 版本 cat /usr/local/cuda/version.txt cudnn 版本 cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2 opencv版本 pkg-config opencv --modversion #2. 准备caffe, python环境 从 https://github.com/BVLC/caffe 下载caffe, 用unzip命令解压. python我使用的是Anaconda虚拟环境, 最后附上environment_caffe_27.yml文件, 如果需要可以直接使用下面的命令安装,或者手动安装. conda env create -f environment_caffe_27.yml environment_caffe_27.yml文件内容如下,复制重命名即可: name: caffe_27 channels: - defaults dependencies: - backports=1.0=py27_1 - backports.functools_lru_cache=1.5=py27_1 - backports.shutil

Caffe初学者第一部:Ubuntu14.04上安装caffe(CPU)+Python的详细过程 (亲测成功, 20180524更新)

两盒软妹~` 提交于 2020-05-04 02:01:29
前言: 最近在学习深度学习,最先要解决的当然是开源框架的环境安装了。之前一直在学习谷歌的Tensorflow开源框架,最近实验中需要跟别人的算法比较,下载的别人的代码很多都是Caffe的,所以想着搭建好Caffe环境跑别人的代码。这中间经历过很多弯路,开始是入了Ubuntu16.04的坑,很多教程都说GCC版本不匹配,需要降级,我也尝试过发现很多坑;另外,就是安装matlab版本的Caffe以及安装GPU版本的Caffe,都经历了很多的波折,这前后摸索大概花了半个月左右。最后发现Ubuntu14.04最适合安装Caffe环境。 于是,我想着既然GPU版本或者matlab版本的Caffe环境配置很多坑,为什么不先从最简单的CPU+Python版本开始配置呢?到后面对Caffe框架熟悉了或者有需要用matcaffe的时候,再去摸索GPU或者matlab版本的Caffe配置。这就是我写本博客的初衷,先写个配置Caffe CPU ONLY版本的博客教程,希望初学者不再对caffe环境配置谈虎色变。话不多说,开始我们的教程吧! 首先,说一下本教程适用的计算机系统环境,本人笔记本安装了Win7+Ubuntu14.04双系统。至于安装双系统,可以参考网上博客:https://www.jianshu.com/p/dfd9436956b9 我下载的Ubuntu14.04是Kyliin版本