Giter Site home page Giter Site logo

mepp2's People

Contributors

elombardi2 avatar ericboix avatar m-tola avatar mtola avatar rthomas96 avatar vvidal avatar yananehme avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mepp2's Issues

Roughness

Is it possible to estimate the roughness of a 3D mess as in [L09] with MEPP2 ?

[L09] Lavoué, G., A Local Roughness Measure for 3D Meshes and its Application to Visual Masking, ACM Transactions on Applied Perception, Vol. 5, No. 4, Article 21, 2009.

Question about the curvature of MSDM2

Thanks for the nice work of MSDM and MSDM2.
However, in the MSDM2 paper, I don't see any detail about how to calculate the curvature of the original mesh $M_r$, can you explain it more clearly?

CGAL ERROR: assertion violation!

I found issue, that if original and corrupted meshes are interchanged, there is another assert violation from CGAL / segfault here
with the following error:

terminate called after throwing an instance of 'CGAL::Assertion_exception'
 what():  CGAL ERROR: assertion violation!
Expr: _idx < data_.size()

The reason is still unclear to me. When changing the order of meshes back to original first, corrupted second the problem is not occurring anymore.

Python reimplement MSDM but get super big similarity score

def MSDM(mesh1, mesh2):                                                                                              
    mesh1.add_attribute("vertex_mean_curvature")          
    mesh2.add_attribute("vertex_mean_curvature")                                                                     
    radius = 0.1                                      
    curva1 = torch.from_numpy(mesh1.get_attribute("vertex_mean_curvature")).to(torch.float)                          
    curva2 = torch.from_numpy(mesh2.get_attribute("vertex_mean_curvature")).to(torch.float)                          
    ve1 =torch.from_numpy(mesh1.vertices).to(torch.float)
    curva2 = torch.from_numpy(mesh2.get_attribute("vertex_mean_curvature")).to(torch.float)          
    ve1 =torch.from_numpy(mesh1.vertices).to(torch.float)                                                            
    ve2 =torch.from_numpy(mesh2.vertices).to(torch.float)                                                            
                                                                                                                     
    # dist1                                                                                                          
    dist1 = square_distance(ve1.view(1,ve1.size()[0],ve1.size()[1]), ve1.view(1,ve1.size()[0],ve1.size()[1]))        
    N1 = ve1.size()[0]                                    
    group_idx1 = torch.arange(N1, dtype=torch.long).view(1, 1, N1).repeat([1, N1, 1])                                
    group_idx1[dist1 > radius ** 2] = N1                  
    group_idx1 = group_idx1.sort(dim=-1)[0][:, :, :]                                                                 
    group_idx1 = group_idx1.view(group_idx1.size()[1],group_idx1.size()[2])                                          
                                                                                                                     
    # dist2                                                                                                          
    dist2 = square_distance(ve2.view(1,ve2.size()[0],ve2.size()[1]), ve2.view(1,ve2.size()[0],ve2.size()[1]))        
    N2 = ve2.size()[0]                                                                                               
    # print(N1,N2)                                                                                                   
    group_idx2 = torch.arange(N2, dtype=torch.long).view(1, 1, N2).repeat([1, N2, 1])                                
    group_idx2[dist2 > radius ** 2] = N2                                                                             
    group_idx2 = group_idx2.sort(dim=-1)[0][:, :, :]      
    group_idx2 = group_idx2.view(group_idx2.size()[1],group_idx2.size()[2])                                          
                                                                                                                     
    # for loop                    
    msdm = 0                                              
    for i in range(N1):                                                                                              
        n1_idx = group_idx1[i]                
        s1_idx = n1_idx.lt(N1)                  
        f1_idx = n1_idx[s1_idx]                           
        need_cur1 = curva1[f1_idx]                    
                                                          
        n2_idx = group_idx2[i]                            
        s2_idx = n2_idx.lt(N2)                            
        f2_idx = n2_idx[s2_idx]                                                                                      
        need_cur2 = curva2[f2_idx]                        
                                                          
        mu_1, mu_2 = need_cur1.mean(), need_cur2.mean()                                                              
        fa_1, fa_2 = need_cur1.std(), need_cur2.std()                                                                
        fa_12 = 0                                       
        fa_21 = 0                                         
        for j in f1_idx:                                                                                                     
            fa_12 += (curva1[j]-mu_1)*(curva2[j]-mu_2)    
        for q in f2_idx:                                                                                             
            fa_21 += (curva1[q]-mu_1)*(curva2[q]-mu_2)                           
        fa_12 = ((fa_12/len(f1_idx))+(fa_21/len(f2_idx)))/2 
        l_12 = (mu_1-mu_2).pow(2).sqrt()/(max(mu_1,mu_2)) #+1e-6)                                                    
        c_12 = (fa_1-fa_2).pow(2).sqrt()/(max(fa_1,fa_2)) #+1e-6)                                                    
        s_12 = (fa_1*fa_2-fa_12).pow(2).sqrt()/(fa_1*fa_2) #+1e-6)                                                   
        lmsdm = (0.4*l_12.pow(3) + 0.4*c_12.pow(3) + 0.2*s_12.pow(3)).pow(1/3)                                       
        if torch.isnan(lmsdm):                                                                                       
           msdm += 0                                      
        else:                                                                          
           msdm += lmsdm.pow(3)                                                                                      
    return (msdm/N1).pow(1/3)

