abmohajeri commited on
Commit
5c09285
1 Parent(s): 973830f

Fotros Started

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +3 -0
  2. app.py +74 -0
  3. examples/buddha/input/1.png +3 -0
  4. examples/buddha/input/2.png +3 -0
  5. examples/buddha/input/3.png +3 -0
  6. examples/buddha/input/4.png +3 -0
  7. examples/buddha/input/5.png +3 -0
  8. examples/buddha/input/6.png +3 -0
  9. examples/buddha/input/7.png +3 -0
  10. examples/buddha/input/8.png +3 -0
  11. examples/buddha/input/9.png +3 -0
  12. examples/buddha/output/mesh.glb +3 -0
  13. examples/fox/input/1.jpg +3 -0
  14. examples/fox/input/10.jpg +3 -0
  15. examples/fox/input/11.jpg +3 -0
  16. examples/fox/input/12.jpg +3 -0
  17. examples/fox/input/13.jpg +3 -0
  18. examples/fox/input/14.jpg +3 -0
  19. examples/fox/input/15.jpg +3 -0
  20. examples/fox/input/16.jpg +3 -0
  21. examples/fox/input/17.jpg +3 -0
  22. examples/fox/input/18.jpg +3 -0
  23. examples/fox/input/19.jpg +3 -0
  24. examples/fox/input/2.jpg +3 -0
  25. examples/fox/input/20.jpg +3 -0
  26. examples/fox/input/21.jpg +3 -0
  27. examples/fox/input/22.jpg +3 -0
  28. examples/fox/input/23.jpg +3 -0
  29. examples/fox/input/24.jpg +3 -0
  30. examples/fox/input/25.jpg +3 -0
  31. examples/fox/input/26.jpg +3 -0
  32. examples/fox/input/27.jpg +3 -0
  33. examples/fox/input/28.jpg +3 -0
  34. examples/fox/input/29.jpg +3 -0
  35. examples/fox/input/3.jpg +3 -0
  36. examples/fox/input/30.jpg +3 -0
  37. examples/fox/input/31.jpg +3 -0
  38. examples/fox/input/32.jpg +3 -0
  39. examples/fox/input/33.jpg +3 -0
  40. examples/fox/input/34.jpg +3 -0
  41. examples/fox/input/35.jpg +3 -0
  42. examples/fox/input/36.jpg +3 -0
  43. examples/fox/input/37.jpg +3 -0
  44. examples/fox/input/38.jpg +3 -0
  45. examples/fox/input/39.jpg +3 -0
  46. examples/fox/input/4.jpg +3 -0
  47. examples/fox/input/40.jpg +3 -0
  48. examples/fox/input/41.jpg +3 -0
  49. examples/fox/input/42.jpg +3 -0
  50. examples/fox/input/43.jpg +3 -0
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.png filter=lfs diff=lfs merge=lfs -text
37
+ *.jpg filter=lfs diff=lfs merge=lfs -text
38
+ *.glb filter=lfs diff=lfs merge=lfs -text
app.py ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+ import glob
4
+
5
+ base_dir = os.path.dirname(__file__)
6
+ examples_dir = os.path.join(base_dir, 'examples')
7
+
8
+
9
+ with gr.Blocks() as iface:
10
+ gr.HTML("""
11
+ <div style="text-align: center; font-size: 16px;">
12
+ <img src="file/static/dark_logo.jpg" alt="Fotros Logo" style="width: 200px; margin: 0 auto;">
13
+ <h2>An application that generates 3D meshes from multiple 2D images.</h2>
14
+ Created by <a href="https://abolfazlmohajeri.ir" target="_blank"><strong>Abolfazl Mohajeri</strong></a>
15
+ </div>
16
+ """)
17
+
18
+ with gr.Row():
19
+ with gr.Column():
20
+ output_mesh = gr.Model3D(label="3D Mesh", inputs=None, interactive=False)
21
+
22
+ gr.HTML("""
23
+ <div style="text-align: center; font-size: 22px;">
24
+ <strong>Examples</strong>
25
+ </div>
26
+ <div style="text-align: center; font-size: 20px;margin-top: 5px;">
27
+ Click the render button below each example to see the output in the box above
28
+ </div>
29
+ """)
30
+
31
+ with gr.Row():
32
+ with gr.Column():
33
+ gr.HTML("""
34
+ <div style="text-align: center;">
35
+ <h3>Example 1</h3>
36
+ </div>
37
+ """)
38
+ gr.Gallery(label="Input Images",
39
+ columns=3,
40
+ object_fit="contain",
41
+ value=glob.glob(os.path.join(examples_dir, 'fox', 'input', '*')))
42
+ gr.Button("Render").click(lambda: os.path.join(examples_dir, 'fox', 'output', "mesh.glb"), inputs=None, outputs=output_mesh)
43
+ with gr.Column():
44
+ gr.HTML("""
45
+ <div style="text-align: center;">
46
+ <h3>Example 2</h3>
47
+ </div>
48
+ """)
49
+ gr.Gallery(label="Input Images",
50
+ columns=3,
51
+ object_fit="contain",
52
+ value=glob.glob(os.path.join(examples_dir, 'buddha', 'input', '*')))
53
+ gr.Button("Render").click(lambda : os.path.join(examples_dir, 'buddha', 'output', "mesh.glb"), inputs=None, outputs=output_mesh)
54
+ with gr.Column():
55
+ gr.HTML("""
56
+ <div style="text-align: center;">
57
+ <h3>Example 3</h3>
58
+ </div>
59
+ """)
60
+ gr.Gallery(label="Input Images",
61
+ columns=3,
62
+ object_fit="contain",
63
+ value=glob.glob(os.path.join(examples_dir, 'stone', 'input', '*')))
64
+ gr.Button("Render").click(lambda: os.path.join(examples_dir, 'stone', 'output', "mesh.glb"), inputs=None,outputs=output_mesh)
65
+
66
+ gr.HTML("""
67
+ <div style="text-align: center; font-size: 16px;">
68
+ <h1>FOTROS</h1>
69
+ Created by <a href="https://abolfazlmohajeri.ir" target="_blank"><strong>Abolfazl Mohajeri</strong></a>
70
+ </div>
71
+ """)
72
+
73
+
74
+ iface.launch(allowed_paths=["static"])
examples/buddha/input/1.png ADDED

