facebookresearch / PoseDiffusion

[ICCV 2023] PoseDiffusion: Solving Pose Estimation via Diffusion-aided Bundle Adjustment
Other
718 stars 42 forks source link

Some problem about the demo.py #22

Closed SakuBorder closed 1 year ago

SakuBorder commented 1 year ago

Hello, when running your demo.py, there is a problem "cannot import name 'compute_ARE' from 'util.metric'", I checked the file util/metric.py, but found that there is no function named compute_ARE , maybe this function you mean is actually the "camera_to_rel_deg" ? image

SakuBorder commented 1 year ago

And in line 52, "images, image_info = load_and_preprocess_images(folder_path, cfg.image_size)", I believe that "cfg.image_size" is an integer and cannot be sorted. Perhaps it can be written as "images, image_info = load_and_preprocess_images(folder_path)"?

SakuBorder commented 1 year ago

And in line 52, "images, image_info = load_and_preprocess_images(folder_path, cfg.image_size)", I believe that "cfg.image_size" is an integer and cannot be sorted. Perhaps it can be written as "images, image_info = load_and_preprocess_images(folder_path)"?

Or need to specify the corresponding parameters?

jytime commented 1 year ago

Hi,

Yes you are right. Apologize I have not updated the demo.py file after updating the utility function. The current demo.py was the one used in previous versions.compute_ARE was previous metric function, and can be found in this commit

The current load_and_preprocess_images function, expects either of folder_path or image_paths to be not None. You can call it as load_and_preprocess_images(folder_path = folder_path, image_paths = None, image_size= cfg.image_size).

SakuBorder commented 1 year ago

Hi,

Yes you are right. Apologize I have not updated the demo.py file after updating the utility function. The current demo.py was the one used in previous versions.compute_ARE was previous metric function, and can be found in this commit

The current load_and_preprocess_images function, expects either of folder_path or image_paths to be not None. You can call it as load_and_preprocess_images(folder_path = folder_path, image_paths = None, image_size= cfg.image_size).

Thank you for your response. I've also identified some similar issues. For example, should the 51st line of demo.py return three parameters: images, image_info, and image_paths? Should corresponding modifications be made to the load_img_folder.py function? Additionally, should the input parameters of the extract_match function in the 79th line include the image_paths parameter that was returned earlier?

gleize commented 1 year ago

https://github.com/facebookresearch/PoseDiffusion/pull/23 should fix that.

jytime commented 1 year ago

Thank you @gleize !

SakuBorder commented 1 year ago

Thanks!