bmlklwx/EMS-superquadric_fitting

multi-superquadric recovery not working

Closed this issue · 7 comments

Hi,
The python scripts works almost perfectly. I am trying some of your examples (e.g., dog, cat, turtle). But the framework only produces a single superquadric for every object. Tweaking the parameters (outlierRatio, adaptiveUpperBound, arcLength) didn't help either. Is it possible to apply also multi-superquadric recovery on the objects? Or is this not implemented yet?

image

Thanks for your interest in our algorithm! Yes, the multi-superquadric recovery is only implemented in the Matlab version for now. Please allow me some time to have this function translated into Python.

Hi, thank you for your nice work!

any updates on the multi-superquadric implementation in python?

Hi Federico,
You can the implementation of the multi-superquadric recovery method in "multiquadric_test.py"

[Update: the problem lies within the DBScan algorithm of Sklearn. In my situation the DBScan algorithm of Open3D gives better results]

Hello!

I'm running into a slight problem with the multiquadric method. I'm using my own generated point clouds, but the coordinates are about 100 times as big as e.g. the turtle point cloud coordinates, as well as that the point clouds are separated. With the current settings in the multiquadric_test.py file, it's only creating a single mesh. What you see in the image is the result after changing Sigma to 0 and Rescale to True (and it's the same if I change the rescaling value from 10 to 100 so that doesn't really seem like being the problem (I think?)).
image

The result for this point cloud should ideally be 4 cylinder-like meshes, but I'm starting to think that this is not possible for separated point clouds within one .ply file. Applying the single superquadric python file to (accidentally) only part of one of the wheels does result into the exact results that I'm aiming for:
image

Changing the epsilon to a higher number (in my case 9.8) does result into 4 meshes, but not as I expected them to be formed:
image

Regarding the scale of my point cloud, I'm dealing with extreme coordinates like [-276.659 100.255 -572.388] and [421.721 181.332 -338.95].

So in the end my question: is it even possible to use this method for gathering the 4 meshes and if so, what settings should I also take a look at to achieve this goal? Otherwise I will have to find a way to split up my point cloud prior to this algorithm and simply put it through the single superquadric script.

Thanks!

@rosalievanark
Hi sorry for my late reply, since I was spending the lunar new year with my family. There is a possible way to solve your problem but needs a little modification. Since the input point cloud is clearly separated in your scenario, the multi-superquadric algorithm might work better if DBSCAN (line 49 in multiquadric_test.py) is called before the first iteration of EMS_recovery (line 32, which is the single superquadric fitting). That is try to do an initial clustering ahead of the fitting. Please let me know if you need any help.

@bmlklwx
Hi no worries! In the meantime I got it working by using DBSCAN from Open3D (with which I also created my point clouds, hence the change in library for me) prior to putting it into the test script, so I can just perform single superquadric fitting. I created my own multi-quadric script that is generally a combination of test_script.py and multiquadric_test.py, reading in the ply files of the individual objects and merging (appending) them in the end. Works like a charm for my project ;)

Anyway, I just quickly tried what you suggested, but what should then be placed in the .fit(...) function? point_seg[h][c] does not do the trick but I also already imagined that I had to do a bit more than that.

@rosalievanark
What I mean is similar to what you have done: cluster first and then call to fit.