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

How to prepare our own datasets for Segmentation ? #54

Open
jay-thakur opened this issue Dec 18, 2019 · 9 comments
Open

How to prepare our own datasets for Segmentation ? #54

jay-thakur opened this issue Dec 18, 2019 · 9 comments
Labels

Comments

@jay-thakur
Copy link

Hi,

Thank you so much for this repo. This is really helpful & very impressive work.

I am able to run the code & produce the output as expected. However I am looking to run this code on shapenet dataset (having chairs, table etc...). Could you please help me to preprocess(prepare) our own dataset for segmentation.

Also it would be great if you can share any such datasets link for mesh segmentation.

Thanks,
Jay

@ranahanocka
Copy link
Owner

Hi @jay-thakur ,

I think you said you were looking for how to create the .edges file that the segmentation dataset prep code expects right? You should export the .edges file from the Mesh class in the python code. Here is the deprecated function that did it:

def save_new_edges(filename):
    mesh = Mesh(filename, shuffle=False)
    edges = np.array(mesh.edges)
    edge_file = filename.replace('.obj', '.edges')
    np.savetxt(edge_file, edges, fmt='%d')

@ranahanocka ranahanocka added the question FAQ label Dec 30, 2019
@Pavelevivan
Copy link

Hi,
Can you explain what is the order to get dataset for segmentation:
obj -> edges -> seg -> eseg (is that correct?)
I downloaded your scripts on matlab, but quite frustrated on them because I do not have experience with it. Could you explain me that? I would really appreciate your help.

Thanks,
Ivan

@yuvaramsingh94
Copy link

Hi,
i am also on the same page . i like to create the .seseg file for my own dataset . is there any python code available for it . as i am not that used to matlab.

Also i like to know is there any code/strategy available to map .eseg annotation of one resolution .obj file to a lower resolution . i am planning to figure out the best resolution for my work so planning to label(.eseg) in higher resolution and convert it to other resolutions so i wont have to do the labeling all over again .

@ranahanocka
Copy link
Owner

ranahanocka commented Apr 10, 2020

Hi @Pavelevivan

obj -> edges -> seg -> eseg (is that correct?)

Yes, that is correct. I think if you try to reproduce the example from the MATLAB scripts it will be clear

@ranahanocka
Copy link
Owner

Hi @yuvaramsingh94 ,

The matlab code maps the segmentation from one resolution to another (it computes some graph cut optimization to do that). Unfortunately, there is only matlab code to do this.

@KevinJianLin
Copy link

In this function, filename is .obj file. I got this error, AttributeError: 'NoneType' object has no attribute 'num_aug'.
Do I need to place my .obj file under specific folder to avoid this error?

def save_new_edges(filename):
mesh = Mesh(filename, shuffle=False)
edges = np.array(mesh.edges)
edge_file = filename.replace('.obj', '.edges')
np.savetxt(edge_file, edges, fmt='%d')

@KevinJianLin
Copy link

@jay-thakur does the function work for you? @ranahanocka Is there previous commit to checkout save_new_edges function?

@jay-thakur
Copy link
Author

jay-thakur commented Jul 1, 2023 via email

@lssuking
Copy link

Hi @KevinJianLin ,
i got the same AttributeError as you said above.And i checked the code and then found maybe some conflicts in the code.
After that did you have any ideals to deal with the error?

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

No branches or pull requests

6 participants