Code Monkey home page Code Monkey logo

ga-sketching's People

Contributors

lordliang avatar

Stargazers

 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

ga-sketching's Issues

problem about running the UI interface

I find that in edit_widget.py, there are some functions about shadow, and I also check the paper ShadowDraw. My problem is, is the Data Generation step necessary? Is it for building a shadow dataset to guide the users? Can you provide thoes images or I have to build it myself?
Many thanks!

issue when evaluate using pretrained model

Sry to trouble you again. When I try to do evaluations based on the pretrained model on OneDrive, KeyError occurs:

(gas) vic@PC:~/GAS/GA-Sketching$ python generate_single.py  -cat airplane -checkpoint 200
initialize network with normal
Loaded checkpoint from: /home/vic/GAS/GA-Sketching/core/../experiments/GASv64_airplane/checkpoints/checkpoint_epoch_200.tar
**checkpoint keys**: odict_keys(['volume_encoder.conv_in_0.weight', 'volume_encoder.conv_in_0.bias', 'volume_encoder.conv_in_1.weight', 'volume_encoder.conv_in_1.bias', 'volume_encoder.conv_in_bn.weight', 'volume_encoder.conv_in_bn.bias', 'volume_encoder.conv_in_bn.running_mean', 'volume_encoder.conv_in_bn.running_var', 'volume_encoder.conv_in_bn.num_batches_tracked', 'ifnet_encoder.conv_0.weight', 'ifnet_encoder.conv_0.bias', 'ifnet_encoder.conv_0_1.weight', 'ifnet_encoder.conv_0_1.bias', 'ifnet_encoder.conv_1.weight', 'ifnet_encoder.conv_1.bias', 'ifnet_encoder.conv_1_1.weight', 'ifnet_encoder.conv_1_1.bias', 'ifnet_encoder.conv_2.weight', 'ifnet_encoder.conv_2.bias', 'ifnet_encoder.conv_2_1.weight', 'ifnet_encoder.conv_2_1.bias', 'ifnet_encoder.conv_3.weight', 'ifnet_encoder.conv_3.bias', 'ifnet_encoder.conv_3_1.weight', 'ifnet_encoder.conv_3_1.bias', 'ifnet_encoder.conv0_1_bn.weight', 'ifnet_encoder.conv0_1_bn.bias', 'ifnet_encoder.conv0_1_bn.running_mean', 'ifnet_encoder.conv0_1_bn.running_var', 'ifnet_encoder.conv0_1_bn.num_batches_tracked', 'ifnet_encoder.conv1_1_bn.weight', 'ifnet_encoder.conv1_1_bn.bias', 'ifnet_encoder.conv1_1_bn.running_mean', 'ifnet_encoder.conv1_1_bn.running_var', 'ifnet_encoder.conv1_1_bn.num_batches_tracked', 'ifnet_encoder.conv2_1_bn.weight', 'ifnet_encoder.conv2_1_bn.bias', 'ifnet_encoder.conv2_1_bn.running_mean', 'ifnet_encoder.conv2_1_bn.running_var', 'ifnet_encoder.conv2_1_bn.num_batches_tracked', 'ifnet_encoder.conv3_1_bn.weight', 'ifnet_encoder.conv3_1_bn.bias', 'ifnet_encoder.conv3_1_bn.running_mean', 'ifnet_encoder.conv3_1_bn.running_var', 'ifnet_encoder.conv3_1_bn.num_batches_tracked', 'fc_0.weight', 'fc_0.bias', 'fc_1.weight', 'fc_1.bias', 'fc_2.weight', 'fc_2.bias', 'fc_out.weight', 'fc_out.bias'])
Traceback (most recent call last):
  File "/home/vic/GAS/GA-Sketching/generate_single.py", line 23, in <module>
    gen = Generator(net,
  File "/home/vic/GAS/GA-Sketching/core/generator.py", line 17, in __init__
    self.load_checkpoint(checkpoint)
  File "/home/vic/GAS/GA-Sketching/core/generator.py", line 91, in load_checkpoint
    self.model.load_state_dict(checkpoint['model_state_dict'])
KeyError: 'model_state_dict'

I print the checkpoint keys, is there something wrong with the way I load checkpoint?
I then change the code for loading the checkpoint to:

        #self.model.load_state_dict(checkpoint['model_state_dict'])
        state_dict = self.model.state_dict()
        for k1, k2 in zip(state_dict.keys(), checkpoint.keys()):
            state_dict[k1] = checkpoint[k2]
        self.model.load_state_dict(state_dict)

Then seems everything works fine, but then another issue occurs:

(gas) vic@PC:~/GAS/GA-Sketching$ python generate_single.py  -cat airplane -checkpoint 200
initialize network with normal
Loaded checkpoint from: /home/vic/GAS/GA-Sketching/core/../experiments/GASv64_airplane/checkpoints/checkpoint_epoch_200.tar
experiments/GASv64_airplane/evaluation_200@128_1v/
0it [00:00, ?it/s]
Traceback (most recent call last):
  File "/home/vic/GAS/GA-Sketching/generate_single.py", line 31, in <module>
    gen_iterator(out_path, dataset, gen)    
  File "/home/vic/GAS/GA-Sketching/core/generation_iterator.py", line 19, in gen_iterator
    for i, data in tqdm(enumerate(loader)):
  File "/home/vic/anaconda3/envs/gas/lib/python3.9/site-packages/tqdm/std.py", line 1182, in __iter__
    for obj in iterable:
  File "/home/vic/anaconda3/envs/gas/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 681, in __next__
    data = self._next_data()
  File "/home/vic/anaconda3/envs/gas/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 721, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/home/vic/anaconda3/envs/gas/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/vic/anaconda3/envs/gas/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/vic/GAS/GA-Sketching/core/data/voxelized_data_shapenet.py", line 225, in __getitem__
    a0, e0, a1, e1, a2, e2 = self.dict[uid]
KeyError: '02691156/1b8e84935fdc3ec82be289de70e8db31'

Here I use the sketch you provided yesterday, I copy their uid to create a .lst file, I thought it might point to the sketch data you provided. My understanding about this program: the input is image and output is a corresponding mesh, so actually what I am confused here is where should I put my reference image for the model? What is the format of the input data?
Thanks!

mesh_type and pytorch3d version

Dear author:
I want to ask the pytorch3d version if I use pip(ERROR: Could not find a version that satisfies the requirement pytorch3d==2.31 (from versions: 0.1.1, 0.2.0, 0.2.5, 0.3.0));
And I want to use my own mesh data, should I use the the 'mesh-fusion' to change my mesh to 'xxx.off' ? The normal '.obj' mesh can not work?
I am looking forward to your reply!

render 2d for comparison to generated sketch.

Dear author:
After I generated the sketches by your script, I want to compare to 2d color-img rendered by 3D mesh. Do you have the script to get the rendered 2d img? I would greatly appreciate it.

reproduction error

self.model.merger.load_state_dict(checkpoint['model_state_dict'])
KeyError: 'model_state_dict'

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.