yijiangh / inversecsg Goto Github PK
View Code? Open in Web Editor NEWCode mirror of the paper: InverseCSG: Automatic Conversion of 3D Models to CSG Trees
Home Page: https://people.csail.mit.edu/taodu/csg/csg.pdf
Code mirror of the paper: InverseCSG: Automatic Conversion of 3D Models to CSG Trees
Home Page: https://people.csail.mit.edu/taodu/csg/csg.pdf
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!
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.