Skip to content

๐Ÿ“ ํ˜„๋™์ด์˜ ํ”Œ๋žญํฌ ์ž์„ธ๋ฅผ 3D ํ”ผ๊ทœ์–ด๋กœ ๋งŒ๋“ค์–ด ๋ฐ•์ œ์‹œํ‚ค๊ธฐ #NeRF

Notifications You must be signed in to change notification settings

ProtossDragoon/PlankHyundong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

logo


All Contributors

Hits

๐Ÿ‡ฐ๐Ÿ‡ท ํ•œ๊ตญ์–ด / ๐Ÿ‡ฌ๐Ÿ‡ง English


ํ”Œ๋žญํฌ ํ˜„๋™ 3D

ํ—ฌ์Šค๋ณด์ด ํ˜„๋™์ด๊ฐ€ ์•Œ๋ ค์ฃผ๋Š” ์ •ํ™•ํ•œ ํ”Œ๋žญํฌ ์ž์„ธ! ํ—ฌ์ฐฝ์ด ๋˜๊ณ  ์‹ถ์€ ์‚ฌ๋žŒ๋“ค์€ NeRF๋ชจ๋ธ์„ ์ด์šฉํ•ด ๋ฝ‘์€, ํ˜„๋™์ด ํ”ผ๊ทœ์–ด๋ฅผ ์š”๋ฆฌ์กฐ๋ฆฌ ์‚ดํŽด๋ณด๊ณ  ์ž์‹ ๊ณผ ๋น„๊ตํ•˜๋ฉฐ ์šด๋™ํ•ด๋ณด๋Š”๊ฑด ์–ด๋–จ๊นŒ? ๐Ÿ‹๐Ÿป

๋ฐ์ดํ„ฐ์•ผ๋†€์ž 2022 ํ”„๋กœ์ ํŠธ ์„ค๋ช… ๋ฐœํ‘œ์˜์ƒ / ๋ฐœํ‘œ์ž๋ฃŒ


์ตœ์ข… ๊ฒฐ๊ณผ๋ฌผ

์ตœ์ข… ๊ฒฐ๊ณผ๋ฌผ (์‹ค์ œ ํ”ผ๊ทœ์–ด), ๊ฒฐ๊ณผ๋ฌผ ์ •์„ฑํ‰๊ฐ€ NeRF 3D ํ‘œํ˜„

๋ชฉ์ฐจ


๋น ๋ฅธ ์‹œ์ž‘

Open In Colab

PlankHyundong/
โ”œโ”€โ”€ nerf_quick_start.ipynb
โ”œโ”€โ”€ notebooks
โ”‚   โ”œโ”€โ”€ nerf_colab.ipynb
โ”‚   โ”œโ”€โ”€ nerf_wandb_colab.ipynb
โ”‚   โ”œโ”€โ”€ colmap_colab.ipynb
โ”‚   โ”œโ”€โ”€ extract_mesh_colab.ipynb
โ”‚   โ””โ”€โ”€ sampling_colab.ipynb
โ””โ”€โ”€ data
    โ”œโ”€โ”€ video
    โ”‚   โ””โ”€โ”€ video.MOV
    โ”œโ”€โ”€ (images)
    โ”‚   โ””โ”€โ”€ ...
    โ””โ”€โ”€ (logs)
        โ””โ”€โ”€ ...
  • notebook ํด๋”์—๋Š” ์ตœ์ข… ๊ฒฐ๊ณผ๋ฌผ์„ ๋งŒ๋“œ๋Š” ํŒŒ์ดํ”„๋ผ์ธ์— ํ•„์š”ํ•œ ๋…ธํŠธ๋ถ์ด ๊ฐ๊ฐ ์ €์žฅ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์ „์ฒด ์›Œํฌํ”Œ๋กœ๋ฅผ ๋น ๋ฅด๊ฒŒ ํ›‘์–ด๋ณผ ์ˆ˜ ์žˆ๋„๋ก nerf_quick_start.ipynb ์ด๋ผ๋Š” ๋‹จ์ผ ๋…ธํŠธ๋ถ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • nerf_quick_start.ipynb ์€ ์ด 4๋‹จ๊ณ„๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ์œผ๋ฉฐ ๊ตฌ์„ฑ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.
