varunjampani / video_prop_networks

Code for our CVPR17 paper on "Video Propagation Networks"
BSD 3-Clause "New" or "Revised" License
91 stars 24 forks source link

segmentation error #3

Closed JadenLy closed 6 years ago

JadenLy commented 7 years ago

I just follow the instruction and run the commands, when I run "python run_segmentation 0," I got the following error:

/data/workteam/leyang/video_prop_networks/seg_propagation$ python run_segmentation.py 0 ../lib/caffe/python Loading Data... 0.00197005271912 Finished Loading Data. horsejump-high

Traceback` (most recent call last): File "run_segmentation.py", line 203, in run_segmentation(int(sys.argv[1])) File "run_segmentation.py", line 111, in run_segmentation feature_scales) File "/data/workteam/leyang/video_prop_networks/seg_propagation/fetch_and_transform_data.py", line 124, in fetch_and_transform_data inputs['unary'] = transform_and_get_unary(seqname) File "/data/workteam/leyang/video_prop_networks/seg_propagation/fetch_and_transform_data.py", line 69, in transform_and_get_unary gt = all_seqs_gt[seqname][0, :] TypeError: 'NoneType' object has no attribute 'getitem'

Where is the problem here? Thanks!

varunjampani commented 7 years ago

It seems that 'all_seqs_gt' has 'None' here. Either it is not loaded properly or the ground truth files are not saved properly. Did you prepare data files with 'prepare_train_data.py' script before executing 'run_segmentation.py' ? You need to do superpixel computation and prepare the data into particular format before running the scripts.

JadenLy commented 7 years ago

@varunjampani I would like to first that if your run_segmentation.py would return a visual output of the images. I am interested in running the command on my own data and see how the model would perform on it.

varunjampani commented 7 years ago

Yes, run_segmentation.py saves the visual results in 'png' format and also saves the 'unaries' (network output) as numpy files.

JadenLy commented 7 years ago

Can you tell me how to run the segmentation on my own data? I have several images with .png format. What else do I need to prepare for running the model?

varunjampani commented 7 years ago

Depending on the type of data and the format it is on, you may need to change several scripts to train and run the model on your data. You need to first extract super pixels on your data using the provided 'gslicr' script. Then, look into 'prepare_train_data.py' and 'run_segmentation.py' scripts to see where you have to change to adapt to your data. Probably, more easier option would be to change your data into similar naming convention as DAVIS data, that way the changes in scripts would be minimal. You would need to change the data paths in 'davis_data.py'.