Questions tagged [pycaffe]

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

Pycaffe is a Python-based library which has been developed over at UC Berkeley Vision and Learning Center (BVLC). It offers high performance and modularity for implementing [deep] models.

Useful Links:

523 questions
6
votes
1 answer

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 filters of first layer across the channel, and…
AMayer
  • 415
  • 5
  • 19
6
votes
1 answer

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 to each class, but it seems that SoftmaxwithLoss…
Eric Luo
  • 339
  • 3
  • 11
6
votes
2 answers

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 external symbol __imp__Py_NegativeRefcount…
empty
  • 5,194
  • 3
  • 32
  • 58
6
votes
4 answers

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 that can be read by Python? All the answers I…
jeandut
  • 2,471
  • 4
  • 29
  • 56
6
votes
1 answer

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 -> conv1_1 -> conv1_2 -> conv2_1 -> conv2_2 -> fc1 -> fc2…
dremaingo
  • 71
  • 1
  • 6
6
votes
1 answer

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 would like to load a trained Caffe model and…
Igor Ševo
  • 5,459
  • 3
  • 35
  • 80
6
votes
1 answer

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 accuracy goes from 2%-50% in 100 iterations which…
VeilEclipse
  • 2,766
  • 9
  • 35
  • 53
5
votes
1 answer

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, net.params['conv1'] represents the network…
feelfree
  • 11,175
  • 20
  • 96
  • 167
5
votes
0 answers

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.Build import cythonize import numpy setup( …
Callidior
  • 2,899
  • 2
  • 18
  • 28
5
votes
1 answer

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 fluctuating and the output image completely black.…
S.EB
  • 1,966
  • 4
  • 29
  • 54
5
votes
1 answer

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 class, i.e. class 3). This is how I proceed: I use…
Mr M
  • 69
  • 8
5
votes
3 answers

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 problem... Everytime I try to start a Python…
Steven D
  • 61
  • 1
  • 1
  • 3
5
votes
1 answer

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 or 1. Also, when I read my HDF5 file using the…
Unni
  • 5,348
  • 6
  • 36
  • 55
4
votes
2 answers

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 classified. I am trying to understand what is…
roschach
  • 8,390
  • 14
  • 74
  • 124
4
votes
4 answers

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
  • 11,740
  • 6
  • 46
  • 91
1
2
3
34 35