Open worldlyesterday opened 1 year ago
Hi this is the issue of loading nerf 360 dataset with the 3rd-party library pycolmap
. Maybe the data is corrupted? I'm not sure what I can help you with in this case.
Hi this is the issue of loading nerf 360 dataset with the 3rd-party library
pycolmap
. Maybe the data is corrupted? I'm not sure what I can help you with in this case.
Sorry, I checked the code, and the result is that the dataset is missing the project.ini file
I came from https://jonbarron.info/mipnerf360/ Downloaded 360_ V2 dataset, but the file does not contain project.ini,Please check the integrity of the dataset.
I'm not sure if the project.ini
file is really needed. I don't have this file neither but I can run the code without problems.
change the char 'L' and 'IiLL' to 'Q' and 'IiQQ', It can be solved. The modified code in scene_manager.py:
def _load_cameras_bin(self, input_file): self.cameras = OrderedDict()
with open(input_file, 'rb') as f:
num_cameras = struct.unpack('Q', f.read(8))[0]
for _ in range(num_cameras):
camera_id, camera_type, w, h = struct.unpack('IiQQ', f.read(24))
num_params = Camera.GetNumParams(camera_type)
params = struct.unpack('d' * num_params, f.read(8 * num_params))
self.cameras[camera_id] = Camera(camera_type, w, h, params)
self.last_camera_id = max(self.last_camera_id, camera_id)
Warning: image_path not found for reconstruction Traceback (most recent call last): File "examples/train_ngp_nerf.py", line 102, in
train_dataset = SubjectLoader(
File "D:\ks2\nerfacc\examples\datasets\nerf_360_v2.py", line 186, in init
self.images, self.camtoworlds, self.K = _load_colmap(
File "D:\ks2\nerfacc\examples\datasets\nerf_360_v2.py", line 32, in _load_colmap
manager.load_cameras()
File "D:\ks2\nerfacc\examples\datasets..\pycolmap\pycolmap\scene_manager.py", line 90, in load_cameras
self._load_cameras_bin(input_file)
File "D:\ks2\nerfacc\examples\datasets..\pycolmap\pycolmap\scene_manager.py", line 102, in _load_cameras_bin
num_cameras = struct.unpack('L', f.read(8))[0]
struct.error: unpack requires a buffer of 4 bytes
![QQ截图20221107203924](https://user-images.githubusercontent.com/92244703/200312956-d3df0ebe-bb3d-447a-834b-0a49aaa4a3f1.png)