The mesh1 and mesh2 has the same vertices, but the final score is super high, did I do something wrong?

Seg fautl on example_msdn2

Hi, we are trying to compare two meshes using example_msdn2.
We get a segmentation fault around these lines in curvature.hpp , function geodes_principal_curvature_per_vert

    do
    {
      const Point3d p1 = get(pm, target(*h, g));   // here
      const Point3d p2 = get(pm, source(*h, g));

Apparently, the out-of-index or empty access comes from target().
I attach here the two meshes that we are testing.

The "degraded" mesh (pumpkin_hole_15_2.obj) has some holes we create to degrade the mesh. I don't know if that may be the problem. In that case, has the mesh to be watertight for the measure to be computed?

Thanks in advance for any help you can provide!
Pumpkin Hole.zip

Curvature

Hello,
Thank you for the repository. I am using curvature plugin to identify the chains(1-ring) in the 3D models.It worked well for the below example.
firstexample
However when I used the same parameters and used the same plugin for some more examples I couldn't see the curvature results(colormap).Please find the below example.
secondexample
Is there anything I am missing or what could be the reason behind it?
Thank you very much

WinSock2.h conflicting with some header

Good morning.
I am writing you because I am currently trying to include WinSock2 to estabilish an HTTP connection to retrieve a mesh from the internet, the thing is when I compile my solution the library conflicts with the already present winsock members.. So, looking in the internet, I found out that windows.h automatically includes winsock.h . I searched in the full solution if there were any traces of "windows.h" but I didn't find any. Can you help me solve this?

MSDM2 on non-manifold meshes

Is MSDM2 supposed to work on non-manifold meshes ?
The example_msdm2 outputs a value on a pair non-manifold OBJs but it looks like the distance not make sense (e.g. computing on the same mesh returns ~0.2).

License of MEPP2?

What is the License of MEPP2?
Is it MIT, BSD-3 or Apache?

Thank you!

Can you provide installation package?

Can you provide installation package in different platform like windows, linux and mac?I think you could list the 3rd party library and least version in .md file so others can compile it correctly.Thank you.

Failed to link compare_mesh_files

Trying to compile master following the Install instructions, I get:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.6 LTS
Release:	16.04
Codename:	xenial

$ cmake --version
cmake version 3.14.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).

$ cat /usr/include/boost/version.hpp | grep "BOOST_LIB_VERSION"
//  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
#define BOOST_LIB_VERSION "1_70"

