caffe

How to understand the Cifar10 prediction output?

十年热恋 提交于 2020-01-06 06:59:13
问题 I have trained Cifar10 (caffe) model for two classes classification. Pedestrian and non-pedestrian. Training looks fine, I have updated weights in a caffemodel file. I used two labels 1 for pedestrians and 2 for non-pedestrians, together with images for pedestrians (64 x 160) and background images (64 x 160). After training, I do testing with positive image(pedestrian image) and negative image (background image). My testing prototxt file is as shown below name: "CIFAR10_quick_test" layers {

How to fix, “error: (-215) pbBlob.raw_data_type() == caffe::FLOAT16 in function blobFromProto” when running neural network in OpenCV

蹲街弑〆低调 提交于 2020-01-06 04:37:11
问题 I am currently trying to use Nvidia DIGITS to train a CNN on a custom dataset for object detection, and eventually I want to run that network on an Nvidia Jetson TX2. I followed the recommended instructions to download the DIGITS image from Docker, and I am able to successfully train a network with reasonable accuracy. But when I try to run my network in python using OpenCv, I get this error, "error: (-215) pbBlob.raw_data_type() == caffe::FLOAT16 in function blobFromProto" I have read in a

create hfd5 with float numbers for caffe

大兔子大兔子 提交于 2020-01-06 02:47:09
问题 I want to feed caffe vectors of labels (multi label regression problem), so I have used the following link for creating hdf5 files. Using this code, I created an image_list.txt which contains path of files and float labels in each line, e.g. /home/deep/00000.bmp 0.9997 0.0236 -0.0082 -0.0231 0.9980 0.0588 0.0096 -0.0586 0.9982 -0.0046 0.1084 0.3938 but it seems that it only works for integer label. when I run demo.m the following error comes: Error using dataread Trouble reading integer from

When using RMSE loss in TensorFlow I receive very small loss values smalerl than 1 [closed]

久未见 提交于 2020-01-05 07:42:37
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago . Hello I have a network that produces logits / outputs like this: logits = tf.placeholder(tf.float32, [None, 128, 64, 64]) // outputs y = tf.placeholder(tf.float32, [None, 128, 64, 64]) // ground_truth, targets --> y ground truth values are downscaled from [0, 255] to [0, 1] in order to increase

Caffe net.forward call for multiple batches

拜拜、爱过 提交于 2020-01-05 07:18:05
问题 I am using ImageData type of data in .prototxt file and trying to get the features from python code using net.forward() and net.blobs of caffe library. However, I get only 50 features after net.forward() call which is the batch_size which I have set in .prototxt file. How can I get the features for subsequent batches? Do I have to call net.forward() multiple times? 来源: https://stackoverflow.com/questions/48520103/caffe-net-forward-call-for-multiple-batches

Undefined reference to boost::thread functions when building Caffe

六月ゝ 毕业季﹏ 提交于 2020-01-05 07:17:07
问题 I'm trying to compile Caffe on Ubuntu 14.04. I keep getting undefined reference to 'boost::thread::...' errors in the linking phase. I searched the web and found many people with similar problems and tried pretty much everything I found (too many to list here). I tried among other things installing boost using apt-get: sudo apt-get install libboost-python-dev sudo apt-get install libboost-all-dev Also tried building and installing from the sources: sudo ./b2 --threading=multi -j4 --with

Float Multi-label Regression in Caffe - loss results

痴心易碎 提交于 2020-01-05 06:36:14
问题 I have trained NN for Regression problem. my data type is HDF5_DATA that made of .jpg images (3X256X256) and float-label array (3 labels). Data-Set create script: import h5py, os import caffe import numpy as np SIZE = 256 # images size with open( '/home/path/trainingTintText.txt', 'r' ) as T : lines = T.readlines() X = np.zeros( (len(lines), 3, SIZE, SIZE), dtype='f4' ) labels = np.zeros( (len(lines),3), dtype='f4' ) for i,l in enumerate(lines): sp = l.split(' ') img = caffe.io.load_image( sp

Float Multi-label Regression in Caffe - loss results

99封情书 提交于 2020-01-05 06:33:40
问题 I have trained NN for Regression problem. my data type is HDF5_DATA that made of .jpg images (3X256X256) and float-label array (3 labels). Data-Set create script: import h5py, os import caffe import numpy as np SIZE = 256 # images size with open( '/home/path/trainingTintText.txt', 'r' ) as T : lines = T.readlines() X = np.zeros( (len(lines), 3, SIZE, SIZE), dtype='f4' ) labels = np.zeros( (len(lines),3), dtype='f4' ) for i,l in enumerate(lines): sp = l.split(' ') img = caffe.io.load_image( sp

Forward from the first of lmdb when using net.forward in pycaffe

吃可爱长大的小学妹 提交于 2020-01-05 05:36:08
问题 I am using pycaffe and my train and test data is in LMDB format. I have created my net like this: net = caffe.Net('train.prototxt', 'c.caffemodel', caffe.TEST) when you call net.forward, implicitly you walk through the LMDB test database one by one batches. My question is how can I start from the beginning of LMDB and test my network on the first n batches of the test data? Thanks 回答1: not sure it still relevant but you would need to change the data of input layer ,something like this net

Error in Using Nvidia DIGITS trained Models in OpenCV

帅比萌擦擦* 提交于 2020-01-05 05:31:08
问题 I Trained my model using DIGITS ( NVCaffe) and I use it in opencv similar to opencv example that use .prototxt & .caffemodel and i tested it and work good. But when I use Models that trained by digits i got this error: OpenCV Error: Assertion failed (pbBlob.raw_data_type() == caffe::FLOAT16) in blobFromProto, file /opt/opencv/modules/dnn/src/caffe/caffe_importer.cpp, line 242 Exception: /opt/opencv/modules/dnn/src/caffe/caffe_importer.cpp:242: error: (-215) pbBlob.raw_data_type() == caffe: