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 Generate 3D CAD Models from 2D Sketches Using Given Model Configuration? #6

Open
irfanrah opened this issue Jan 9, 2024 · 2 comments

Comments

@irfanrah
Copy link

irfanrah commented Jan 9, 2024

Hello,

I've successfully obtained the configuration details for several models, but I'm unclear on how to utilize them for converting 2D sketches into 3D CAD models. Specifically, I'm puzzled about where to input my 2D sketch and how the regNet_300k model can generate a 3D CAD model from a sketch, especially when dealing with unusual shapes.

Here are the input and output specifications for each model:

embedSNet Input and Output Names and Shapes:

  • Signature: serving_default
    • Input Name: input_tensor, Shape: (None, 256, 256, 1), Dtype: <dtype: 'float32'>
    • Output Name: output_recons, Shape: (None, 256, 256, 1), Dtype: <dtype: 'float32'>
    • Output Name: output_code, Shape: (None, 256), Dtype: <dtype: 'float32'>

gpTFNet_250k Input and Output Names and Shapes:

  • Signature: serving_default
    • Input Name: dec_padding_mask, Shape: (1, 1, 1, None), Dtype: <dtype: 'float32'>
    • Input Name: look_ahead_mask, Shape: (1, 1, None, None), Dtype: <dtype: 'float32'>
    • Input Name: inp, Shape: (1, None, 256), Dtype: <dtype: 'float32'>
    • Input Name: tar, Shape: (1, None, 256), Dtype: <dtype: 'float32'>
    • Input Name: enc_padding_mask, Shape: (1, 1, 1, None), Dtype: <dtype: 'float32'>
    • Output Name: res_group_label, Shape: (None, None, None), Dtype: <dtype: 'float32'>

regNet_300k Input and Output Names and Shapes:

  • Signature: serving_default
    • Input Name: gp_S_map, Shape: (1, None, 256, 256, 1), Dtype: <dtype: 'float32'>
    • Input Name: gp_ND_maps, Shape: (1, None, 256, 256, 4), Dtype: <dtype: 'float32'>
    • Output Name: base_curve, Shape: (None, None, 256, 256, 1), Dtype: <dtype: 'float32'>
    • Output Name: face_map, Shape: (None, None, 256, 256, 1), Dtype: <dtype: 'float32'>

Given these details, could you guide me on the correct process for feeding my 2D sketch into the system and using regNet_300k to create a 3D CAD model? Any insights or examples would be greatly appreciated.

Thank you!

@Enigma-li
Copy link
Owner

I think you should read about the demo code under the folder dataAndModel. By only running the network is not enough, geometry optimization is needed.

But the signature tells you how to fill in tensors for the network.

@irfanrah
Copy link
Author

@Enigma-li, thanks for your reply. However, could you provide a more detailed tutorial on using the available checkpoints model for feeding the 2D sketch and outputting the generated 3D CAD? I still find the README.md confusing. Thank you.

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

2 participants