New at this.. stuck at building a classifier using the imagenet tutorial

430 views
Skip to first unread message

Newbie

unread,
Oct 3, 2015, 4:11:42 PM10/3/15
to Caffe Users
Hi guys.. 
I am kinda new to this community, and this framework.. 
I am trying to build a classifier by following the tutorial http://caffe.berkeleyvision.org/gathered/examples/imagenet.html

My idea is to building a classifier which is capable of recognizing object(fishes) which provided in the training set "n01440764".


I have until now created two folders containing the training data, and validation data. 
I have then resized the images to be 256x256. 


According to the tutorial is the next step to compute the image mean using  "./examples/imagenet/make_imagenet_mean.sh"

Problem is though when i try to run the script, it terminates with the error message:

user@ubuntu:~/caffe/examples/imagenet$ ./make_imagenet_mean.sh terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core dumped) Done.




this is how the script looks like on my computer.

#!/usr/bin/env sh
# Compute the mean image from the imagenet training lmdb
# N.B. this is available in data/ilsvrc12


EXAMPLE
=/home/user/caffe/examples/imagenet
DATA
=/home/user/caffe/data/ilsvrc12
TOOLS
=/home/user/caffe/build/tools


$TOOLS
/compute_image_mean $EXAMPLE/ilsvrc12_train_lmdb \
  $DATA
/imagenet_mean.binaryproto


echo
"Done."


I have no idea why get that message, it seems like one those messages which you get when the code is stuck in an infinite loop or something like that..  
I would be very happy if someone could clarify what I am doing wrong..

陶信东

unread,
Nov 13, 2015, 4:27:07 AM11/13/15
to Caffe Users
I ran into this too. It turns out that the image size should be 256*256 if you use the default model.

Jalen Hawkins

unread,
Jun 8, 2016, 4:34:45 PM6/8/16
to Caffe Users
I am running into the same issue did you ever resolve the problem?
 ./examples/imagenet/make_imagenet_mean.sh

Erika Nixon

unread,
Jan 25, 2017, 2:16:38 PM1/25/17
to Caffe Users
I am having the same problem.
I am in the process of running a script to check the image sizes.
So far, this does not seem to be the problem.
Have you found a solution?
Thanks!
-Erika

mscoder17

unread,
Jul 28, 2017, 7:38:37 PM7/28/17
to Caffe Users
How did you resolve the issue?? I am having exactly same issue

Jonathan R. Williford

unread,
Jul 29, 2017, 3:40:10 PM7/29/17
to mscoder17, Caffe Users
std::bad_alloc often means that you are running out of memory. Is this possible?

--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users+unsubscribe@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/209e8500-fb20-4cc1-8ff0-87e36a66cb67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages