pycaffe

I “import caffe” from ipython, but I got “RuntimeWarning”. How to resolve it?

血红的双手。 提交于 2019-12-02 00:43:21
I have read the article "Ubuntu Installation --Guide for Ubuntu 14.04 with a 64 bit processor." from Github website ( https://github.com/tiangolo/caffe/blob/ubuntu-tutorial-b/docs/install_apt2.md ). And now, I open IPython to test that PyCaffe is working. I input "ipython" command, and enter to the ipython page. Then, I input the command "import caffe", but I got below warnings: /root/code/caffe-master/python/caffe/pycaffe.py:13:RuntimeWarning: to-Python converter for boost::shared_ptr > already registered; second conversion method ignored. from ._caffe import Net, SGDSolver, NesterovSolver,

基于Anaconda编译caffe+pycaffe+matcaffe in Ubuntu[不用sudo权限]

一笑奈何 提交于 2019-11-30 13:38:29
目录 caffe 编译 环境 github下载caffe源码 依赖 修改源码的编译配置 报错 测试使用 pycaffe caffe matcaffe caffe 编译 环境 Ubuntu16.04 CUDA10 cuDNN gcc 5.4 g++ 5.4 大前提!! 在服务器上面装,但是没有sudo权限,所以依赖的包都只能装在自己用户下的conda环境里 按理来说这个要求应该不少吧。。但是搜出来一大堆博客都是要sudo权限,动不动就卸载、升级。。做不到啊。。只能各种在conda里删删减减。。真的好艰难!! github下载caffe源码 BVLC/caffe 依赖 anaconda3 装好之后,新建环境,最好用python2.7。下面都是装在这个新建的conda环境里,所以要注意先进入该环境! 在caffe/python目录下 pip install -r requirements.txt #requirements.txt 在conda的环境中装必要的包 我装的版本 python2 , opencv3 版本一致很重要! conda install boost conda install glog conda install gflags conda install libprotobuf conda install hdf5=1.8.16 #[!重要] conda install

Faster RCNN for TensorFlow

喜你入骨 提交于 2019-11-29 20:51:44
Has anyone implement the FRCNN for TensorFlow version? I found some related repos as following: Implement roi pool layer Implement fast RCNN based on py-faster-rcnn repo but for 1: assume the roi pooling layer works (I haven't tried), and there are something need to be implemented as following: ROI data layer e.g. roidb . Linear Regression e.g. SmoothL1Loss ROI pool layer post-processing for end-to-end training which should convert the ROI pooling layer's results to feed into CNN for classifier. For 2: em...., it seems based on py-faster-rcnn which based on Caffe to prepared pre-processing (e

anaconda 安装caffe,cntk,theano-未整理

半腔热情 提交于 2019-11-29 11:08:44
一,anancona 安装 https://repo.anaconda.com/archive/ conda create -n caffe_gpu -c defaults python=3.6 caffe-gpu conda create -n caffe -c defaults python=3.6 caffe 测试: import caffe python -c "import caffe; print dir(caffe)" 参考: https://blog.csdn.net/weixin_37251044/article/details/79763858 一、编译Caffe、PyCaffe URL : https://github.com/BVLC/caffe.git 1 1.下载Caffe git clone https://github.com/BVLC/caffe.git cd caffe 注意:如果想在anaconda下使用,就先 source activate caffe_env 然后在这个环境下安装 利用anaconda2随意切换proto的版本,多proto并存,protobuf,libprotobuf 2.编译caffe 用cmake默认配置: [注意]:一般需要修改config文件。 进入caffe根目录 mkdir build cd build

Backward pass in Caffe Python Layer is not called/working?

二次信任 提交于 2019-11-29 05:13:28
I am unsuccessfully trying to implement a simple loss layer in Python using Caffe. As reference, I found several layers implemented in Python, including here , here and here . Starting with the EuclideanLossLayer as provided by the Caffe documentation/examples, I was not able to get it working and startd debugging. Even using this simple TestLayer : def setup(self, bottom, top): """ Checks the correct number of bottom inputs. :param bottom: bottom inputs :type bottom: [numpy.ndarray] :param top: top outputs :type top: [numpy.ndarray] """ print 'setup' def reshape(self, bottom, top): """ Make

Caffe: how to get the phase of a Python layer?

本秂侑毒 提交于 2019-11-29 04:02:48
I created a "Python" layer "myLayer" in caffe, and use it in the net train_val.prototxt I insert the layer like this: layer { name: "my_py_layer" type: "Python" bottom: "in" top: "out" python_param { module: "my_module_name" layer: "myLayer" } include { phase: TRAIN } # THIS IS THE TRICKY PART! } Now, my layer only participates in the TRAIN ing phase of the net, how can I know that in my layer's setup function?? class myLayer(caffe.Layer): def setup(self, bottom, top): # I want to know here what is the phase?!! ... PS, I posted this question on "Caffe Users" google group as well. I'll udpdate

NameError: name 'get_ipython' is not defined

泪湿孤枕 提交于 2019-11-28 21:11:29
I am working on Caffe framework and using PyCaffe interface. I am using a Python script obtained from converting the IPython Notebook 00-classification.ipynb for testing the classification by a trained model for ImageNet. But any get_ipython() statement in the script is giving the following error: $ python python/my_test_imagenet.py Traceback (most recent call last): File "python/my_test_imagenet.py", line 23, in <module> get_ipython().magic(u'matplotlib inline') In the script, I'm importing the following: import numpy as np import matplotlib.pyplot as plt get_ipython().magic(u'matplotlib

Faster RCNN for TensorFlow

懵懂的女人 提交于 2019-11-28 16:59:50
问题 Has anyone implement the FRCNN for TensorFlow version? I found some related repos as following: Implement roi pool layer Implement fast RCNN based on py-faster-rcnn repo but for 1: assume the roi pooling layer works (I haven't tried), and there are something need to be implemented as following: ROI data layer e.g. roidb. Linear Regression e.g. SmoothL1Loss ROI pool layer post-processing for end-to-end training which should convert the ROI pooling layer's results to feed into CNN for

Building custom Caffe layer in python

大兔子大兔子 提交于 2019-11-28 03:43:19
After parsing many links regarding building Caffe layers in Python i still have difficulties in understanding few concepts. Can please someone clarify them? Blobs and weights python structure for network is explained here: Finding gradient of a Caffe conv-filter with regards to input . Network and Solver structure is explained here: Cheat sheet for caffe / pycaffe? . Example of defining python layer is here: pyloss.py on git . Layer tests here: test layer on git . Development of new layers for C++ is described here: git wiki . What I am still missing is: setup() method: what I should do here?

Cheat sheet for caffe / pycaffe?

时光怂恿深爱的人放手 提交于 2019-11-28 02:47:01
Does anyone know whether there is a cheat sheet for all important pycaffe commands? I was so far using caffe only via Matlab interface and terminal + bash scripts. I wanted to shift towards using ipython and work through the ipython notebook examples. However I find it hard to get an overview of all the functions that are inside the caffe module for python. (I'm also quite new to python). The pycaffe tests and this file are the main gateway to the python coding interface. First of all, you would like to choose whether to use Caffe with CPU or GPU. It is sufficient to call caffe.set_mode_cpu()