Giter VIP home page Giter VIP logo

Comments (9)

RasmusRPaulsen avatar RasmusRPaulsen commented on June 29, 2024 2

Hi,
The problem is that the code is using vtk.vtkVRMLImporter() that only supports VRML 2.0.

The file from @cuixin1992 is in VRML 1.0 and therefore the file parser fails.

There are no easy ways to fix this from my side.

If you in any way can convert your files from VRML 1.0 to VRML 2.0 it should work.

Also do remember, that you should apply a pre-transformation if your scans are not roughly aligned to the default coordinate system. Let me know if this is an issue.

Best,
Rasmus

from deep-mvlm.

cuixin1992 avatar cuixin1992 commented on June 29, 2024

@RasmusRPaulsen

from deep-mvlm.

bilelmnasser avatar bilelmnasser commented on June 29, 2024

hi @cuixin1992, it seems your error comes from VTK module in preparedata.py file :
` vrmlin = vtk.vtkVRMLImporter()
vrmlin.SetFileName(name_pd)
vrmlin.Update()

pd = vrmlin.GetRenderer().GetActors().GetLastActor().GetMapper().GetInput()`

try to see if you installed the right version of vtk

from deep-mvlm.

cuixin1992 avatar cuixin1992 commented on June 29, 2024

Hi, @bilelmnasser, thank you for your answer.
I install the same version of packages with the author, except the libnetcdf 4.7.1. Mine is libnetcdf 4.6.1 I really cannot find the same version.

After several tries, I got the 'GetMapper' problem using some data. For several data, I can run the preparedata.py without error. But I got the blank images. I prepared .bmp and .wrl scanned by Artec hand scanner. I am not sure what's wrong with my data.
image

from deep-mvlm.

RasmusRPaulsen avatar RasmusRPaulsen commented on June 29, 2024

@cuixin1992 I now managed to make the code running with your data. What I did was:

  • used http://www.interocitors.com/polyhedra/vr1tovr2/index.html to convert the scan to VRML 2.0
  • used the geometry only pre-trained network for BU-3DFE (configs/BU_3DFE-geometry.json)
  • Used a pre-rotation (-90 degrees around y axis) in the JSON file:
    "pre-align": {
    "align_center_of_mass" : false,
    "rot_x": 0,
    "rot_y": -90,
    "rot_z": 0,
    "scale": 1,
    "write_pre_aligned": false
    }

This way the landmarks are successfully found on one of the test scans.

Please let me know if this approach does not work.

from deep-mvlm.

cuixin1992 avatar cuixin1992 commented on June 29, 2024

Thank you very much for your instructions.
After changing the data to VRML 2.0, I can use the preparedata.py without error. But I still got one problem that the output rendering files were empty. I wonder if you can get the rendered images using my data.
I think it is not the rotation problem because I tried your method by your code and I also tried to roughly align them manually. There is no change to the result.
image

from deep-mvlm.

RasmusRPaulsen avatar RasmusRPaulsen commented on June 29, 2024

I agree that preparedata.py is not very user friendly. Unless your data is exactly in the format of BU_3DFE it needs quite some code tweaking. Some things can be done by modifying the JSON file that you use. I managed to make renderings of your data by setting:

    "type": "MVLMModel",
    "args": {
        "n_landmarks": 15,
        "n_features": 256,
        "dropout_rate": 0.2,
        "image_channels": "RGB"
    }

"process_3d": {
"filter_view_lines": "quantile",
"heatmap_max_quantile": 0.5,
"heatmap_abs_threshold": 0.5,
"write_renderings": false,
"off_screen_rendering": true,
"min_x_angle": -20,
"max_x_angle": 20,
"min_y_angle": -130,
"max_y_angle": -50,
"min_z_angle": -20,
"max_z_angle": 20
},

"pre-align": {
	"align_center_of_mass" : false,
	"rot_x": 0,
	"rot_y": 0,
	"rot_z": 0,
	"scale": 1,
	"write_pre_aligned": false
}

If you have further issues, please show me the console output.

from deep-mvlm.

cuixin1992 avatar cuixin1992 commented on June 29, 2024

No, I think you did a great job! It is not the problem of your code, it is my problem. I am still a beginner at coding, so I can't solve problems very smoothly. But thanks to your help, I further understood your code and learned a lot. And I am sorry I took up a lot of your time.
I tried your rotation and tried many combinations that may work in my opinion. And I also manually aligned data. But I still got the blank rendered images, which let me guess, I have other problems. I think I still didn't read the .wrl properly.

Here are the console output and variable output.
image
image
image

from deep-mvlm.

cuixin1992 avatar cuixin1992 commented on June 29, 2024

@RasmusRPaulsen Hi, Prof. Rasmus R. Paulsen, how are you doing? Are you still very busy? Actually, I had not found where the problem is. I did not solve the rendering problem yet. I check the scale and the direction of the face, but it seems that the problem not happened here. I wonder did you successfully rendered the data I sent you? If so, I will further check the alignment problem. Thank you very much.

from deep-mvlm.

Related Issues (14)

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.