Spaces:
Sleeping
Sleeping
Zhyever commited on
Commit ·
ddf200b
1
Parent(s): 484131e
scale depth by 65535/maxdepth
Browse files174 unmodified lines17517617717817918018120 unmodified lines202203204205206207208174 unmodified lineswith gr.Row():depth_image_slider = ImageSlider(label="Depth Map with Slider View", elem_id='img-display-output', position=0.5)raw_file = gr.File(label="16-Bit Raw Depth, Multiplier:256")submit = gr.Button("Submit")def on_submit(image, mode, patch_number, resolution_h, resolution_w, patch_split_number_h, patch_split_number_w, color_map):20 unmodified linespf_prediction_colored = colorize_depth(pf_prediction, cmap=color_map)coarse_predictioncolored = colorize_depth(coarse_prediction, cmap=color_map)raw_depth = Image.fromarray((pf_prediction*256).astype('uint16'))tmp = tempfile.NamedTemporaryFile(suffix='.png', delete=False)raw_depth.save(tmp.name)174 unmodified lines17517617717817918018120 unmodified lines202203204205206207208209174 unmodified lineswith gr.Row():depth_image_slider = ImageSlider(label="Depth Map with Slider View", elem_id='img-display-output', position=0.5)raw_file = gr.File(label="16-Bit Raw Depth, Multiplier:65535/80")submit = gr.Button("Submit")def on_submit(image, mode, patch_number, resolution_h, resolution_w, patch_split_number_h, patch_split_number_w, color_map):20 unmodified linespf_prediction_colored = colorize_depth(pf_prediction, cmap=color_map)coarse_predictioncolored = colorize_depth(coarse_prediction, cmap=color_map)max_depth = 80raw_depth = Image.fromarray((pf_prediction*(65535 / max_depth)).astype('uint16'))tmp = tempfile.NamedTemporaryFile(suffix='.png', delete=False)raw_depth.save(tmp.name)
app.py+3-2