Spaces:
Sleeping
Sleeping
abmohajeri
commited on
Commit
•
5c09285
1
Parent(s):
973830f
Fotros Started
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +3 -0
- app.py +74 -0
- examples/buddha/input/1.png +3 -0
- examples/buddha/input/2.png +3 -0
- examples/buddha/input/3.png +3 -0
- examples/buddha/input/4.png +3 -0
- examples/buddha/input/5.png +3 -0
- examples/buddha/input/6.png +3 -0
- examples/buddha/input/7.png +3 -0
- examples/buddha/input/8.png +3 -0
- examples/buddha/input/9.png +3 -0
- examples/buddha/output/mesh.glb +3 -0
- examples/fox/input/1.jpg +3 -0
- examples/fox/input/10.jpg +3 -0
- examples/fox/input/11.jpg +3 -0
- examples/fox/input/12.jpg +3 -0
- examples/fox/input/13.jpg +3 -0
- examples/fox/input/14.jpg +3 -0
- examples/fox/input/15.jpg +3 -0
- examples/fox/input/16.jpg +3 -0
- examples/fox/input/17.jpg +3 -0
- examples/fox/input/18.jpg +3 -0
- examples/fox/input/19.jpg +3 -0
- examples/fox/input/2.jpg +3 -0
- examples/fox/input/20.jpg +3 -0
- examples/fox/input/21.jpg +3 -0
- examples/fox/input/22.jpg +3 -0
- examples/fox/input/23.jpg +3 -0
- examples/fox/input/24.jpg +3 -0
- examples/fox/input/25.jpg +3 -0
- examples/fox/input/26.jpg +3 -0
- examples/fox/input/27.jpg +3 -0
- examples/fox/input/28.jpg +3 -0
- examples/fox/input/29.jpg +3 -0
- examples/fox/input/3.jpg +3 -0
- examples/fox/input/30.jpg +3 -0
- examples/fox/input/31.jpg +3 -0
- examples/fox/input/32.jpg +3 -0
- examples/fox/input/33.jpg +3 -0
- examples/fox/input/34.jpg +3 -0
- examples/fox/input/35.jpg +3 -0
- examples/fox/input/36.jpg +3 -0
- examples/fox/input/37.jpg +3 -0
- examples/fox/input/38.jpg +3 -0
- examples/fox/input/39.jpg +3 -0
- examples/fox/input/4.jpg +3 -0
- examples/fox/input/40.jpg +3 -0
- examples/fox/input/41.jpg +3 -0
- examples/fox/input/42.jpg +3 -0
- 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
|
examples/buddha/input/2.png
ADDED
Git LFS Details
|
examples/buddha/input/3.png
ADDED
Git LFS Details
|
examples/buddha/input/4.png
ADDED
Git LFS Details
|
examples/buddha/input/5.png
ADDED
Git LFS Details
|
examples/buddha/input/6.png
ADDED
Git LFS Details
|
examples/buddha/input/7.png
ADDED
Git LFS Details
|
examples/buddha/input/8.png
ADDED
Git LFS Details
|
examples/buddha/input/9.png
ADDED
Git LFS Details
|
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
|
examples/fox/input/10.jpg
ADDED
Git LFS Details
|
examples/fox/input/11.jpg
ADDED
Git LFS Details
|
examples/fox/input/12.jpg
ADDED
Git LFS Details
|
examples/fox/input/13.jpg
ADDED
Git LFS Details
|
examples/fox/input/14.jpg
ADDED
Git LFS Details
|
examples/fox/input/15.jpg
ADDED
Git LFS Details
|
examples/fox/input/16.jpg
ADDED
Git LFS Details
|
examples/fox/input/17.jpg
ADDED
Git LFS Details
|
examples/fox/input/18.jpg
ADDED
Git LFS Details
|
examples/fox/input/19.jpg
ADDED
Git LFS Details
|
examples/fox/input/2.jpg
ADDED
Git LFS Details
|
examples/fox/input/20.jpg
ADDED
Git LFS Details
|
examples/fox/input/21.jpg
ADDED
Git LFS Details
|
examples/fox/input/22.jpg
ADDED
Git LFS Details
|
examples/fox/input/23.jpg
ADDED
Git LFS Details
|
examples/fox/input/24.jpg
ADDED
Git LFS Details
|
examples/fox/input/25.jpg
ADDED
Git LFS Details
|
examples/fox/input/26.jpg
ADDED
Git LFS Details
|
examples/fox/input/27.jpg
ADDED
Git LFS Details
|
examples/fox/input/28.jpg
ADDED
Git LFS Details
|
examples/fox/input/29.jpg
ADDED
Git LFS Details
|
examples/fox/input/3.jpg
ADDED
Git LFS Details
|
examples/fox/input/30.jpg
ADDED
Git LFS Details
|
examples/fox/input/31.jpg
ADDED
Git LFS Details
|
examples/fox/input/32.jpg
ADDED
Git LFS Details
|
examples/fox/input/33.jpg
ADDED
Git LFS Details
|
examples/fox/input/34.jpg
ADDED
Git LFS Details
|
examples/fox/input/35.jpg
ADDED
Git LFS Details
|
examples/fox/input/36.jpg
ADDED
Git LFS Details
|
examples/fox/input/37.jpg
ADDED
Git LFS Details
|
examples/fox/input/38.jpg
ADDED
Git LFS Details
|
examples/fox/input/39.jpg
ADDED
Git LFS Details
|
examples/fox/input/4.jpg
ADDED
Git LFS Details
|
examples/fox/input/40.jpg
ADDED
Git LFS Details
|
examples/fox/input/41.jpg
ADDED
Git LFS Details
|
examples/fox/input/42.jpg
ADDED
Git LFS Details
|
examples/fox/input/43.jpg
ADDED
Git LFS Details
|