samxuxiang / hnc-cad Goto Github PK
View Code? Open in Web Editor NEW[ICML 2023] Official PyTorch Implementation of "Hierarchical Neural Coding for Controllable CAD Model Generation".
License: Other
[ICML 2023] Official PyTorch Implementation of "Hierarchical Neural Coding for Controllable CAD Model Generation".
License: Other
I don't understand how we're supposed to sample conditionally from our own onshape model, even with a trained conditional generator.
I tried to use it to complete my onshape creations, following the procedure from skexgen:
The problem comes from the fact that to be used, the data must have all its solid_uid, profile_uids and loop_uids in the codebook. From what I could understand, the solid_uid is just the order in which the model appears in the DeepCAD dataset and the others uids derive directly from it.
I tried to force the uids to be contained in the codebooks but obviously the results are not great even with a mid-trained model (~125 epochs).
What is the correct procedure to complete our own OnShape models? I'd be very interested in knowing if such a procedure exists.
We are very interested in the CAD autocomplete you have developed.
But we don't want to retrain the model in the short term.
So could you provide a conditional pre-trained model?
Thank you again, and sorry for the trouble.
Thank you for your amazing work. When visualizing sample results, the following error appears. Is it possible to identify the cause? Also, could you provide the version of pythonocc?
##### 3D rendering pipe initialisation #####
Display3d class initialization starting ...
0%| | 0/730 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/media/data/hnc-cad/gen/cad_img.py", line 72, in <module>
main()
File "/media/data/hnc-cad/gen/cad_img.py", line 68, in main
render(shape, output_path.joinpath(fn.stem + ".png"), args.width, args.height)
File "/media/data/hnc-cad/gen/cad_img.py", line 15, in render
viewer = Viewer3d()
File "/home/.conda/envs/pyoccenv/lib/python3.9/site-packages/OCC/Display/OCCViewer.py", line 145, in __init__
Display3d.__init__(self)
File "/home/.conda/envs/pyoccenv/lib/python3.9/site-packages/OCC/Core/Visualization.py", line 180, in __init__
_Visualization.Display3d_swiginit(self, _Visualization.new_Display3d())
RuntimeError: Aspect_DisplayConnectionDefinitionErrorCan not connect to the server "" raised from method Display3d of class Display3d
File "/Users/Desktop/Code/gpus/hnc-cad/gen/cad_img.py", line 72, in <module>
main()
File "/Users/Desktop/Code/gpus/hnc-cad/gen/cad_img.py", line 68, in main
render(shape, output_path.joinpath(fn.stem + ".png"), args.width, args.height)
File "/Users/Desktop/Code/gpus/hnc-cad/gen/cad_img.py", line 16, in render
viewer.Create(phong_shading=True, create_default_lights=True)
File "/Users/miniconda3/envs/pyoccenv/lib/python3.9/site-packages/OCC/Display/OCCViewer.py", line 216, in Create
self.InitOffscreen(640, 480)
File "/Users/miniconda3/envs/pyoccenv/lib/python3.9/site-packages/OCC/Core/Visualization.py", line 215, in InitOffscreen
return _Visualization.Display3d_InitOffscreen(self, size_x, size_y)
RuntimeError: Aspect_WindowDefinitionErrorCocoa application should be instantiated before window raised from method InitOffscreen of class Display3d
Hi, Sam.
Fantastic work on CAD conditional Generation!
I just wonder if i train the model using DistributedDataParallel, will the codebook on each GPU remain the same? I tried to use your update code on multiple GPUs using DistributedDataParallel, but it seems that the number of updated codes on each GPU is not the same when I uncomment the print code.
I know the training data will be shuffled across GPUs during training, but such reinitialization scheme made me doubt whether the codebook will remain the same after several epochs.
Worse still, when I asked New Bing about whether the codebook will remain the same after backward of each batch. New Bing tells me No.....
Now I really have no idea about how the reinitialization scheme and the codebook works on DDP.
Any idea helps. And, happy Moon Festival!
Weijian.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.