JiaRenChang / PSMNet

Pyramid Stereo Matching Network (CVPR2018)
MIT License
1.44k stars 423 forks source link

own training dataset #109

Open amardeepjaiman opened 5 years ago

amardeepjaiman commented 5 years ago

Hi,

I want to train this network on my own dataset. I want to use this to generate depth map for aerial imagery. Could anyone guide me what all data I need to have and the format of the data to train the model ?

Thanks, Amardeep

shivmgg commented 5 years ago

Hi, For using your own dataset, you basically need three different set of images - Left image, Right image and the ground truth disparity map. Left and right images can be in one of these formats- '.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP' while the disparity map should be in '.pfm' format. For training your model, you can use main.py as it is. You need to do some changes in the PSMNet/dataloader/listflowfile.py. You are supposed to define the correct path for the above three image folders. Also, edit the https://github.com/JiaRenChang/PSMNet/blob/c445a93277b3c99bbfb9879445e3da226e083b40/dataloader/SecenFlowLoader.py#L70 according to the size of your input images.

amardeepjaiman commented 5 years ago

Thanks Shivam.

amardeepjaiman commented 5 years ago

Hi,

One more help needed as i want to train this network on aerial stereo dataset. I have digital surface model for corrosponding stereo pairs as ground truth. Can somebody guide how can i retrieve/convert disparity map from DIgital surface Model (DSM) in required .pfm and .png format?

JiaRenChang commented 5 years ago

@amardeepjaiman By the equation: depth = fB/d You may need to know the focal length (f) of your camera. And B is the distance between two cameras. You can compute disparity (d) while you know the ground truth depth.

amardeepjaiman commented 5 years ago

Thanks @JiaRenChang ,

i understand your point here, But I have the depth information in form of Digtial surface model for the aerial stereo and not sure how to convert that into disparity map.

do you have any reference for any aerial stereo dataset, so that i have an idea how people are creating aerial stereo dataset, from the sources like digital surface model .?

JiaRenChang commented 5 years ago

@amardeepjaiman We have no experiences to do that, sorry. In our project, we tried to create simulation data by AirSim.

upupbo commented 5 years ago

Hi,

I want to train this network on my own dataset. I want to use this to generate depth map for aerial imagery. Could anyone guide me what all data I need to have and the format of the data to train the model ?

Thanks, Amardeep

can you provide your aerial imagery,my email:1261017506@qq.com

BreezeJing commented 2 years ago

Hello, I'd like to ask if you have successfully generated the PFM file.