JiaRenChang / PSMNet

Pyramid Stereo Matching Network (CVPR2018)
MIT License
1.43k stars 424 forks source link

Finetuned model on KITTI 2012 #55

Open sasahanfeng opened 6 years ago

sasahanfeng commented 6 years ago

Hi @JiaRenChang , Thanks for sharing your excellent work. Could you please release your finetuned model on KITTI 2012? Besides, I want to evaluate PSMNet on SceneFlow test set using your released SceneFlow pretrained model. How should I modify the 'submission.py' to generate disparity maps for SceneFlow? Looking forward to your reply.

kalanityL commented 6 years ago

For testing the SceneFlow pretrained model on SceneFlow test dataset, you would need to change the dataloader to suit the folder organization of SceneFlow.

I don't know the dataset, but let's assume it is SceneFlow/testing/img_L and SceneFlow/testing/img_R

you need to copy the file dataloader/KITTI_submission_loader2012.py (for instance to dataloader/KITTI_submission_loader_SF.py)

change only these 2 lines :

left_fold  = 'colored_0/'
right_fold = 'colored_1/'

into

left_fold  = 'img_L/'
right_fold = 'img_R/'

--- Do not put the "SceneFlow/testing" part of the path there - it will be added from the parameter you will give in the command line ---

Then, update the submission.py file as follow:

change this section:

if args.KITTI == '2015':
   from dataloader import KITTI_submission_loader as DA
else:
   from dataloader import KITTI_submission_loader2012 as DA

into this:

if args.KITTI == '2015':
   from dataloader import KITTI_submission_loader as DA
elif  args.KITTI == 'SF':
   from dataloader import KITTI_submission_loader_SF as DA
else:
   from dataloader import KITTI_submission_loader2012 as DA

Finally, in the call of the submission, run the following line:

python submission.py --maxdisp 192 --model stackhourglass --KITTI SF --datapath *YourPathToSceneFlow*/SceneFlow/testing/ --loadmodel *YourPathToPretrainedModels*/pretrained_sceneflow.tar

That should work. (a cleaner way would be to change the argument KITTI , and call it DATASET, and check given values to KITTI2015, KITTI2012, SF. But it is not necessary)

Regarding the finetuned model on KITTI 2012, there are all information for you to perform this fine tuning on the homepage. If you don't manage to, maybe open a separated issue.

thias15 commented 6 years ago

Would you kindly share a link to download the pretrained KITTI12 model from the paper.