Open ewrfcas opened 1 year ago
hi, i tried to download the MegaDepth_SfM_v1.tar.xz, but failed. could you tell me that how did you download the dataset successfully?
I encountered the same problem. I check the camera width in cameras.txt and the image dimension of the corresponding image, and I found that they are actually the same. It is weird that after reading into memory, the dimensions became mismatched. Have you figured out how to get around with it?
Hello. I remember that some scenes used the default COLMAP parameters (notably the image_undistorter --max_image_size
), while some others used some custom values. This is why in the script I try to decide on the right resolution based on the output depthmaps / images provided by MegaDepth. Could it be that there is an issue in the propagation of these params (I have not used these scripts for quite a while now)?
Alternatively, you can directly download the undistorted data from https://cvg-data.inf.ethz.ch/megadepth/
Another reason why the image sizes might be mismatched is due to EXIF information (notably image rotation) > maybe at some point they were ignored but now they are taken into account.
Hello. I remember that some scenes used the default COLMAP parameters (notably the
image_undistorter --max_image_size
), while some others used some custom values. This is why in the script I try to decide on the right resolution based on the output depthmaps / images provided by MegaDepth. Could it be that there is an issue in the propagation of these params (I have not used these scripts for quite a while now)?Alternatively, you can directly download the undistorted data from https://cvg-data.inf.ethz.ch/megadepth/
Thanks a lot for the prompt reply and the download link. I look into the source code in colmap/src/colmap/image/undistortion.cc, and found that the error occur in the first line of the function UndistortImage() -- basically the program just done some I/O, not started the undistortion procedure yet. So my feeling is that there should be some bug in the image reading I/O of colmap.
Do you by any chance have one such image where the undistortion fails at hand? I can try to look into it and submit a fix upstream if I figure it out.
Do you by any chance have one such image where the undistortion fails at hand? I can try to look into it and submit a fix upstream if I figure it out.
I believe images from MegaDepth_v1_SfM/5017 can be used for debugging. From cameras.txt, you can see that images from this scene is captured by 1 camera:
The camera width and height is 2000, 1500. However, with colmap 3.7, I got the following error when running the undistortion script:
And I have checked the image size for all the images in MegaDepth_v1_SfM/5017/images, all of them has width 2000 and height 1500.
I believe the undistortion program iterate the images according to the order specified in images.txt. Since it fails at the first one, I think the corresponding image would be the first one in images.txt, which is: image_id 560: P1080890.JPG (though I suspect that all images in this scene would fail)
Thanks for your great work!
I am using your undistort_reconstructions.py to undistort megadepth images, but some problems have happened. There are 195 scenes in megadepth at all, but only 163 scenes are undistorted successfully. And for those failed cases, they fail to be checked with the image sizes as follows (happened in scene 0001):