Code Monkey home page Code Monkey logo

inversecsg's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

inversecsg's Issues

run_test.py fail with all examples

Hi,

I am trying to use the code after doing the manual installation (in Debian) that was successful but running the examples fails with the following error:

Traceback (most recent call last):
  File "main.py", line 45, in <module>
    sketch_pipeline.RunSketchPipeline()
  File "/home//remove/csg/InverseCSG-master/sketch_pipeline.py", line 717, in RunSketchPipeline
    point_cloud_seg.SegmentPointCloud(part_file, seg_num, \
  File "/home//remove/csg/InverseCSG-master/point_cloud_seg.py", line 25, in SegmentPointCloud
    cluster_result.fit(points)
  File "/home//.local/lib/python3.8/site-packages/sklearn/cluster/_agglomerative.py", line 834, in fit
    X = self._validate_data(X, ensure_min_samples=2, estimator=self)
  File "/home//.local/lib/python3.8/site-packages/sklearn/base.py", line 421, in _validate_data
    X = check_array(X, **check_params)
  File "/home//.local/lib/python3.8/site-packages/sklearn/utils/validation.py", line 63, in inner_f
    return f(*args, **kwargs)
  File "/home//.local/lib/python3.8/site-packages/sklearn/utils/validation.py", line 669, in check_array
    raise ValueError("Found array with %d sample(s) (shape=%s) while a"
ValueError: Found array with 1 sample(s) (shape=(1, 3)) while a minimum of 2 is required by AgglomerativeClustering

Checking the code, it points to the call of

cluster_result = cluster.AgglomerativeClustering(n_clusters = seg_num)
cluster_result.fit(points)

The problem is that points just contain a point and AgglomerativeClustering fails since it expects at least two.

Note this happens after

if not sketch_done or '[SKETCH] DONE' not in open(sketch_output_file).read():
      helper.PrintWithRedColor('Problem is too hard. Need segmentation.')
      return '', False

is called.

Note I have tried to run it with most the given examples but failed:

python3 run_tests.py <path> one_cube
python3 run_tests.py <path> ex_011
python3 run_tests.py <path> ex_067

Note I found the same issue antonymarion/inverseCSG#4

How can we address this?

Thanks!

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.