AlanSavio25 / DeepSingleImageCalibration

Deep learning based method to estimate camera intrinsics (focal length and distortion), and extrinsics (roll and pitch)
25 stars 3 forks source link

issue while running inference #4

Open saad-rachid opened 6 months ago

saad-rachid commented 6 months ago

Hello , thank you for sharing this I had this issue while running the inference script
warnings.warn(_create_warning_msg( Testing: 0% 0/12 [00:00<?, ?it/s]/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:558: UserWarning: This DataLoader will create 4 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary. warnings.warn(_create_warning_msg( /content/DeepSingleImageCalibration/calib/calib/datasets/base_dataset.py:56: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage() storage = elem.storage()._new_shared(numel) /content/DeepSingleImageCalibration/calib/calib/datasets/base_dataset.py:56: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage() storage = elem.storage()._new_shared(numel) /content/DeepSingleImageCalibration/calib/calib/datasets/base_dataset.py:56: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage() storage = elem.storage()._new_shared(numel) /content/DeepSingleImageCalibration/calib/calib/datasets/base_dataset.py:56: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage() storage = elem.storage()._new_shared(numel) Testing: 0% 0/12 [00:01<?, ?it/s] Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/content/DeepSingleImageCalibration/calib/calib/run.py", line 121, in main() File "/content/DeepSingleImageCalibration/calib/calib/run.py", line 86, in main normalized_coords = np.array(camera.image_to_world(img_pts)) AttributeError: 'pycolmap.Camera' object has no attribute 'image_to_world'

Alex000821 commented 6 months ago

The function has been renamed cam_from_img from v0.5.0 onwards https://github.com/colmap/pycolmap/releases/tag/v0.5.0 This repository was developed for v0.4.0.