step content
1๏ธ Video Sampling : ๋น„๋””์˜ค๋กœ๋ถ€ํ„ฐ ์ด๋ฏธ์ง€ ์ƒ˜ํ”Œ๋งํ•˜๊ธฐ
2๏ธ Run COLMAP to get camera pose : ์ด๋ฏธ์ง€์— ๋Œ€ํ•œ ์นด๋ฉ”๋ผ ํฌ์ฆˆ ๊ตฌํ•˜๊ธฐ
3๏ธ Run NeRF : NeRF ๋ชจ๋ธ ํ•™์Šต์‹œํ‚ค๊ธฐ
4๏ธ Get Mesh file : NeRF ๋ชจ๋ธ๋กœ๋ถ€ํ„ฐ Mesh ๋งŒ๋“ค๊ณ  ๋‹ค๋“ฌ๊ธฐ
  • ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๋Š” data/video/video.MOV์˜ ๊ฒฝ๋กœ์— ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์ฒ˜์Œ ๋ถ€๋ถ„์— ํ•ด๋‹น ํด๋”๋ฅผ clone๋ฐ›๋Š” ์…€์„ ์ถ”๊ฐ€ํ•ด๋‘์—ˆ์Šต๋‹ˆ๋‹ค.
  • ์œ„ ํด๋”์— images, logs๋ผ๋Š” ํ•˜์œ„ ํด๋”๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ๊ฐ ํด๋”์—๋Š” ์ƒ˜ํ”Œ๋งํ•œ ์ด๋ฏธ์ง€๋“ค๊ณผ config, mesh, weight ๋ฐ ์˜์ƒ ํŒŒ์ผ ๋“ฑ์ด ์ €์žฅ๋ฉ๋‹ˆ๋‹ค.

๊ตฌ์„ฑ์š”์†Œ๋ณ„๋กœ ์‹œ์ž‘ํ•˜๊ธฐ

ํŒŒ์ดํ”„๋ผ์ธ

output ์„ค๋ช…
1๏ธโƒฃ RGB ๋น„๋””์˜ค ํ”ผ์‚ฌ์ฒด๋ฅผ ๊ฐ€์šด๋ฐ์— ๋‘๊ณ  ์ดฌ์˜์ž๊ฐ€ 360๋„๋กœ ํšŒ์ „ํ•˜๋ฉฐ ์˜์ƒ์„ ์ˆ˜์ง‘ํ•ฉ๋‹ˆ๋‹ค.
2๏ธโƒฃ N * RGB ์ด๋ฏธ์ง€ ์„ธํŠธ ๋น„๋””์˜ค๋ฅผ ์ƒ˜ํ”Œ๋งํ•˜์—ฌ ์ด๋ฏธ์ง€๋“ค์„ ์–ป์–ด๋ƒ…๋‹ˆ๋‹ค.
3๏ธโƒฃ N * ์นด๋ฉ”๋ผ ํฌ์ฆˆ ์„ธํŠธ ์นด๋ฉ”๋ผ ํฌ์ฆˆ๋Š” NeRF ํ•™์Šต์— ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
2๏ธโƒฃ ์—์„œ ์ƒ˜ํ”Œ๋ง๋œ ์ด๋ฏธ์ง€๋“ค์— LLFF๋ฅผ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
4๏ธโƒฃ ํ•™์Šต๋œ NeRF ๋ชจ๋ธ ํŒŒ์ผ NeRF ๋ชจ๋ธ์„ ํ•™์Šต์‹œํ‚ต๋‹ˆ๋‹ค.
NeRF ๋ชจ๋ธ์— ๋‹ด๊ธด 3D ํ‘œํ˜„์„ implicit 3D ํ‘œํ˜„์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.
5๏ธโƒฃ ๋ฉ”์‰ฌ ์˜ค๋ธŒ์ ํŠธ ํŒŒ์ผ implicit 3D ํ‘œํ˜„์— ๋ฉ”์‰ฌ๋ฅผ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
'explicit' 3D ํ‘œํ˜„์˜ ํ˜•ํƒœ๋กœ ๋ณ€ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
6๏ธโƒฃ 3D ํ”„๋ฆฐํ„ฐ ์ธ์‡„ ํŒŒ์ผ ์Šฌ๋ผ์ด์„œ ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ์ด์šฉํ•ฉ๋‹ˆ๋‹ค.
3D ํ”„๋ฆฐํ„ฐ์˜ ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์„ธํŒ…ํ•˜๊ณ  ์ธ์‡„ ์ค€๋น„๋ฅผ ๋งˆ์นฉ๋‹ˆ๋‹ค.
6๏ธโƒฃ 3D ํ”„๋ฆฐํ„ฐ๋กœ ์ถœ๋ ฅํ•œ ํ”ผ๊ทœ์–ด 3D ํ”„๋ฆฐํ„ฐ๋กœ ์ตœ์ข… ๊ฒฐ๊ณผ๋ฌผ์„ ๋ฝ‘์•„๋ƒ…๋‹ˆ๋‹ค.

