thodan / bop_toolkit

A Python toolkit of the BOP benchmark for 6D object pose estimation.
http://bop.felk.cvut.cz
MIT License
397 stars 138 forks source link

Generated depth png from distance are all black #62

Closed Goooyi closed 2 years ago

Goooyi commented 2 years ago

OS: Ubuntu 20_04 and MacOS 12.0.1 Problem: Generated depth png with write_bop() function from distance are all black I encountered this problem while using bop-toolkit 2.0.8a version, I see it's solved in the new version so I upgraded to 2.1.0 version but still the same still the situation for me,

bproc.renderer.enable_distance_output(activate_antialiasing=False)
bproc.renderer.set_samples(50)
# render the whole pipeline
data = bproc.renderer.render()
# Write data in bop format
bproc.writer.write_bop(os.path.join(args.output_dir, 'bop_data'),
                       dataset = args.bop_dataset_name,
                       depths = bproc.postprocessing.dist2depth(data["distance"]),
                       colors = data["colors"], 
                       color_file_format = "JPEG",
                       ignore_dist_thres = 10)

use

bproc.renderer.enable_depth_output(activate_antialiasing=False,output_dir = "./output")

also give all black depth output but the generated depth.exr file is OK but won't save.