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
0
votes
1 answer

Caffe always gives the same prediction in Python, but training accuracy is good

I have a trained model with caffe (through the command line) where I get an accuracy of 63% (according to the log files). However, when I try to run a script in Python to test the accuracy, I get all the predictions in the same class, with very…
scapiskipi
  • 63
  • 7
0
votes
1 answer

How to compute test/validation loss in pycaffe

I am trying to compute the test loss in my own training loop in python. Calling solver.test_nets[0].forward() seems to update the score blob but not the loss one. Any idea how to get it updated? I am using the following solver config: net:…
Mikael Rousson
  • 2,247
  • 1
  • 15
  • 16
0
votes
1 answer

Simple example of a caffe python input layer (for images with labels)

The requirement is that the python script be more illustrative than performant. Keep it simple (no multiprocessing, that can be a separate step) It should take-in images and corresponding labels in batches of 50. It should apply the transformer…
auro
  • 1,079
  • 1
  • 10
  • 22
0
votes
1 answer

Converting mnist data to lmdb with python results very large database

I am currently playing the lenet model provided by caffe. the example (which is in path/to/caffe/examples/mnist/convert_mnist_data.cpp provides a c++ program to convert the mnist data to lmdb. I write a python program to do the same thing, but the…
alec.tu
  • 1,647
  • 2
  • 20
  • 41
0
votes
1 answer

How to set mean pixels for feedforward? caffe

I want to finetune VGG19 and it is working good. While training I am subtracting the mean pixels as name: "VGG_ILSVRC_19_layer" layer { name: "data" type: "Data" include { phase: TRAIN } transform_param { mean_value: 104 …
Rafay Zia Mir
  • 2,116
  • 6
  • 23
  • 49
0
votes
1 answer

defining caffe prototxt in python

How to add a layer for both the TRAIN and TEST phase with different parameters in one prototxt file using caffe in python? If you look at https://github.com/BVLC/caffe/blob/master/examples/mnist/lenet_train_test.prototxt, you will see the input…
Gaurav Gupta
  • 1,929
  • 4
  • 21
  • 40
0
votes
1 answer

Caffe: can I avoid loading new data while training?

I want to overfit my model on a mini-batch of data, to see if my model is correct. My dataset is in lmdb format. The data layer automatically update when I perform solver.step(). How can I avoid solver from loading new data in Caffe?
yihui.dev
  • 602
  • 8
  • 10
0
votes
0 answers

Caffe with natural language understaing

I'm using Rotten Tomatoes database as my dataset. Following this code I formatted the data. So, every sentence's size is 56 words, if a sentence's size is less than 56 words, this code puts some PAD to the end of sequence. For example, just for…
Carlos Porta
  • 1,224
  • 5
  • 19
  • 31
0
votes
1 answer

Returning only the center crop with the oversample of Caffe using Python code ( caffe.io.oversample function)

I am trying to return only the center crop with the oversample of Caffe using Python code the caffe.io.oversample function (not the classifier.py). II have tried to modify the code to return only the center crop however it still returns 10 instead…
dusa
  • 840
  • 3
  • 14
  • 31
0
votes
0 answers

Confusing predictions when implementing GoogleNet

I'm user the Caffe implementation of GoogleNet available from https://github.com/BVLC/caffe/tree/master/models/bvlc_googlenet in a detection and localization process. I've had great success using this network for transfer learning on my own…
aaron
  • 6,339
  • 12
  • 54
  • 80
0
votes
0 answers

Faster RCNN in Python cfg file

What does PROPOSAL_METHOD: gt signify, in the faster_rcnn_end2end.yml file? Does is mean that the ROI proposals are the Ground Truth Bounding Boxes only? The link to the file is here
Tanvir
  • 875
  • 3
  • 11
  • 19
0
votes
1 answer

How to reconstruct a caffemodel by some parameters?

I have met a problem that I have a sparse-matrix-stored version neural network which means I have only some parameters and its index like which layer does it belong and which location does it belong? How can I use these information and a prototxt to…
Jackie
  • 3
  • 3
0
votes
1 answer

How to test the model created using mnist dataset

I am new to caffe and thus was trying to play around with the MNIST dataset . I ran the following commands ./data/mnist/get_mnist.sh ./examples/mnist/create_mnist.sh ./examples/mnist/train_lenet.sh I haven't changed any of the files in caffe and…
kkk
  • 1,850
  • 1
  • 25
  • 45
0
votes
1 answer

Why does the output of this convolution have these dimensions?

I am trying to replicate the output of a convolution in Caffe. As far as I understand, Caffe uses the im2col algorithm to cast nD arrays into matrices and multiply them together. However, the dimensions of the output in Caffe confuse me. Using the…
V.Vocor
  • 429
  • 1
  • 5
  • 16
0
votes
1 answer

Unable to find hdf5 libraries when building pycaffe

When running make pycaffe We are ending up with missing hdf5 libraries. CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp /usr/bin/ld: cannot find -lhdf5_hl /usr/bin/ld: cannot find -lhdf5 collect2: error: ld returned 1 exit…
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560