Spaces:
Runtime error
Runtime error
JeffLiang commited on
Commit ·
092977e
1
Parent(s): da442e3
update
Browse files48 unmodified lines495051525354555657585960616248 unmodified linesexamples = [['scene0000_00', 0, [0, -2.5, 0.7], pc_to_plot(plydatas[0])],['scene0001_00', 0, [1.9, 1.1, 0.5], pc_to_plot(plydatas[1])],['scene0002_00', 0, [-0.7, -0.3, 1.9], pc_to_plot(plydatas[2])],]title = 'Segment_Anything on 3D in-door point clouds'description = """Gradio Demo for Segment Anything on 3D indoor scenes (ScanNet supported). \nThe logic is straighforward: 1) Find a point in 3D; 2) project the 3D point to valid images; 3) perform 2D SAM on valid images; 4) reproject 2D results back to 3D; 5) Visualization.Unfortunatly, it does not support click the point cloud to generate coordinates automatically. You may want to write down the coordinates and put it manually. \n"""article = """48 unmodified lines49505152535455565758596061626348 unmodified linesexamples = [['scene0000_00', 0, [0, -2.5, 0.7], pc_to_plot(plydatas[0])],['scene0001_00', 0, [1.9, 1.1, 0.5], pc_to_plot(plydatas[1])],['scene0002_00', 0, [0.58, 0.47, 0.25], pc_to_plot(plydatas[2])],]title = 'Segment_Anything on 3D in-door point clouds'description = """Gradio Demo for Segmenting Anything on 3D Indoor Scenes (ScanNet supported). \nThe logic is straightforward: 1) Find a point in 3D. 2) Project the 3D point onto valid images. 3) Perform 2D SAM on the valid images. 4) Reproject the 2D results back to 3D. 5) Visualize the results. \nUnfortunately, this demo does not support automatically generating coordinates by clicking on the point cloud. You may need to manually write down the coordinates and input them. \nPlay with the examples below first and try to modify the coordinates and mask granularity. \n"""article = """
151 unmodified lines152153154155156157151 unmodified linesm = masks[granularity]msk_color[m] = [0, 0, 1.0]mask_colors.append(msk_color)fig, axs = plt.subplots(nrows=1, ncols=3, figsize=(24, 8))for i in range(3):mask_img = masks[i][:,:,None] * rgb_img151 unmodified lines152153154155156157158159151 unmodified linesm = masks[granularity]msk_color[m] = [0, 0, 1.0]mask_colors.append(msk_color)show_id = valid_img_ids[-1]rgb_img = self.rgb_images[show_id]fig, axs = plt.subplots(nrows=1, ncols=3, figsize=(24, 8))for i in range(3):mask_img = masks[i][:,:,None] * rgb_img
app.py+5-4
sam_3d.py+2