texture_nets
texture_nets copied to clipboard
How to Set Up Training Data
I'm trying to train a style image using the MS COCO dataset but am having trouble setting up the directories in the proper way. I tried to follow your instructions in the README and have the following structure:
image-training/
image-training/train
image-training/train/dummy (images are in this folder)
image-training/val
image-training/val/dummy (images are in this folder)
When I run this command th train.lua -data image-training/ -style_image data/textures/cezanne.jpg, I get the following error:
/root/torch/install/bin/luajit: /root/texture_nets/datasets/style-gen.lua:67: class not found: val
Do you know if the structure of my image-training folder is incorrect?
Thank you. This is the directory structure that worked for me. Notice the val folder has nothing inside of it; not even an empty folder.
image-training/
image-training/train
image-training/train/dummy (images are in this folder)
image-training/val
Using the structure I just posted worked actually (with no empty folder in val).
Same - was getting error with dummy folder inside of val. Removed dummy folder and now it works.
What command are you inputting in the command line?
I am putting (After following the exact instructions):
th train.lua -data dataset -style_image data/textures/red-peppers256.o.jpg
dataset/train dataset/train/dummy dataset/train/dummy/train2014/ dataset/val dataset/val/dummy/ dataset/val/dummy/val2014/
and I get this error:
=> Generating list of images
| finding all validation images
find: `standard output': Broken pipe
find: write error
/home/arturo/torch/install/bin/luajit: ..._Project/texture_nets-master/datasets/style-gen.lua:67: class not found: val2014
stack traceback:
[C]: in function 'assert'
..._Project/texture_nets-master/datasets/style-gen.lua:67: in function 'findImages'
..._Project/texture_nets-master/datasets/style-gen.lua:102: in function 'exec'
./datasets/init.lua:28: in function 'create'
./dataloader.lua:24: in function 'create'
train.lua:111: in main chunk
[C]: in function 'dofile'
...turo/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00406670
@ArturoDeza Hi, try to move everything from dataset/train/dummy/train2014 folder to dataset/train/dummy and remove train2014. Same with validation.