Code Monkey home page Code Monkey logo

hnc-cad's People

Contributors

samxuxiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hnc-cad's Issues

pythonocc visualization error

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

Could you provide a conditional pre-trained model?

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.

How to sample cond with onshape models

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:

  • I first download the json file with DeepCAD onshape parser
  • transformed the json files into obj files and normalize then with your SkexGen procedure.
  • finally, I applied the data_process/convert.py file from this repo (with format 'model').

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.

Training in DistributedDataParallel

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.