Git LFS Details

  • SHA256: c06810bdc22eea7d4b0fc001ed22689838750829f6d7c9710c809368410813d1
  • Pointer size: 132 Bytes
  • Size of remote file: 4.21 MB
examples/buddha/input/2.png ADDED

Git LFS Details

  • SHA256: 57243e20d0879a0069693f6e281bd749cb4e5e4c4eed71588cad97adc01aed26
  • Pointer size: 132 Bytes
  • Size of remote file: 4.53 MB
examples/buddha/input/3.png ADDED

Git LFS Details

  • SHA256: cebb9bc254bc8c93510603d99169309e3b855b6258b08d0b28cc663ba930f283
  • Pointer size: 132 Bytes
  • Size of remote file: 4.47 MB
examples/buddha/input/4.png ADDED

Git LFS Details

  • SHA256: 25c5206134e31a40c268d8d14982c1a9b7266231d8142e4f96cfeba284f5c0cb
  • Pointer size: 132 Bytes
  • Size of remote file: 4.51 MB
examples/buddha/input/5.png ADDED

Git LFS Details

  • SHA256: ff4d8bf39a1850c88d6fad502d0b25b95f743caf3fcc8ae4d345f48ce1839405
  • Pointer size: 132 Bytes
  • Size of remote file: 4.9 MB
examples/buddha/input/6.png ADDED

Git LFS Details

  • SHA256: fcd6475ede18d642c678f08ea25f90f4d9fc2d11e2d939b4cc847333865bc925
  • Pointer size: 132 Bytes
  • Size of remote file: 4.66 MB
examples/buddha/input/7.png ADDED

Git LFS Details

  • SHA256: 6cbca244883f252083ce2678de3b8fc318eb3b8043d0cb8b9582b0a89ababb9a
  • Pointer size: 132 Bytes
  • Size of remote file: 4.25 MB
examples/buddha/input/8.png ADDED

Git LFS Details

  • SHA256: a3373e45007879d57f4d78cfdf50e459a75a17649157d33eca1565bbd224fba0
  • Pointer size: 132 Bytes
  • Size of remote file: 4.29 MB
examples/buddha/input/9.png ADDED

Git LFS Details

  • SHA256: d08dc9f6278d0e3ec7c204bfd050c9994b8022d9c8a30793c1d654c3365a0aab
  • Pointer size: 132 Bytes
  • Size of remote file: 4.58 MB
examples/buddha/output/mesh.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76b3da40221d9a853dbd4de8a0a8c26c3cedccb183ebd567beb43a7a7e12b9ad
3
+ size 194448116
examples/fox/input/1.jpg ADDED

Git LFS Details

  • SHA256: aef0a5c306c640f0955c0f27642dee876723ecab676b424b7c67c368ec21b16f
  • Pointer size: 131 Bytes
  • Size of remote file: 387 kB
examples/fox/input/10.jpg ADDED

Git LFS Details

  • SHA256: 79e2b89aeeeedf23d207f9fa82c85ebfcf277df2cdcbd16c65d77623bd253013
  • Pointer size: 131 Bytes
  • Size of remote file: 362 kB
examples/fox/input/11.jpg ADDED

