Skip to content

Commit

Permalink
Merge branch 'master' of github.com:changhaonan/LGMCTS-D
Browse files Browse the repository at this point in the history
  • Loading branch information
changhaonan committed Sep 13, 2023
2 parents 29b6d4d + 12e5be3 commit f9374bd
Show file tree
Hide file tree
Showing 4 changed files with 274 additions and 98 deletions.
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,20 @@
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Eval online SFormer",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/lgmcts/scripts/eval/eval_lgmcts_struct.py",
"args": [
"--method=mcts",
"--n_epoches=1",
"--mask_mode=raw_mask",
"--debug",
],
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Eval online (Debug)",
"type": "python",
Expand Down
4 changes: 3 additions & 1 deletion lgmcts/algorithm/region_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def visualize(self, **kwargs):
cv2.waitKey(0)
cv2.destroyAllWindows()

def visualize_3d(self, show_origin: bool = False):
def visualize_3d(self, show_origin: bool = False, obj_center = None):
"""Visualize the region and obj bbox in 3D"""
vis_list = []
if self.scene_pcd is not None:
Expand All @@ -537,6 +537,8 @@ def visualize_3d(self, show_origin: bool = False):
region2world = np.linalg.inv(self.world2region)
region_origin = o3d.geometry.TriangleMesh.create_coordinate_frame(size=1.0)
region_origin.transform(region2world)
# vis_list.append(region_origin)
# region_origin.translate(obj_center.tolist())
vis_list.append(region_origin)
o3d.visualization.draw_geometries(vis_list)

Expand Down
2 changes: 1 addition & 1 deletion lgmcts/scripts/eval/eval_lgmcts_real.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def eval_real(data_path: str, prompt_path: str, method: str, mask_mode: str, n_s
[0., 634.80944824, 368.45831299],
[0., 0., 1.]])
label = json.load(open(os.path.join(data_path, "label.json"), "r"))
# load images
# load images000
depth_scale = 100000.0
mask = cv2.imread(os.path.join(data_path, "mask_image.png"))
depth = cv2.imread(os.path.join(data_path, "depth_image.png"),
Expand Down
Loading

0 comments on commit f9374bd

Please sign in to comment.