[~/git/MEPP2/build] $ make
Scanning dependencies of target cimg_tests
[ 25%] Building CXX object Testing/CImg/CMakeFiles/cimg_tests.dir/cimg_tests.cpp.o
[ 50%] Linking CXX executable cimg_tests
[ 50%] Built target cimg_tests
Scanning dependencies of target compare_mesh_files
[ 75%] Building CXX object Testing/Utils/CMakeFiles/compare_mesh_files.dir/compare_mesh_files.cpp.o
[100%] Linking CXX executable compare_mesh_files
CMakeFiles/compare_mesh_files.dir/compare_mesh_files.cpp.o: In function `FEVV::FileUtils::has_extension(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
compare_mesh_files.cpp:(.text._ZN4FEVV9FileUtils13has_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_b[_ZN4FEVV9FileUtils13has_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_b]+0x48): undefined reference to `boost::filesystem::path::extension() const'
collect2: error: ld returned 1 exit status
Testing/Utils/CMakeFiles/compare_mesh_files.dir/build.make:83: recipe for target 'Testing/Utils/compare_mesh_files' failed
make[2]: *** [Testing/Utils/compare_mesh_files] Error 1
CMakeFiles/Makefile2:271: recipe for target 'Testing/Utils/CMakeFiles/compare_mesh_files.dir/all' failed
make[1]: *** [Testing/Utils/CMakeFiles/compare_mesh_files.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

As I am on Ubuntu 16.04, I had to use a ppa's to have a recent versions of boost, cmake and openscenegraph.

Any idea what's the issue ?

EDIT: I found a hack, add -lboost_filesystem -lboost_system at the end of build/Testing/Utils/CMakeFiles/compare_mesh_files.dir/link.txt.
Now, I am stuck at:

$ make
[  2%] Built target cimg_tests
[  4%] Linking CXX executable compare_mesh_files
[  5%] Built target compare_mesh_files
[  7%] Generating __/Plugins/moc_PluginDialog.cxx
[  8%] Generating __/moc_SimpleWindow.cxx
Scanning dependencies of target mepp-gui
[ 10%] Building CXX object Visualization/Applications/CMakeFiles/mepp-gui.dir/__/__/External/osgQt/osg34and36/GraphicsWindowQt.cxx.o
[ 11%] Building CXX object Visualization/Applications/CMakeFiles/mepp-gui.dir/__/Plugins/moc_PluginDialog.cxx.o
In file included from /home/lea/git/MEPP2/Visualization/BaseWindow.h:15:0,
                 from /home/lea/git/MEPP2/Visualization/BaseWindowQt.h:13,
                 from /home/lea/git/MEPP2/Visualization/Plugins/PluginInterface.h:18,
                 from /home/lea/git/MEPP2/build/Visualization/Applications/__/Plugins/../../../../../Visualization/Plugins/PluginDialog.inl:11,
                 from /home/lea/git/MEPP2/build/Visualization/Applications/__/Plugins/../../../../../Visualization/Plugins/PluginDialog.hpp:54,
                 from /home/lea/git/MEPP2/build/Visualization/Applications/__/Plugins/moc_PluginDialog.cxx:9:
/home/lea/git/MEPP2/Visualization/PluginFilters/BasePlugin.h:57:28: error: ‘FEVV::PMapsContainer’ has not been declared
                      FEVV::PMapsContainer *pmaps_bag)
                            ^