Git LFS Details

  • SHA256: d2ce02c35d25c49a4034b31c248e159a8f75adbde144d6822b4bddf7860a547c
  • Pointer size: 131 Bytes
  • Size of remote file: 376 kB
examples/fox/input/12.jpg ADDED

Git LFS Details

  • SHA256: 66d74abbcf2e620c5811b92489bce143e0d746b1d8e4f03430fb468a855e3b73
  • Pointer size: 131 Bytes
  • Size of remote file: 374 kB
examples/fox/input/13.jpg ADDED

Git LFS Details

  • SHA256: d2cfbfe371583c0b1237dae330a79f57870452fd0e7585f721935cd33a550938
  • Pointer size: 131 Bytes
  • Size of remote file: 345 kB
examples/fox/input/14.jpg ADDED

Git LFS Details

  • SHA256: 96b395f6f38e857d69c51b6fd08fbf6846f08af7ce02fda6cf5755247088e6ac
  • Pointer size: 131 Bytes
  • Size of remote file: 357 kB
examples/fox/input/15.jpg ADDED

Git LFS Details

  • SHA256: f7b3edf15014dee1deb6e8edc52423a4beb5abd73c425e8ea94ee8b3c28f397e
  • Pointer size: 131 Bytes
  • Size of remote file: 368 kB
examples/fox/input/16.jpg ADDED

Git LFS Details

  • SHA256: a3e2de082452bc02dbeb3b930bb4591ff1f8eacbc7c2a06877b791880ae7f525
  • Pointer size: 131 Bytes
  • Size of remote file: 353 kB
examples/fox/input/17.jpg ADDED

Git LFS Details

  • SHA256: 6e3e2683b4c0ee86067b17b9aef2a818149205b33927da133ad7bed3f61979f4
  • Pointer size: 131 Bytes
  • Size of remote file: 365 kB
examples/fox/input/18.jpg ADDED

Git LFS Details

  • SHA256: 50132bea478dd112276e6308e7cf2a70bfa23617f191a0acdd5d0ecf510c48d6
  • Pointer size: 131 Bytes
  • Size of remote file: 377 kB
examples/fox/input/19.jpg ADDED

Git LFS Details

  • SHA256: 3126fa028931cf38cab78b692bde131e22b4189d8f6f010bb86bb8723de6324d
  • Pointer size: 131 Bytes
  • Size of remote file: 395 kB
examples/fox/input/2.jpg ADDED

Git LFS Details

  • SHA256: e8c34293e0022e40e920692bb095e5c165c8fa05418a5301abc2ef631c0c62ea
  • Pointer size: 131 Bytes
  • Size of remote file: 400 kB
examples/fox/input/20.jpg ADDED

Git LFS Details

  • SHA256: 672a7c1dd0399174b173f2484208de6578fdc7fe9cd85ff6f2a21318e19f72ec
  • Pointer size: 131 Bytes
  • Size of remote file: 381 kB
examples/fox/input/21.jpg ADDED

Git LFS Details

  • SHA256: e631b9c8df1d1c3bdcc8afbec2afb40564fb398db3f4c145bef4b4f72571fc83
  • Pointer size: 131 Bytes
  • Size of remote file: 416 kB
examples/fox/input/22.jpg ADDED

Git LFS Details

  • SHA256: e526e6f28e2a7d2657c3d5e59ea21c00923084935bae4a3ade5ccdb1459b74e7
  • Pointer size: 131 Bytes
  • Size of remote file: 342 kB
examples/fox/input/23.jpg ADDED

Git LFS Details

  • SHA256: 8117f5c5cc4a79b9e332f60e18805b023d9bb8a526a151fc4ec88b7e012e7579
  • Pointer size: 131 Bytes
  • Size of remote file: 349 kB
examples/fox/input/24.jpg ADDED

Git LFS Details

  • SHA256: c3b74eac0ba41e3fc8798cc558815f42d5827153db14457d4c4cf7e447ae823f
  • Pointer size: 131 Bytes
  • Size of remote file: 404 kB
examples/fox/input/25.jpg ADDED

Git LFS Details

  • SHA256: bc02122cef2624089c65304d49b80a02e3056285d67f34ea2c40dde6003ea880
  • Pointer size: 131 Bytes
  • Size of remote file: 404 kB
examples/fox/input/26.jpg ADDED

Git LFS Details

  • SHA256: 02f3403946aa74b0a69d8e80068c2c2acfc8400d53a3d472f0c8bb9e180dbd5b
  • Pointer size: 131 Bytes
  • Size of remote file: 350 kB
examples/fox/input/27.jpg ADDED

Git LFS Details

  • SHA256: 62a0c5eb024bd76af09b6a787f34333ab44ddeede8d4998dbff5d1241a2101b0
  • Pointer size: 131 Bytes
  • Size of remote file: 381 kB
examples/fox/input/28.jpg ADDED