์•„๋ž˜์—์„œ๋Š” ํŒŒ์ดํ”„๋ผ์ธ ๊ฐ๊ฐ์— ๋Œ€ํ•ด ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.


1๏ธโƒฃ ํ”ผ์‚ฌ์ฒด ๋™์˜์ƒ ์ดฌ์˜ํ•˜๊ธฐ

๊ถŒ์žฅ, 360๋„ ์ดฌ์˜
์ด ํ”„๋กœ์ ํŠธ์—์„œ ์ดฌ์˜ํ•œ ๋ฐฉ๋ฒ•

โž• ์ดฌ์˜ ๊ถŒ์žฅ์‚ฌํ•ญ๊ณผ ์ฃผ์˜์‚ฌํ•ญ์€ ๋‹ค์Œ์„ ํ™•์ธํ•ด์ฃผ์„ธ์š”!


2๏ธโƒฃ ๋น„๋””์˜ค๋กœ๋ถ€ํ„ฐ ์ด๋ฏธ์ง€ ์ƒ˜ํ”Œ๋งํ•˜๊ธฐ

Open In Colab

  • ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ด์šฉํ•ด ์ดฌ์˜ํ•œ ๋น„๋””์˜ค๋ฅผ ์ด๋ฏธ์ง€๋กœ ๋“ฑ๊ฐ„๊ฒฉ ์ƒ˜ํ”Œ๋งํ•ฉ๋‹ˆ๋‹ค.
  • โœ… ์นด๋ฉ”๋ผ ํŠธ๋ž˜์ ํ† ๋ฆฌ๊ฐ€ ๊ธธ๋‹ค๋ฉด ๋” ์ž˜๊ฒŒ ์ž˜๋ผ ์ฃผ๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.
  • โ— ์นด๋ฉ”๋ผ ํŠธ๋ž˜์ ํ† ๋ฆฌ๊ฐ€ ์งง๊ณ  ๋ Œ์ฆˆ๋ฅผ ์—ด์–ด๋‘๋Š” ์‹œ๊ฐ„์ด ์งง์€ ๊ฒฝ์šฐ, ๋™์˜์ƒ์œผ๋กœ๋ถ€ํ„ฐ ์ด๋ฏธ์ง€๋ฅผ ๋„ˆ๋ฌด ์ž˜๊ฒŒ ์ƒ˜ํ”Œ๋งํ•œ๋‹ค๋ฉด ์„ฑ๋Šฅ์— ์•…์˜ํ–ฅ์„ ๋ฏธ์น  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

โž• ์ž์„ธํ•œ ํŒŒ๋ผ๋ฏธํ„ฐ๋Š” ๋‹ค์Œ์„ ํ™•์ธํ•ด์ฃผ์„ธ์š”!


3๏ธโƒฃ ์ด๋ฏธ์ง€์— ๋Œ€ํ•œ ์นด๋ฉ”๋ผ ํฌ์ฆˆ ๊ตฌํ•˜๊ธฐ

Open In Colab