Visualization/Applications/CMakeFiles/mepp-gui.dir/build.make:153: recipe for target 'Visualization/Applications/CMakeFiles/mepp-gui.dir/__/Plugins/moc_PluginDialog.cxx.o' failed
make[2]: *** [Visualization/Applications/CMakeFiles/mepp-gui.dir/__/Plugins/moc_PluginDialog.cxx.o] Error 1
CMakeFiles/Makefile2:529: recipe for target 'Visualization/Applications/CMakeFiles/mepp-gui.dir/all' failed
make[1]: *** [Visualization/Applications/CMakeFiles/mepp-gui.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

EDIT2: To clarify:

# compile with CGAL, OpenMesh and GUI
$ cmake -DCGAL_DIR="$HOME/CGAL-4.14" -DOPENMESH_DIR="$HOME/OpenMesh-7.1" -DBUILD_USE_GUI=ON -DCMAKE_BUILD_TYPE=Release ..
$ make

Works fine

# compile without CGAL nor OpenMesh, nor GUI
$ cmake -DBUILD_USE_CGAL=OFF -DBUILD_USE_OPENMESH=OFF -DBUILD_USE_GUI=OFF -DCMAKE_BUILD_TYPE=Release ..
$ make

Need the hack and then works fine

# compile with CGAL, GUI and FBX
$ cmake -DCGAL_DIR="$HOME/CGAL-4.14" -DFBX_DIR="$HOME/FBX_SDK/2019.0" -DBUILD_USE_GUI=ON -DBUILD_USE_FBX=ON -DCMAKE_BUILD_TYPE=Release ..
$ make

Even with the hack, I get the error given in EDIT

Application Crashes Applying MSDM2 Metric

Hello,
I am using the virtual machine provided in the website's installation guide. When I upload my meshes and apply the MSDM2 metric, the following error message is produced every time, and the application crashes. I would like to run this program properly but have no idea how a seg fault can help me fix this bug. Here is my complete error message:

####################################
# Begin block: Init Visualization. #
####################################
Gtk-Message: 22:09:38.827: Failed to load module "canberra-gtk-module"
####################################
# End block:   Init Visualization. #
# Elapsed time: 0.0496669s #
####################################
libpng warning: iCCP: known incorrect sRGB profile
Generic reading of "LRSTC_predicted.obj"
read_mesh(): found vertex color with size != 3. Disabling vertex color for all vertices.
read_mesh(): 1752 vertices duplicated (non-manifold mesh).
read_mesh(): the mesh has 6181 vertices, 14113 edges, 7561 faces.
Generic reading of "LRSTC_predicted.obj" done in 0.0100784s (parsing 0.00664439s, populating DS 0.00343401s).
libpng warning: iCCP: known incorrect sRGB profile
SimpleViewer init
[SimpleViewer] face normal missing, computing it
[SimpleViewer] vertex normal missing, computing it
[SimpleViewer] no material found, disabling textures
[SimpleViewer] I have drawn 7561 faces (with 22683 vertices).
[SimpleViewer] I have also drawn 6181 (superimpose) points and 14113 superimpose lines.
[MeshLoading] Loading using legacy rendering.
geometry.setUseVertexBufferObjects(1)
geometry.setUseDisplayList(0)
[SimpleViewer] Done 'loading' mesh (in graphic card) in 0.00153008 seconds.
[SimpleViewer] mesh 0x562b11c91ff0 stored with datastructure SURFACEMESH
Generic reading of "true.obj"
read_mesh(): found vertex color with size != 3. Disabling vertex color for all vertices.
read_mesh(): 588 vertices duplicated (non-manifold mesh).
read_mesh(): the mesh has 3216 vertices, 7007 edges, 3964 faces.
Generic reading of "true.obj" done in 0.00537146s (parsing 0.00375572s, populating DS 0.00161574s).
[SimpleViewer] face normal missing, computing it
[SimpleViewer] vertex normal missing, computing it
[SimpleViewer] no material found, disabling textures
[SimpleViewer] I have drawn 3964 faces (with 11892 vertices).
[SimpleViewer] I have also drawn 3216 (superimpose) points and 7007 superimpose lines.
[MeshLoading] Loading using legacy rendering.
geometry.setUseVertexBufferObjects(1)
geometry.setUseDisplayList(0)
[SimpleViewer] Done 'loading' mesh (in graphic card) in 0.00165916 seconds.
[SimpleViewer] mesh 0x562b126f95c0 stored with datastructure SURFACEMESH
Applying filter
use existing face-normal map for degraded mesh
use existing face-normal map for original mesh
Asking to calculate curvature
Segmentation fault (core dumped)

Segmentation of mesh

Hello,
Is the segmentation of meshes module is available in MEPP2?
I tried segmentation plugin from "https://projet.liris.cnrs.fr/mepp/mepp1/download.php" . Somehow it says segmentation is done but i don't see any colours or segmented regions.
I checked other plugins like remeshing and it seems to work. Is there something I am missing for using segmentation plugin?
Thank you very much

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.