Git LFS Details

  • SHA256: 138b2d01953c2eb9843f97abb612f6d12945dcd74f71bdd73ee8715f762b7cc8
  • Pointer size: 131 Bytes
  • Size of remote file: 343 kB
examples/fox/input/29.jpg ADDED

Git LFS Details

  • SHA256: 175d38ce8fab0d94cadc1b630c0e0173d61bb427b3070e8830fb3c7def112ba3
  • Pointer size: 131 Bytes
  • Size of remote file: 394 kB
examples/fox/input/3.jpg ADDED

Git LFS Details

  • SHA256: 053c7fb24ca18b2e76329c8f98ee671ea99068a9004acdc09c4e6b75d4084e13
  • Pointer size: 131 Bytes
  • Size of remote file: 390 kB
examples/fox/input/30.jpg ADDED

Git LFS Details

  • SHA256: c1f7a39a9838759a218965d40f00f71cdd082f71ae90f07470102293f175b20e
  • Pointer size: 131 Bytes
  • Size of remote file: 323 kB
examples/fox/input/31.jpg ADDED

Git LFS Details

  • SHA256: c4d5af7198188dbaff6d1aac6d1769fc1ccb9a2a49222d30e1ce65b2f2ef4c17
  • Pointer size: 131 Bytes
  • Size of remote file: 350 kB
examples/fox/input/32.jpg ADDED

Git LFS Details

  • SHA256: a7f9bb82b3f681080489305772fbd59219ebf6ed393a5c771ac88bd6291b1ab4
  • Pointer size: 131 Bytes
  • Size of remote file: 344 kB
examples/fox/input/33.jpg ADDED

Git LFS Details

  • SHA256: 3e6e1ce2abd35ce0181ac98924c3849dc7c141ff2129ac50a56b10c3f035a548
  • Pointer size: 131 Bytes
  • Size of remote file: 350 kB
examples/fox/input/34.jpg ADDED

Git LFS Details

  • SHA256: f460fa95494be3beb15d90ff4cb0a5de843f28120d55c6d7cd69a586fe2d6625
  • Pointer size: 131 Bytes
  • Size of remote file: 341 kB
examples/fox/input/35.jpg ADDED

Git LFS Details

  • SHA256: 7a730a5fb453ce41dbb7567fb742dc6d0d476ac1c996b59d84fff1727d5c3e02
  • Pointer size: 131 Bytes
  • Size of remote file: 335 kB
examples/fox/input/36.jpg ADDED

Git LFS Details

  • SHA256: bd3b3c855e24f688fca6aca2656859219b7ac63723c9aa77f24ff9d8a9c968d4
  • Pointer size: 131 Bytes
  • Size of remote file: 334 kB
examples/fox/input/37.jpg ADDED

Git LFS Details

  • SHA256: d8416396fde3fc5f1b56140b34a88d69638029b95bffef35c3facb3dbe279e89
  • Pointer size: 131 Bytes
  • Size of remote file: 337 kB
examples/fox/input/38.jpg ADDED

Git LFS Details

  • SHA256: d9677b6b3e7aff05287633aee2106543c6ff26cd4252a30c0c808a61945568ab
  • Pointer size: 131 Bytes
  • Size of remote file: 354 kB
examples/fox/input/39.jpg ADDED

Git LFS Details

  • SHA256: 72adaaa6cfa520233863a712f14707682993a6de05294cc09ddeed3b572940ac
  • Pointer size: 131 Bytes
  • Size of remote file: 349 kB
examples/fox/input/4.jpg ADDED

Git LFS Details

  • SHA256: 750be24995a73cf690ab2f8204b5601050176528b65e209bff4d8ab78fa7e891
  • Pointer size: 131 Bytes
  • Size of remote file: 374 kB
examples/fox/input/40.jpg ADDED

Git LFS Details

  • SHA256: 1637df9555ab8cc38bcfe81fd73938a7ffc876bc3a0cb1ebdc2b63872b1be736
  • Pointer size: 131 Bytes
  • Size of remote file: 345 kB
examples/fox/input/41.jpg ADDED

Git LFS Details

  • SHA256: 302bf82cc3967480e03965153e9c2238ef2467cc63e940182b497b8e89e37e8e
  • Pointer size: 131 Bytes
  • Size of remote file: 372 kB
examples/fox/input/42.jpg ADDED

Git LFS Details

  • SHA256: 6d625ef46d96a30b98f3f8f6972b0d2c649573f381e454c208cb8c07a8d8655d
  • Pointer size: 131 Bytes
  • Size of remote file: 328 kB
examples/fox/input/43.jpg ADDED

Git LFS Details

  • SHA256: bc598dbd8e3c37ec779224f594c1db90759c724215c866b6db7a3aa6386e09a5
  • Pointer size: 131 Bytes
  • Size of remote file: 376 kB