1 minute read

https://github.com/turandai/gaussian_surfels

Tain a scene:

python train.py -s path/to/your/data/directory

Trained model will be save in output/. To render images and reconstruct mesh from a trianed model:

python render.py -m path/to/your/trained/model --img --depth 10

We use screened Poisson surface reconstruction to extract mesh, at this line in render.py:

poisson_mesh(path, wpos, normal, color, poisson_depth, prune_thrsh)
  • path
    • ํŒŒ์ผ์˜ ๊ฒฝ๋กœ๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.
    • ์ƒ์„ฑ๋œ ๋ฉ”์‰ฌ ํŒŒ์ผ์ด ์ €์žฅ๋  ์œ„์น˜๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
  • wpos
    • โ€˜weighted positionsโ€™์˜ ์•ฝ์–ด๋กœ, ์ ๋“ค์˜ 3D ์ขŒํ‘œ(x, y, z) ์ •๋ณด๋ฅผ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.
    • ๋ฉ”์‰ฌ๋ฅผ ์ƒ์„ฑํ•  ๋•Œ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
  • normal
    • ์ ๋“ค์˜ ๋ฒ•์„  ๋ฒกํ„ฐ๋ฅผ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.
    • ๊ฐ ์ ์—์„œ ํ‘œ๋ฉด์˜ ๋ฐฉํ–ฅ์„ ๋‚˜ํƒ€๋‚ด๋ฉฐ, ๋ฉ”์‰ฌ์˜ ํ‰ํ™œ๋„์™€ ๋ฐฉํ–ฅ์„ฑ์„ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค.
  • color
    • ์ ๋“ค์˜ ์ƒ‰์ƒ ์ •๋ณด๋ฅผ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.
    • RGB ์ƒ‰์ƒ๊ฐ’์„ ๊ฐ€์ง€๋ฉฐ, ๊ฐ ์ ์— ๋Œ€์‘๋˜๋Š” ์ƒ‰์ƒ์„ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
  • poisson_depth
    • Poisson ์žฌ๊ตฌ์„ฑ์˜ ๊นŠ์ด๋ฅผ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.
    • ๊ธฐ๋ณธ ๊นŠ์ด๋Š” 10์œผ๋กœ ์„ค์ •๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
    • ๋” ํฐ ์žฅ๋ฉด์—์„œ๋Š” ๋” ๋†’์€ ๊นŠ์ด ์ˆ˜์ค€์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • prune_thrsh
    • ๋ฉ”์‰ฌ๋ฅผ ํ”„๋ฃจ๋‹(๊ฐ€์ง€์น˜๊ธฐ)ํ•  ๋•Œ ์‚ฌ์šฉ๋˜๋Š” ์ž„๊ณ„๊ฐ’์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
    • ํŠน์ • ์ž„๊ณ„๊ฐ’์œผ๋กœ Poisson ๋ฉ”์‰ฌ๋ฅผ ํ”„๋ฃจ๋‹ํ•˜์—ฌ ์™ธ๊ณฝ ๋ฉด์„ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.
    • ์ž„๊ณ„๊ฐ’์ด ๋‚ฎ์œผ๋ฉด ๋” ๋งŽ์€ ์ ๋“ค์ด ์ œ๊ฑฐ๋˜๊ณ , ๋†’์œผ๋ฉด ๋” ์ ์€ ์ ๋“ค์ด ์ œ๊ฑฐ๋ฉ๋‹ˆ๋‹ค.
    • ์ž„๊ณ„๊ฐ’์ด ๋„ˆ๋ฌด ๋‚ฎ์œผ๋ฉด ๊ณผ๋„ํ•œ ํ”„๋ฃจ๋‹์œผ๋กœ ๋ฉ”์‰ฌ์— ๊ตฌ๋ฉ์ด ์ƒ๊ธธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    • ์ด๋Ÿฌํ•œ ๊ฒฝ์šฐ โ€œprune_thrshโ€ ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ฆ๊ฐ€์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

In your output folder, xxx_plain.ply is the original mesh after Poisson reconstruction with the default depth of 10. For scenes in larger scales, you may use a higher depth level.

We prune the Poisson mesh with a certain threshold to remove outlying faces and output xxx_pruned.ply. This process sometimes may over-prune the mesh and results in holes. You may increase the โ€œprune_thrshโ€ parameter accordingly.

Leave a comment