{"action":"created","issue":{"url":"https://api.github.com/repos/BVLC/caffe/issues/2120","labels_url":"https://api.github.com/repos/BVLC/caffe/issues/2120/labels{/name}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/2120/comments","events_url":"https://api.github.com/repos/BVLC/caffe/issues/2120/events","html_url":"https://github.com/BVLC/caffe/issues/2120","id":61049410,"number":2120,"title":"Problem in converting my images to leveldb by convert_imageset","user":{"login":"SoldierNeverDie","id":9458572,"avatar_url":"https://avatars.githubusercontent.com/u/9458572?v=3","gravatar_id":"","url":"https://api.github.com/users/SoldierNeverDie","html_url":"https://github.com/SoldierNeverDie","followers_url":"https://api.github.com/users/SoldierNeverDie/followers","following_url":"https://api.github.com/users/SoldierNeverDie/following{/other_user}","gists_url":"https://api.github.com/users/SoldierNeverDie/gists{/gist_id}","starred_url":"https://api.github.com/users/SoldierNeverDie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SoldierNeverDie/subscriptions","organizations_url":"https://api.github.com/users/SoldierNeverDie/orgs","repos_url":"https://api.github.com/users/SoldierNeverDie/repos","events_url":"https://api.github.com/users/SoldierNeverDie/events{/privacy}","received_events_url":"https://api.github.com/users/SoldierNeverDie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-13T12:03:45Z","updated_at":"2015-03-13T17:40:40Z","closed_at":"2015-03-13T17:40:40Z","body":"I'm a newbie. Recently I'm learning how to use CAFFEE and  employ it to my own vision work.\r\nAs the first thing to do, I try to convert orignal images from my own dataset to leveldb format. I employed the convert_imageset just like what create_imagenet.sh do. And I did the Data Preparation.\r\n1. I saved the images in file.\r\n2. Made a txt containing label info like \r\n \"1004653180_AcmcIps6v 0\"   or  \"1014186831_AaHXRytua 1\"\r\n\r\n And edit the codes like create_imagenet.sh\r\n\r\n#!/bin/bash\r\nTOOLS=/home/llx/work/NN/Tools/caffe/caffe-master/build/tools\r\nTRAIN_DATA_ROOT=/home/llx/work/NN/Tools/caffe/image-convertor/origdata/\r\nDATA=/home/llx/work/NN/Tools/caffe/caffe-master/data/mytest\r\nEXAMPLE=/home/llx/work/NN/Tools/caffe/caffe-master/examples/mytest\r\n\r\nRESIZE=true\r\nif $RESIZE; then\r\n  RESIZE_HEIGHT=256\r\n  RESIZE_WIDTH=256\r\nelse\r\n  RESIZE_HEIGHT=0\r\n  RESIZE_WIDTH=0\r\nfi\r\n\r\nif [ ! -d \"$TRAIN_DATA_ROOT\" ]; then\r\n  echo \"Error: TRAIN_DATA_ROOT is not a path to a directory: $TRAIN_DATA_ROOT\"\r\n  echo \"Set the TRAIN_DATA_ROOT variable in create_test.sh to the path\" \\\r\n       \"where the orignal training data is stored.\"\r\n  exit 1\r\nfi\r\n\r\n\r\necho \"Creating train lmdb...\"\r\n\r\nGLOG_logtostderr=1 $TOOLS/convert_imageset \\\r\n    --resize_height=$RESIZE_HEIGHT \\\r\n    --resize_width=$RESIZE_WIDTH \\\r\n    --shuffle \\\r\n    $TRAIN_DATA_ROOT \\\r\n    $DATA/train.txt \\\r\n    $EXAMPLE/mytest_train_lmdb\r\n\r\necho \"Done.\"\r\n\r\nBUT when I run the codes,  it fails ... \r\n\r\nCreating train lmdb...\r\nI0313 19:40:32.082293  2497 convert_imageset.cpp:70] Shuffling data\r\nI0313 19:40:32.082804  2497 convert_imageset.cpp:73] A total of 12 images.\r\nI0313 19:40:32.082826  2497 convert_imageset.cpp:104] Opening lmdb /home/llx/work/NN/Tools/caffe/caffe-master/examples/mytest/mytest_train_lmdb\r\nF0313 19:40:32.082855  2497 convert_imageset.cpp:105] Check failed: mkdir(db_path, 0744) == 0 (-1 vs. 0) mkdir /home/llx/work/NN/Tools/caffe/caffe-master/examples/mytest/mytest_train_lmdbfailed\r\n*** Check failure stack trace: ***\r\n    @     0x7ff3ddaeedaa  (unknown)\r\n    @     0x7ff3ddaeece4  (unknown)\r\n    @     0x7ff3ddaee6e6  (unknown)\r\n    @     0x7ff3ddaf1687  (unknown)\r\n    @           0x40998b  main\r\n    @     0x7ff3db417ec5  (unknown)\r\n    @           0x4091e9  (unknown)\r\n    @              (nil)  (unknown)\r\n./create_test.sh: 行 32:  2497 已放弃               (核心已转储) GLOG_logtostderr=1 $TOOLS/convert_imageset --resize_height=$RESIZE_HEIGHT --resize_width=$RESIZE_WIDTH --shuffle $TRAIN_DATA_ROOT $DATA/train.txt $EXAMPLE/mytest_train_lmdb\r\nDone.\r\n\r\n\r\nCould anyone help me how I could convert my image data to the format that can be put into CAFFEE?\r\nIt will be very appreciate of you! \r\nTHANK YOU!"},"comment":{"url":"https://api.github.com/repos/BVLC/caffe/issues/comments/79174272","html_url":"https://github.com/BVLC/caffe/issues/2120#issuecomment-79174272","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/2120","id":79174272,"user":{"login":"n-zhang","id":1657338,"avatar_url":"https://avatars.githubusercontent.com/u/1657338?v=3","gravatar_id":"","url":"https://api.github.com/users/n-zhang","html_url":"https://github.com/n-zhang","followers_url":"https://api.github.com/users/n-zhang/followers","following_url":"https://api.github.com/users/n-zhang/following{/other_user}","gists_url":"https://api.github.com/users/n-zhang/gists{/gist_id}","starred_url":"https://api.github.com/users/n-zhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n-zhang/subscriptions","organizations_url":"https://api.github.com/users/n-zhang/orgs","repos_url":"https://api.github.com/users/n-zhang/repos","events_url":"https://api.github.com/users/n-zhang/events{/privacy}","received_events_url":"https://api.github.com/users/n-zhang/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T17:40:40Z","updated_at":"2015-03-13T17:40:40Z","body":"We welcome you to look at the extensive documentation, tutorials, and examples at http://caffe.berkeleyvision.org/ \r\nHowever, please ask usage questions on [caffe-users](https://groups.google.com/forum/#!forum/caffe-users) -- this issues tracker is primarily for Caffe development discussion. Thanks!\r\n"}}