Giter VIP home page Giter VIP logo

vitruvion's Issues

AttributeError: module 'sketchgraphs.data' has no attribute 'ConstructionSequence'

Thanks for your contribution, this is an inspiring work! But when I try to run training and evaluation in my own conda environment, I run into some problems that I want you to help me.
As we konw, sketchgraphs.data is mentioned in many programs, for example in the /vitruvion/img2cad/constraint_data.py there are import _sketchgraphs.data as datalib and from sketchgraphs.data import flat_array, but here is no folder named data in the vitruvion/sketchgraphs/directory in this github project.
This seems to be resolved by downloading the file in SketchGraphs, and it is true for some parts of the code, but there seems to be no ConstructionSequence, and I would like to know how to find or retrieve this file, thank you for your focus!

/vitruvion/img2cad/constraint_data.py
import sketchgraphs.data as datalib
def tokenize_constraints(seq: datalib.ConstructionSequence, gather_idxs: Sequence[int], max_length: Optional[int]=None):

When I run python -m img2cad.evaluation.evaluate_constraints checkpoint_path=models/constraints.ckpt sequence_path=data/sg_filtered_unique.npy, I will get

File "****/code/vitruvion/img2cad/constraint_data.py", line 67, in <module>
    def tokenize_constraints(seq: datalib.ConstructionSequence, gather_idxs: Sequence[int], max_length: Optional[int]=None):
AttributeError: module 'sketchgraphs.data' has no attribute 'ConstructionSequence'

Retraining image to primitive model

Hi, thanks for your interesting and impressive work!

I'm curious about what can be the possible reasons that I'm getting a low-score for re-training image-to-primitive model. All the hyperparameters were the same with the original model and I adapted your slurm script to run the model on a similar setup (4 v100 gpus). Final accuracy for the image to primitive model was around 0.47.

I used the following slurm script to retrain the model.

#!/bin/bash -l

#SBATCH -p gpu
#SBATCH -N 1
#SBATCH --gpus=4
#SBATCH --constraint=volta32
#SBATCH --job-name train_image_to_primitive
#SBATCH --time=24:00:00
source activate vitruvion

python -m img2cad.train_image_to_primitive +cluster=akaradeniz +compute=4xv100 batch_size=2048

These are the graphs from the training logs:

Screenshot from 2022-09-12 10-01-25

Thank you in advance!

ModuleNotFoundError: No module named 'sketchgraphs.data'

Hi, thank you for this really interesting project! I was hoping for some assistance..

I have downloaded all the required files into the project but have been unable to inference with the models.

Could you please providea step by step tutorial to help transform an input sketch (hand drawn image) to the network for obtaining either a vector or a CAD file?

For the mentioned error, here is the terminal log -


(vitruvion) sid@e2e-62-76:~/vitruvion/vitruvion$ ./start_singularity.sh python -m img2cad.evaluation.evaluate_image_to_primitive checkpoint_path=models/image_to_primitive.ckpt sequence_path=data/sg_filtered_unique.npy

=============
== PyTorch ==
=============

NVIDIA Release 21.03 (build 21060478)
PyTorch Version 1.9.0a0+df837d0

Container image Copyright (c) 2021, NVIDIA CORPORATION.  All rights reserved.

Copyright (c) 2014-2021 Facebook Inc.
Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
Copyright (c) 2012-2014 Deepmind Technologies    (Koray Kavukcuoglu)
Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
Copyright (c) 2011-2013 NYU                      (Clement Farabet)
Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston)
Copyright (c) 2006      Idiap Research Institute (Samy Bengio)
Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz)
Copyright (c) 2015      Google Inc.
Copyright (c) 2015      Yangqing Jia
Copyright (c) 2013-2016 The Caffe contributors
All rights reserved.

NVIDIA Deep Learning Profiler (dlprof) Copyright (c) 2021, NVIDIA CORPORATION.  All rights reserved.

Various files include modifications (c) NVIDIA CORPORATION.  All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

NOTE: MOFED driver for multi-node communication was not detected.
      Multi-node communication performance may be reduced.

Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/conda/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/sid/vitruvion/vitruvion/img2cad/evaluation/evaluate_image_to_primitive.py", line 18, in <module>
    from img2cad import dataset, primitives_data, primitives_models
  File "/home/sid/vitruvion/vitruvion/img2cad/dataset.py", line 28, in <module>
    import sketchgraphs.data as datalib
ModuleNotFoundError: No module named 'sketchgraphs.data'

Hope you can share a response soon, would appreciate being able to replicate this project.

Also curious - under what license has the project has been released? I cannot seem to find it in the description.

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.