graph cuts mrfs and graphcut textures
play

Graph Cuts, MRFs and Graphcut Textures CS448V Computational Video - PowerPoint PPT Presentation

Graph Cuts, MRFs and Graphcut Textures CS448V Computational Video Manipulation April 2019 What makes this a texture? What makes this a texture? stationary What makes this a texture? Local What makes this a


  1. Graph Cuts, MRFs and Graphcut Textures CS448V — Computational Video Manipulation April 2019

  2. What makes this a “texture”?

  3. What makes this a “texture”?

  4. stationary What makes this a “texture”?

  5. Local What makes this a “texture”?

  6. Stochastic Regular

  7. Stochastic Regular Texture?

  8. Textures are everywhere!

  9. [Kwatra et al. 2003]

  10. [Wexler et al. 2004]

  11. [Wexler et al. 2004]

  12. [Wexler et al. 2004]

  13. [Wexler et al. 2004]

  14. Graphcut Textures: Image and Video Synthesis Using Graph Cuts Kwatra et al. 2003

  15. Graphcut Textures: Image and Video Synthesis Using Graph Cuts Kwatra et al. 2003

  16. Graph Cuts s t

  17. Graph Cuts s t Partition ( S , T ) ∣ s ∈ S , t ∈ T

  18. Graph Cuts 11 2 s t 4 5 Capacity(S, T) = sum of edge weights (leaving) S Partition ( S , T ) ∣ s ∈ S , t ∈ T

  19. Max-flow Min-cut theorem 3 11 1 4 2 3 12 s t 3 7 4 1 20 5

  20. Max-flow Min-cut theorem 3 11 1 4 2 3 12 s t 3 7 4 1 20 5 What is a flow?…

  21. Max-flow Min-cut theorem 3 11 1 4 2 3 12 s t 3 7 4 1 20 5 Capacity of min-cut: 6

  22. Max-flow Min-cut theorem 3 11 1 4 4 4 2 3 12 2 3 6 s t 3 7 3 4 3 1 20 5 Max-flow from s to t : 6 Capacity of min-cut: 6

  23. Cuts & Flows

  24. Cuts & Flows Many variants: - directed/undirected - with/without terminals - multi-cut - non integer weights - negative weights - …

  25. Cuts & Flows Many variants: - directed/undirected - with/without terminals Many many applications! - multi-cut - non integer weights - negative weights - …

  26. Max Bipartite Match 1 A 2 B 3 C 4 D

  27. Max Bipartite Match 1 A 2 B s t 3 C 4 D

  28. Max Bipartite Match 1 A 2 B s t 3 C 4 D

  29. Max Bipartite Match 1 A 2 B s t 3 C 4 D we will use a similar trick…

  30. Back to Graphcut Textures…

  31. “Chernobyl harvest”

  32. Where to place Which pixels to next patch? use?

  33. Which pixels to use?

  34. Which pixels to use? Graph cuts to the rescue

  35. Which pixels to use? Graph cuts to the rescue

  36. Which pixels to use? Graph cuts to the rescue M ( s , t ) s t

  37. Which pixels to use? Graph cuts to the rescue M ( s , t ) s t M ( s , t ) = ∥ A ( s ) − B ( s ) ∥ + ∥ A ( t ) − B ( t ) ∥

  38. Which pixels to use?

  39. Which pixels to use? New Patch B 1 S 1 4

  40. Which pixels to use? New Patch B Old seam cost 1 S 1 4

  41. Which pixels to use? New Patch B Old seam cost 1 S 1 4 1 from old 4 from new

  42. Which pixels to use? New Patch B Old seam cost 1 S 1 4 1 from old 4 from old 4 from new 1 from new

  43. Which pixels to use? New Patch B Old seam cost 1 S 1 4 1 from old 4 from old 4 from new 1 from new Cut at most one edge!

  44. Which pixels to use? New Patch B Old seam cost 1 S 1 4 1 from old 4 from old 4 from new 1 from new Cut at most one edge! M should be a metric

  45. Which pixels to use?

  46. Which pixels to use? Kept old seam

  47. Which pixels to use? Updated seam

  48. Which pixels to use? Removed seam

  49. Which pixels to use?

  50. Which pixels to use?

  51. Which pixels to use? What might happen if we only connect a few pixels to B?

  52. Minor detour: MRFs

  53. Markov Random Field

  54. Markov Random Field Reminder: Markov property

  55. Markov Random Field Reminder: Markov property “memoryless”

  56. Markov Random Field Reminder: Markov property “memoryless” For a discrete process: P ( X n = x n | X n − 1 = x n − 1 , …, X 0 = x 0 ) = P ( X n = x n | X n − 1 = x n − 1 )

  57. Markov Random Field Reminder: Markov property “memoryless” For a discrete process: P ( X n = x n | X n − 1 = x n − 1 , …, X 0 = x 0 ) = P ( X n = x n | X n − 1 = x n − 1 ) What about fields?

  58. Markov Random Field Reminder: Markov property “memoryless” For a discrete process: P ( X n = x n | X n − 1 = x n − 1 , …, X 0 = x 0 ) = P ( X n = x n | X n − 1 = x n − 1 ) What about fields? two non-adjacent variables are conditionally independent given all other variables

  59. Markov Random Field Reminder: Markov property “memoryless” For a discrete process: P ( X n = x n | X n − 1 = x n − 1 , …, X 0 = x 0 ) = P ( X n = x n | X n − 1 = x n − 1 ) What about fields? A variable is conditionally independent of all other variables given its neighbors

  60. Markov Random Field Reminder: Markov property “memoryless” For a discrete process: P ( X n = x n | X n − 1 = x n − 1 , …, X 0 = x 0 ) = P ( X n = x n | X n − 1 = x n − 1 ) What about fields? two subsets are conditionally independent given a separating subset

  61. Markov Random Field What does it mean in our setting?

  62. Where to place Which pixels to next patch? use?

  63. Placing the next patch

  64. Placing the next patch • Random placement

  65. Placing the next patch • Random placement • Entire patch matching

  66. Placing the next patch • Random placement • Entire patch matching • Sub-patch matching

  67. Placing the next patch • Random placement • Entire patch matching • Sub-patch matching What would be the “right” thing to do, assuming no runtime constraints?

  68. Results

  69. Video synthesis

  70. Temporally stationary Spatio-temporally stationary

  71. Temporally stationary Spatio-temporally stationary How should this affect patch search strategy?

  72. Temporally stationary Video Textures + Per-pixel transition timing Seam optimization

  73. Temporally stationary Spatio-temporally stationary

  74. Can search patches in time and space! Spatio-temporally stationary

  75. Can search patches in time and space! Spatio-temporally stationary Robust results even for short sequences

  76. Can search patches in time and space! Spatio-temporally stationary Robust results even for short sequences Can make videos larger

  77. Harder to create loops. Why?

  78. Harder to create loops. Why? time

  79. Harder to create loops. Why? time Solution: explicitly force beginning and end to match

  80. Harder to create loops. Why? time Solution: explicitly force beginning and end to match time

  81. Recap

  82. Recap • Textures are everywhere!

  83. Recap • Textures are everywhere! • Add to your tool belt: Graph Cuts

  84. Recap • Textures are everywhere! • Add to your tool belt: Graph Cuts • Graphcut Textures

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend