Questions tagged [pycaffe]

The Python interface – pycaffe – is the caffe module and its scripts in caffe/python.

pycaffe
Filter by
Sorted by
Tagged with
68 votes
4 answers
131k views

NameError: name 'get_ipython' is not defined

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 ...
dyno8426's user avatar
  • 1,219
45 votes
2 answers
27k views

Cheat sheet for caffe / pycaffe?

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 ...
mcExchange's user avatar
  • 6,330
45 votes
1 answer
19k views

Faster RCNN for TensorFlow

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 ...
RyanLiu's user avatar
  • 1,575
21 votes
7 answers
28k views

Exception: "dot" not found in path in python on mac

I want to use caffe.draw to draw the caffe net by anaconda python on mac. But I got the error like this: File "python/draw_net.py", line 45, in <module> main() File "python/draw_net.py", ...
XiaXuehai's user avatar
  • 610
18 votes
2 answers
10k views

Building custom Caffe layer in python

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 ...
loknar's user avatar
  • 549
15 votes
2 answers
5k views

Multiple category classification in Caffe

I thought we might be able to compile a Caffeinated description of some methods of performing multiple category classification. By multi category classification I mean: The input data containing ...
Aidan Gomez's user avatar
  • 8,337
11 votes
1 answer
11k views

PyInstaller "ValueError: too many values to unpack"

Pyinstaller version 3.2 OS: win10 My python script work well in Winpython Python Interpreters. But when I using Pyinstaller packages a python script include caffe module, I will face the problem: “...
Chi-Fang Hsieh's user avatar
10 votes
2 answers
8k views

caffe data layer example step by step

I want to find a caffe python data layer example to learn. I know that Fast-RCNN has a python data layer, but it's rather complicated since I am not familiar with object detection. So my question is, ...
kli_nlpr's user avatar
  • 894
10 votes
2 answers
4k views

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

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" ...
Shai's user avatar
  • 113k
8 votes
2 answers
2k views

deep learning - a number of naive questions about caffe

I am trying to understand the basics of caffe, in particular to use with python. My understanding is that the model definition (say a given neural net architecture) must be included in the '.prototxt'...
Alejandro Simkievich's user avatar
8 votes
1 answer
2k views

Spark problems with imports in Python

We are running a spark-submit command on a python script that uses Spark to parallelize object detection in Python using Caffe. The script itself runs perfectly fine if run in a Python-only script, ...
alfredox's user avatar
  • 4,242
8 votes
1 answer
5k views

Caffe Iteration loss versus Train Net loss

I'm using caffe to train a CNN with a Euclidean loss layer at the bottom, and my solver.prototxt file configured to display every 100 iterations. I see something like this, Iteration 4400, loss = 0 ...
user3543300's user avatar
8 votes
1 answer
2k views

Multi-label classification with Caffe

I want to fine-tune GoogLeNet to do Multi-label classification with Caffe. I have already fine-tuned it to a single-label classification, but I can't make the transition to Multi-label yet. The main ...
YotamH's user avatar
  • 95
7 votes
2 answers
1k views

Multiple pretrained networks in Caffe

Is there a simple way (e.g. without modifying caffe code) to load wights from multiple pretrained networks into one network? The network contains some layers with same dimensions and names as both ...
Igor Ševo's user avatar
  • 5,477
7 votes
1 answer
5k views

how to append data to existing LMDB?

I have around 1 million images to put in this dataset 10000 at a time appended to the set. I"m sure the map_size is wrong with ref from this article used this line to create the set env = lmdb....
Arsenal Fanatic's user avatar
6 votes
4 answers
13k views

Extracting weights from .caffemodel without caffe installed in Python

Is there a relatively simple way to extract weights in Python from one of the many pretrained models in Caffe Zoo WITHOUT CAFFE (nor pyCaffe)? i.e. parsing .caffemodel to hdf5/numpy or whatever format ...
jeandut's user avatar
  • 2,503
6 votes
2 answers
4k views

Lnk2019 error in pycaffe in debug mode for Caffe for Windows

I'm using BVLC Caffe on the Windows branch, which is currently unsupported. When I try to compile pycaffe in debug mode on Visual Studio 2013 I get the errors _caffe.obj : error LNK2019: unresolved ...
empty's user avatar
  • 5,304
6 votes
1 answer
4k views

How reconstruct the caffe net by using pycaffe

What I want is, After loading a net, I will decompose some certain layers and save the new net. For example Orignial net: data -> conv1 -> conv2 -> fc1 -> fc2 -> softmax; New net: data -> ...
dremaingo's user avatar
6 votes
1 answer
3k views

Rename Caffe layers through pycaffe

Is there a simple way of renaming layers in a caffe network by using the pycaffe interface? I have looked through the net surgery example, but I cannot find an example of what I need. For example, I ...
Igor Ševo's user avatar
  • 5,477
6 votes
1 answer
3k views

How to modify the Imagenet Caffe Model?

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 ...
AMayer's user avatar
  • 415
6 votes
1 answer
3k views

What's the difference between Softmax and SoftmaxWithLoss layer in caffe?

While defining prototxt in caffe, I found sometimes we use Softmax as the last layer type, sometimes we use SoftmaxWithLoss, I know the Softmax layer will return the probability the input data belongs ...
Eric Luo's user avatar
  • 339
6 votes
1 answer
5k views

RMSprop, Adam, AdaDelta test accuracy does not improve using Caffe

I am finetuning using Caffe on an image dataset on a Tesla K40. Using a batch size=47, solver_type=SGD, base_lr=0.001, lr_policy="step", momentum=0.9, gamma=0.1, the training loss decreases and test ...
VeilEclipse's user avatar
  • 2,796
5 votes
1 answer
20k views

cp: not writing through dangling symlink '/usr/lib/x86_64-linux-gnu/libhdf5.so'

I am facing this issue, Could you please give me some hints how to solve this: $sudo cp ~/anaconda2/lib/libhdf5* /usr/lib/x86_64-linux-gnu/ cp: not writing through dangling symlink '/usr/lib/x86_64-...
S.EB's user avatar
  • 2,150
5 votes
1 answer
1k views

What's the difference between net.layers.blobs and net.params in Caffe

I am using Python Caffe, and confused with net.layers[layer_index].blobs and net.params[layer_type]. If I understand well, net.params contains all the network parameters. Take the LeNet for example, ...
feelfree's user avatar
  • 11.5k
5 votes
1 answer
926 views

Is there any example of using weighted loss for pixel-wise segmentation/classification tasks?

I am doing FCN32 semantic segmentation on my data. I ran the algorithm to fine-tune for my data (grayscale images with only one channel), till 80,000 iterations; however, the loss and accuracy are ...
S.EB's user avatar
  • 2,150
5 votes
1 answer
2k views

Image classification in Caffe always returns same class

