Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

about partseg visualization #8

Closed
grxiao opened this issue Jul 25, 2020 · 3 comments
Closed

about partseg visualization #8

grxiao opened this issue Jul 25, 2020 · 3 comments

Comments

@grxiao
Copy link

grxiao commented Jul 25, 2020

Thanks for your share!
May I ask how to achieve the visual presentation of the part segmentation results, and could you please share the code about it? I'm a beginner and this question has been bothering me for several days!
Mank Thanks!

@antao97
Copy link
Owner

antao97 commented Jul 25, 2020

I'm sorry that I didn't write a visualization script. :<

The most easiest way is to export a .txt file like this:

-0.872000 0.144000 -0.218000 78 71 183
-0.826000 0.099000 -0.133000 78 71 183
-0.824000 0.097000 -0.138000 78 71 183
-0.839000 0.107000 -0.196000 78 71 183
-0.869000 0.143000 -0.187000 78 71 183
-0.853000 0.126000 -0.180000 78 71 183
-0.829000 0.101000 -0.140000 152 223 138
-0.883000 0.157000 -0.217000 152 223 138
-0.831000 0.104000 -0.135000 152 223 138
-0.867000 0.142000 -0.181000 152 223 138
-0.860000 0.131000 -0.209000 152 223 138
-0.867000 0.139000 -0.216000 152 223 138
...

Each line is a point in a point cloud shape. The first three columns represent the XYZ coordinates and the last three columns represent the RGB colors.

Then, download the latest version of MeshLab. Open it and click File -> Import Mesh. Choose your .txt file to open. Change Data format to X Y Z R G B and Separator to SPACE. Then click OK to finish. After loading the point cloud, you can drag it with your mouse to observe. For better visual effect, you can change Point Size in control panel located in right part of the screen.

So the only thing you need to do is to write a script to save a .txt file, where points from same class are assigned with same color. For saving .txt file, you can use numpy.savetxt() to save it.

@grxiao
Copy link
Author

grxiao commented Jul 27, 2020

I'm sorry that I didn't write a visualization script. :<

The most easiest way is to export a .txt file like this:

-0.872000 0.144000 -0.218000 78 71 183
-0.826000 0.099000 -0.133000 78 71 183
-0.824000 0.097000 -0.138000 78 71 183
-0.839000 0.107000 -0.196000 78 71 183
-0.869000 0.143000 -0.187000 78 71 183
-0.853000 0.126000 -0.180000 78 71 183
-0.829000 0.101000 -0.140000 152 223 138
-0.883000 0.157000 -0.217000 152 223 138
-0.831000 0.104000 -0.135000 152 223 138
-0.867000 0.142000 -0.181000 152 223 138
-0.860000 0.131000 -0.209000 152 223 138
-0.867000 0.139000 -0.216000 152 223 138
...

Each line is a point in a point cloud shape. The first three columns represent the XYZ coordinates and the last three columns represent the RGB colors.

Then, download the latest version of MeshLab. Open it and click File -> Import Mesh. Choose your .txt file to open. Change Data format to X Y Z R G B and Separator to SPACE. Then click OK to finish. After loading the point cloud, you can drag it with your mouse to observe. For better visual effect, you can change Point Size in control panel located in right part of the screen.

So the only thing you need to do is to write a script to save a .txt file, where points from same class are assigned with same color. For saving .txt file, you can use numpy.savetxt() to save it.

Thank you very much for your share! It helps me a lot.

@antao97
Copy link
Owner

antao97 commented Jul 20, 2021

The visualization code is added in this repo.

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

No branches or pull requests

2 participants