anuragranj / spynet

Spatial Pyramid Network for Optical Flow
Other
234 stars 48 forks source link

Training on a different dataset #12

Closed ArmandZampieri closed 6 years ago

ArmandZampieri commented 6 years ago

Hi anuragranj,

I'm trying to use spynet on a personal dataset, but I'm having issues concerning the training part, I converted my data to the ppm and flo format and renamed them to match the structure of the flying chair dataset, but when runnning

th main.lua -fineWidth 128 -fineHeight 96 -level 3 -netType volcon \ -cache checkpoint -data myDir \ -L1 models/modelL1_3.t7 -L2 models/modelL2_3.t7 \ -retrain models/modelL2_3.t7

it fails trying to locate a file not in the dataset:

~/spyNetTrainImages/00666_img1.ppm: No such file or directory

I would like to know if you could give me advice on how to train spynet on a different dataset

Thank you for your attention, Best regards.

anuragranj commented 6 years ago

Can you paste your data directory structure here? You also need to have a train_val_split.txt file which flags train and validation splits. Your error seems like the files might not be located in the data directory.

ArmandZampieri commented 6 years ago

Thank you for your answer,

The data directory contains all the data in one folder named like this:

imageName1_img1.ppm imageName1_img2.ppm imageName1_flow.flo imageName2_img1.ppm imageName2_img2.ppm ...

I have the initial train_val_split.txt file containing 1 and 2

anuragranj commented 6 years ago

The data loading happens in donkey.lua. You need to make sure that these paths exist: https://github.com/anuragranj/spynet/blob/master/donkey.lua#L297-L298