NOTE: ๋ฐ˜๋“œ์‹œ GPU ๋Ÿฐํƒ€์ž„์„ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

  • NeRF ์˜ ์ž…๋ ฅ์€ (์ด๋ฏธ์ง€, ์นด๋ฉ”๋ผํฌ์ฆˆ) ์˜ ์ง‘ํ•ฉ์ž…๋‹ˆ๋‹ค.
  • ์ปค์Šคํ…€ ์ด๋ฏธ์ง€๋กœ๋ถ€ํ„ฐ ์ด๋ฏธ์ง€ ๊ฐ๊ฐ์— ํ•ด๋‹นํ•˜๋Š” ์นด๋ฉ”๋ผ ํฌ์ฆˆ๋ฅผ ๊ณ„์‚ฐํ•˜๊ธฐ ์œ„ํ•ด COLMAP์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๋™์ž‘ํ•˜๋Š” LLFF ์ €์ž์˜ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
  • ์‹คํ–‰์ด ์™„๋ฃŒ๋˜๋ฉด ๋ฐ์ดํ„ฐ์…‹ ํด๋” ์•ˆ์— NeRF ๋ชจ๋ธ์„ ์‹คํ–‰์‹œํ‚ค๋Š” ๋ฐ ํ•„์š”ํ•œ poses_bounds.npy ํŒŒ์ผ์ด ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.

โž• LLFF ํ™˜๊ฒฝ ๊ตฌ์ถ•์— ์–ด๋ ค์›€์ด ์ƒ๊ธฐ๋ฉด ๋‹ค์Œ์„ ํ™•์ธํ•ด์ฃผ์„ธ์š”!


4๏ธโƒฃ NeRF ๋ชจ๋ธ ํ•™์Šต์‹œํ‚ค๊ธฐ

Open In Colab

NOTE: ๋ฐ˜๋“œ์‹œ GPU ๋Ÿฐํƒ€์ž„์„ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

ํ•™์Šต ์˜ต์…˜

์˜ต์…˜ ์—ญํ• 
--no_ndc, --spherify, --lindisp forward facing scene ์—์„œ๋Š” ํ•„์š”ํ•˜์ง€ ์•Š์ง€๋งŒ, 360 scene ์— ๋Œ€ํ•ด์„œ๋Š” ๋ฐ˜๋“œ์‹œ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ํ”Œ๋ž˜๊ทธ์ž…๋‹ˆ๋‹ค.

๊ฒฐ๊ณผ

RGB RGB_still disparity

โž• wandb ์—ฐ๋™๊ณผ nerf ํŒŒ๋ผ๋ฏธํ„ฐ ์‹คํ—˜ ๊ฒฐ๊ณผ๋ฅผ ์•Œ๊ณ  ์‹ถ๋‹ค๋ฉด ๋‹ค์Œ์„ ํ™•์ธํ•ด์ฃผ์„ธ์š”!


5๏ธโƒฃ NeRF ๋ชจ๋ธ๋กœ๋ถ€ํ„ฐ Mesh ๋งŒ๋“ค๊ณ  ๋‹ค๋“ฌ๊ธฐ

Mesh ๋งŒ๋“ค๊ธฐ

Open In Colab

NOTE: ๋ฐ˜๋“œ์‹œ GPU ๋Ÿฐํƒ€์ž„์„ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

  • NeRF ๋ชจ๋ธ๋กœ ํ•™์Šต์‹œํ‚จ ํ•™์Šต์‹œํ‚จ ๋ชจ๋ธ์„ ๋กœ๋“œํ•œ ๋’ค, PyMCubes ํŒจํ‚ค์ง€๋ฅผ ํ†ตํ•ด ํ‘œ๋ฉด(iso-surface)์„ ์ถ”์ถœํ•˜๊ณ  ๊ทธ ๊ฒฐ๊ณผ๋ฌผ์ธ 3d.obj ํŒŒ์ผ์„ ์ €์žฅํ•˜๋Š” ๋‹จ๊ณ„์ž…๋‹ˆ๋‹ค.
  • ํ•™์Šต๋œ NeRF ๋ชจ๋ธ์˜ 3D ํ‘œํ˜„(implicit representation)์„ ์‹œ๊ฐํ™” ํ•˜๊ธฐ ์œ„ํ•ด pyrender ์„ ์ด์šฉํ•ด turntable.mp4 ์˜์ƒ์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
  • ์ด ๋…ธํŠธ๋ถ์˜ ์ถœ์ฒ˜๋Š” NeRF ๊ณต์‹ ์ €์žฅ์†Œ์ž…๋‹ˆ๋‹ค.