I have an issue with an image classification in caffe. I use the imagenet model (from the caffe tutorial) for classification of data I created, but I always get the same classification result (same ...
Mr M's user avatar
  • 69
5 votes
1 answer
2k views

Caffe HDF5 pixel-wise classification

I am trying to implement a pixel-wise binary classification for images using caffe. For each image having dimension 3x256x256, I have a 256x256 label array in which each entry is marked as either 0 ...
Unni's user avatar
  • 5,656
5 votes
0 answers
3k views

Python import fails with "dlopen: cannot load any more object with static TLS"

I have written a multi-threaded module called fast_nn in Cython and compiled it with the following setup.py: from distutils.core import setup from distutils.extension import Extension from Cython....
Callidior's user avatar
  • 2,894
5 votes
3 answers
11k views

Pycharm Couldn't connect to console process

I recently installed Caffe along with OpenCV and other dependencies. Pycharm worked well for 2 days and today I can't start Python Console in Pycharm anymore. I can start python in terminal with no ...
Steven D's user avatar
4 votes
1 answer
4k views

Caffe: what's the difference between train_test.prototxt and deploy.prototxt?

In pertained models like GoogleNet https://github.com/BVLC/caffe/tree/master/models/bvlc_googlenet we can see two .prototxt file describing the network, what's the differences between them? deploy....
Long's user avatar
  • 366
4 votes
1 answer
5k views

caffe fully convolutional cnn - how to use the crop parameters

I am trying to train a fully convolutional network for my problem. I am using the implementation https://github.com/shelhamer/fcn.berkeleyvision.org . I have different image sizes. I am not sure how ...
user570593's user avatar
  • 3,440
4 votes
2 answers
5k views

Caffe shape mismatch error using pretrained VGG-16 model

I am using PyCaffe to implement a neural network inspired by the VGG 16 layer network. I want to use the pre-trained model available from their GitHub page. Generally this works by matching layer ...
marcman's user avatar
  • 3,313
4 votes
2 answers
783 views

Modify threshold in ReLU in Caffe framework

I am new to Caffe, and now I need to modify the threshold values in ReLU layers in a convolution neural network. The way I am using now to modify thresholds is to edit the C++ source code in caffe/src/...
zbqv's user avatar
  • 79
4 votes
1 answer
19k views

pyplot axes title not showing

I have written this code to check object bounding box but when I give title to the axes, it doesn't show up. (I was going to give the file number as title). #!/home/ckim/anaconda2/bin/python #%pylab ...
Chan Kim's user avatar
  • 5,541
4 votes
1 answer
2k views

Caffe feature extraction is too slow? caffe.Classifier or caffe.Net

I have trained a model with images. And now would like to extract the fc-6 features to .npy files. I'm using caffe.set_mode_gpu()to run the caffe.Classifier and extract the features. Instead of ...
Arsenal Fanatic's user avatar
4 votes
2 answers
2k views

How to interpret the file mean.binaryproto when loading a Neural Network?

I want to load a Neural Network that has been trained with caffe for image classification. The NN contains a file mean.binaryproto which has the means to be subtracted before inputting an image to be ...
roschach's user avatar
  • 8,852
4 votes
4 answers
270 views

Place some nodes of the same network on GPU and others on CPU?

When defining a network in Caffe/Caffe2, can you place some of the nodes on the CPU and others on GPU? If so, how? (If your answer pertains a specific version of Caffe, please specify which)
MWB's user avatar
  • 12k
4 votes
2 answers
533 views

How good is training in pycaffe compared to caffe?

I want to try using pycaffe interface to train caffe models. Particularly I want to use a python layer for input data. Will this training be slow or will pycaffe just act as an interface to actual ...
curio17's user avatar
  • 680
4 votes
1 answer
4k views

fast-r-cnn: caffe.LayerParameter" has no field named "roi_pooling_param

When I tried to run ./tools/demo.py of fast-r-cnn. working on UBUNTU 16.04 I got the following error, although the caffe is successfully installed!! ./tools/demo.py WARNING: Logging before ...
user avatar
4 votes
1 answer
882 views

Accuracy is not improving further

I am using pre-trained GoogLeNet and then fine tuned it on my dataset for classifying 11 classes. I tried the following configurations with different base_learning rate, but the accuracy is not ...
fkeufss's user avatar
  • 85
4 votes
2 answers
364 views

Issues in save - load apollocaffe models

I am saving my trained model using following command: net.save(model_name) And then loading it using following command: net.load(model_name) But after loading the model, when I am trying to print ...
Shweta's user avatar
  • 1,161
4 votes
0 answers
3k views

libprotobuf.so.8 cannot open shared object file

I installed caffe on Ubuntu 16.04. In the terminal I type into Python and import caffe, no error tips. When I run a Python script use 'python demo.PY' I get one error with the following tip: from ...
yann's user avatar
  • 652
4 votes
2 answers
549 views

Limit Caffe CPU core usage?

Is there a way to limit Caffe's CPU core usage? For my instance I have a Xeon E5-2699 and I'd like to limit Caffe to using 9 cores, so 50 percent of the CPU. Most of the training is done on the GPU ...
Dimitri S's user avatar
3 votes
3 answers
5k views

How to install caffe for python3 in ubuntu

I followed the steps on caffe and changed the configure file: PYTHON_LIBRARIES := boost_python3 python3.5m PYTHON_INCLUDE := /usr/include/python3.5m \ /usr/lib/python2.7/dist-packages/...
nsknsl's user avatar
  • 147
3 votes
3 answers
2k views

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

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 ...
David Stutz's user avatar
  • 2,598
3 votes
2 answers
2k views

How to remove unwanted connections from an trained caffe model?

I have trained a fastercnn model to detect human faces in an image using caffe. My current model size is 530MB. I wanted to reduce the size of my model, so I came accross Deep Compression By Song Han. ...
Avis's user avatar
  • 1,058
3 votes
1 answer
2k views

Net surgery: How to reshape a convolution layer of a caffemodel file in caffe?

I'm trying to reshape the size of a convolution layer of a caffemodel (This is a follow-up question to this question). Although there is a tutorial on how to do net surgery, it only shows how to copy ...
mcExchange's user avatar
  • 6,330
3 votes
1 answer
3k views

net surgery pycaffe copy weights and reshape

I am trying to copy the learned weights of a layer 'con_1' of size 3x3x3 of a pretrained model to a new layer 'con_1_1' such that the size of the new layer will be 6x3x3 (6 channels). I am actually ...
user570593's user avatar
  • 3,440
3 votes
2 answers
23k views

How to completely uninstall opencv ubuntu?

I am installing caffe and I think I screwed up my install by having multiple versions of OpenCV. Now i don't know what i did on my own but nothing seems to work right. So my safest bet is to do a ...
Kong's user avatar
  • 2,283
3 votes
2 answers
4k views

how can i upgrade my caffe model so it doesn't 'upgrade' every time I use it

I am using caffe with python(pycaffe). I am using the prebuilt alexnet model from model zoo. from this page: https://github.com/BVLC/caffe/tree/master/models/bvlc_alexnet Every time I use the ...
jas's user avatar
  • 590

1
2 3 4 5
11