shunsukesaito / SCANimate

This repository contains the code for the paper "SCANimate: Weakly Supervised Learning of Skinned Clothed Avatar Networks"
https://scanimate.is.tue.mpg.de/
Other
273 stars 31 forks source link

Train/Test with Color #12

Closed XiaodongGuan closed 2 years ago

XiaodongGuan commented 2 years ago

Hi, could you give a demo of using test_color.py and train_color.py? Is there any special requirement on the data?

I made several attempts on training and testing the color predictor, I can see that the data in the .obj file is in a nx6 format. Is each row composed of vertex coordinates and the corresponding RGB value(in (0,1))?

Could you recommend a proper way to render the mesh with color using the .obj file?

Many thanks.

JinlongYANG commented 2 years ago

Hi, thanks for your interest!

Yet we couldn't simply provide demo training data as for the geometry used in train_scanimate.py and test_scanimate.py due to the sensitivity of textured subject data. Same reason for not providing a pretrained colored model. Thus you need to find such textured data to train.

However, it is easy to run the color module and the data requirement is straightforward.

  1. You just need colored .ply files instead of the ones in the geometry demo data.
  2. Then first you train a geometry model using train_scanimate
  3. And after that, you can run the train_color.py with the same config file for train_scanimate. The train_color.py will load previously trained geometry model and only train a color module.

Regarding this:

Could you recommend a proper way to render the mesh with color using the .obj file?

There are many tools that can render .obj files with vertex color, for example, meshlab. Yet not every tool supports obj vertex color though, such as blender.

Hope the above helps.

XiaodongGuan commented 2 years ago

Thanks for your explanation. Do you know any datasets that contain colored 3D scans of dressed human body? I tried SURREAL but they have only colored samples for minimally-dressed body models(the outfit is painted on the body).

You just need colored .ply files instead of the ones in the geometry demo data

Perhaps I can use the .ply(point cloud with vertex-wise color) produced by SCALE to train SCANimate's color module? What should the .ply file contain? I downloaded .ply for SCANimate and opened it in text using PyCharm, but it appeared as unreadable characters.

JinlongYANG commented 2 years ago

For textured dataset of clothed human you can try this: https://github.com/zhixuany/HUMBI

What should the .ply file contain? I downloaded .ply for SCANimate and opened it in text using PyCharm, but it appeared as unreadable characters.

.ply format is a commonly used 3D file format. You could not open it with a text editor because it is in binary format.

  1. Open it with meshlab
  2. Save it as .ply format within meshlab and untick "save as binary" option
  3. Then you can open .ply with any text editor.

Perhaps I can use the .ply(point cloud with vertex-wise color) produced by SCALE

You need to change the code a bit to make it work with point cloud inputs since in SCANimate we use edges.

XiaodongGuan commented 2 years ago

You just need colored .ply files instead of the ones in the geometry demo data

Please could you explain or give an example of how the color is written in the .ply file? I am about to create some but have no idea about how to correctly provide the mesh with color for SCANimate.

JinlongYANG commented 2 years ago

You can look into this: http://paulbourke.net/dataformats/ply/ In short, define it in the header and then give the values for each vertex.

Another easy way is to create one from meshlab.

XiaodongGuan commented 2 years ago

Thanks!