Mesh ๋‹ค๋“ฌ๊ธฐ

  • ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ๋ฅผ ํ†ตํ•ด ์ˆ˜์ง‘ํ•œ ๋ฐ์ดํ„ฐ๊ฐ€ ์•„๋‹ˆ๋ผ ์ง์ ‘ ์ˆ˜์ง‘ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ํ†ตํ•ด NeRF ๋ชจ๋ธ์„ ํ•™์Šต์‹œ์ผฐ๊ธฐ ๋•Œ๋ฌธ์— ์ถ”์ถœํ•œ mesh์— ๋…ธ์ด์ฆˆ๊ฐ€ ๋งŽ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์ด ๊ฒฝ์šฐ 3d ํ”„๋ฆฐํ„ฐ๋กœ ์ถœ๋ ฅ ์ „ blender๋กœ ์ง์ ‘ ๋…ธ์ด์ฆˆ๋ฅผ ์ œ๊ฑฐํ•ด์ฃผ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

โž• ๋ฉ”์‰ฌ ๋งŒ๋“ค๊ธฐ์™€ ๊ด€๋ จ๋œ ํŒŒ๋ผ๋ฏธํ„ฐ์˜ ์‹คํ—˜ ๊ฒฐ๊ณผ์™€ ๋ฐ์ดํ„ฐ์— ๋”ฐ๋ฅธ mesh ๋‹ค๋“ฌ๊ธฐ ์œ ์˜์‚ฌํ•ญ์„ ์•Œ๊ณ  ์‹ถ๋‹ค๋ฉด, ๋‹ค์Œ์„ ํ™•์ธํ•ด์ฃผ์„ธ์š”!


6๏ธโƒฃ ํ”ผ๊ทœ์–ด ์ธ์‡„ํ•˜๊ณ  ํ›„๊ฐ€๊ณตํ•˜๊ธฐ

ํ”ผ๊ทœ์–ด ์ธ์‡„ํ•˜๊ธฐ

์Šฌ๋ผ์ด์„œ ์†Œํ”„ํŠธ์›จ์–ด ์ถœ๋ ฅ ์ค‘์ธ ๋ชจ์Šต

โž• 3D ํ”„๋ฆฐํ„ฐ ์˜ต์…˜ ์‹คํ—˜ ๊ฒฐ๊ณผ๋ฅผ ์•Œ๊ณ  ์‹ถ๋‹ค๋ฉด ๋‹ค์Œ์„ ํ™•์ธํ•ด์ฃผ์„ธ์š”!

์ธ์‡„๋œ ํ”ผ๊ทœ์–ด ํ›„๊ฐ€๊ณตํ•˜๊ธฐ

before after
๋ผํ”„ํŠธ ์ œ๊ฑฐ

ํ™˜๊ฒฝ

Google COLAB WandB Tensorflow (1.15.x)
Blender Sindoh 3DWOX1/DP203

ํŒ€

YongJae Cho
YongJae Cho

๐Ÿšง
dusruddl2
dusruddl2

๐Ÿ“– ๐Ÿ’ป
Sumyeong-Jang
Sumyeong-Jang

๐Ÿ“– ๐Ÿ’ป
Janghoo Lee
Janghoo Lee

๐Ÿ“– ๐Ÿ’ป
cmoweg
cmoweg

๐Ÿ“– ๐Ÿ’ป
Seung-Jun Chu
Seung-Jun Chu

๐Ÿ’ป ๐Ÿšง
yunimini
yunimini

๐Ÿ’ป
Heeheegwan
Heeheegwan

๐Ÿ’ป ๐Ÿšง
namsuhan-hub
namsuhan-hub

๐Ÿ’ป

logo-color.png

About

๐Ÿ“ ํ˜„๋™์ด์˜ ํ”Œ๋žญํฌ ์ž์„ธ๋ฅผ 3D ํ”ผ๊ทœ์–ด๋กœ ๋งŒ๋“ค์–ด ๋ฐ•์ œ์‹œํ‚ค๊ธฐ #NeRF

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published