Training with a reduced set of imagenet
Hi, I'm trying to train Imagenet with a reduced number of training data(~8GB). However I'm getting a problem so i want to know if what i've done so far is okay...
I have the complete /val folder and some random folders of the original training data of the /train folder(so they don't belong to the same concept) and then followed the same example at http://caffe.berkeleyvision.org/imagenet_training.html ... obviously I got some "files not found" errors when i generated the level_db, but the two folders imagenet_train_leveldb and imagenet_val_leveldb were generated... then I tried to compute the Image Mean and i got the first error:
$ sudo ./make_imageneat_mean.sh
F0605 13:25:02.602428 29558 compute_image_mean.cpp:31] Check failed: status.ok() Failed to open leveldb ilsvrc12_train_leveldb
*** Check failure stack trace: ***
@ 0x7f6cb037bb7d google::LogMessage::Fail()
@ 0x7f6cb037dc7f google::LogMessage::SendToLog()
@ 0x7f6cb037b76c google::LogMessage::Flush()
@ 0x7f6cb037e51d google::LogMessageFatal::~LogMessageFatal()
@ 0x40d6a3 main
@ 0x7f6cade9876d (unknown)
@ 0x40d78d (unknown)
Aborted (core dumped)
Done.
Checking the compute_image_mean.cpp does not give me useful information about what's happening... And I want to know if there is a way to train over a reduced part the dataset.. I would be pleased if you can help me..
Look into the script and make sure the paths are correct
Sergio
2014-06-05 12:25 GMT-07:00 inulinux12 [email protected]:
Hi, I'm trying to train Imagenet with a reduced number of training data(~8GB). However I'm getting a problem so i want to know if what i've done so far is okay...
I have the complete /val folder and some random folders of the original training data of the /train folder(so they don't belong to the same concept) and then followed the same example at http://caffe.berkeleyvision.org/imagenet_training.html ... obviously I got some "files not found" errors when i generated the level_db, but the two folders imagenet_train_leveldb and imagenet_val_leveldb were generated... then I tried to compute the Image Mean and i got the first error:
$ sudo ./make_imageneat_mean.sh F0605 13:25:02.602428 29558 compute_image_mean.cpp:31] Check failed: status.ok() Failed to open leveldb ilsvrc12_train_leveldb *** Check failure stack trace: *** @ 0x7f6cb037bb7d google::LogMessage::Fail() @ 0x7f6cb037dc7f google::LogMessage::SendToLog() @ 0x7f6cb037b76c google::LogMessage::Flush() @ 0x7f6cb037e51d google::LogMessageFatal::~LogMessageFatal() @ 0x40d6a3 main @ 0x7f6cade9876d (unknown) @ 0x40d78d (unknown) Aborted (core dumped) Done.
Checking the compute_image_mean.cpp does not give me useful information about what's happening... And I want to know if there is a way to train over a reduced part the dataset.. I would be pleased if you can help me..
— Reply to this email directly or view it on GitHub https://github.com/BVLC/caffe/issues/474.
I have already downloaded the data under /data/ilsvrc12 and the two variables of the TOOLS and DATA folder in the make_imagenet_mean are set correctly...
You were right @sguada ... I had the paths wrong... I would be pleased if you can check another issue I have: https://github.com/BVLC/caffe/issues/493
Trying to shed a little more light. The training leveldb name in 'create_imagenet.sh' is 'imagenet_train_leveldb' while that on the 'make_imagenet_mean.sh' is 'ilsvrc12_train_leveldb'. Please make sure that these two names are same.
can imagenet be used with a much smaller training set like 4 or 5 images? Im getting the error as this ./make_imagenet_mean.sh F0109 22:03:17.305155 2953 compute_image_mean.cpp:65] Check failed: mdb_cursor_get(mdb_cursor, &mdb_key, &mdb_value, MDB_FIRST) == 0 (-30798 vs. 0) *** Check failure stack trace: *** @ 0x7f5c93326c6c (unknown) @ 0x7f5c93326bb8 (unknown) @ 0x7f5c933265ba (unknown) @ 0x7f5c93329551 (unknown) @ 0x408bb9 main @ 0x7f5c90c1fec5 (unknown) @ 0x4090c7 (unknown) @ (nil) (unknown) Aborted (core dumped) Done. I'm guessing this means that the key is not found. your help is appreciated
I had a similar issue until I changed a line in tools/convert_imageset.cpp:
// CHECK_EQ(mdb_env_set_mapsize(mdb_env, 1099511627776), MDB_SUCCESS) // 1TB CHECK_EQ(mdb_env_set_mapsize(mdb_env, 1073741824), MDB_SUCCESS) // 1GB
@che-shr-cat I tried changing that line and recompiling it with make all. the error has remained the same.does the training dataset size matter
@che-shr-cat thank you for your help, I found out to my surprise that the path names in my train.txt and test.txt were faulting with filenames 1.jpg etc so i renamed it to a.jpg etc and the compute_image_mean.cpp showed no errors
Hi, @pranavsreedhar , I had a exactly same problem with you, could you say more details about how your compute_image_mean showed on errors?
@swkpku the stack trace of make_imagenet_mean has been posted earlier but I made the change as suggested by @che-shr-cat. could you specify what problem you are facing
@pranavsreedhar I followed the caffe's image net example: http://caffe.berkeleyvision.org/gathered/examples/imagenet.html
- store my dataset in /path/to/my/dataset/train and /path/to/my/dataset/val
- generate train.txt and val.txt listing all the files and their labels
- renamed and modified examples/imagenet/create_imagenet.sh to fit my need
- create lmdb successfully with my dataset
- renamed and modified examples/imagenet/make_imagenet_mean.sh to fit my need: /home/weikangsong/Documents/caffe-master/build/tools/compute_image_mean /home/weikangsong/Documents/caffe-master/examples/cfrdb/cfrdb_train_lmdb /home/weikangsong/Documents/caffe-master/data/cfrdb/cfrdb_mean.binaryproto lmdb
- run the above shell and got error: F0309 09:25:41.191184 3185 compute_image_mean.cpp:65] Check failed: mdb_cursor_get(mdb_cursor, &mdb_key, &mdb_value, MDB_FIRST) == 0 (-30798 vs. 0) *** Check failure stack trace: *** @ 0x7fecd0ddadaa (unknown) @ 0x7fecd0ddace4 (unknown) @ 0x7fecd0dda6e6 (unknown) @ 0x7fecd0ddd687 (unknown) @ 0x409773 main @ 0x7fecce703ec5 (unknown) @ 0x40a827 (unknown) @ (nil) (unknown) Aborted (core dumped) Done.
Did you modified the code:
// CHECK_EQ(mdb_env_set_mapsize(mdb_env, 1099511627776), MDB_SUCCESS) // 1TB CHECK_EQ(mdb_env_set_mapsize(mdb_env, 1073741824), MDB_SUCCESS) // 1GB
and everything's fine? But I did the same thing, and the error is still here.