Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualization wrong! How to visualize the segmentation result #156

Open
gyy520cyaowu opened this issue Apr 19, 2024 · 0 comments
Open

Visualization wrong! How to visualize the segmentation result #156

gyy520cyaowu opened this issue Apr 19, 2024 · 0 comments

Comments

@gyy520cyaowu
Copy link

Can I use python vis_result.py for visualization, and I have modified the parameters in the file.
Error reported during operation: segmentation fatal(core dumped)
if you need the code after i edit:
`
#!/usr/bin/env python

coding: utf-8
import init
import os
from openpoints.dataset.vis3d import read_obj, vis_multi_points


idx = 0
##data_dir = "pretrained/pix4point/mae-s/visualization"
data_dir = "log/s3dis/s3dis-train-pointnet-ngpus1-seed9787-20240413-060541-i4dLinHmjkzusqbp2XiSqM/visualization"
##dataset_name = 's3dissphere'
dataset_name = 's3dis-Area5'
roof_height = 3


##method_names = ['input', 'pix4point', 'gt']
method_names = ['input', 'pointnet', 'gt']
file_list = []
colors_list = []
for i, method_name in enumerate(method_names):
file_path = os.path.join(data_dir, f'{method_name}-{dataset_name}-{idx}.obj')
points, colors =read_obj(file_path)
if i == 0: # input

remove roof

valid_idx = points[:, 2] < roof_height
input_points = points[valid_idx]
colors_list.append(colors[valid_idx]/255.)
else:
colors_list.append(colors[valid_idx])

points_list = [input_points] * len(method_names)
vis_multi_points(points_list, colors_list)

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant