fffiloni commited on
Commit
d6a7010
Β·
verified Β·
1 Parent(s): 5ff8b91
Files changed (1) hide show
  1. app.py +30 -31
app.py CHANGED
@@ -158,44 +158,43 @@ with gr.Blocks(css=css) as app:
158
  gr.Markdown("# 3D Anaglyph Image Generator")
159
  gr.Markdown("Upload left and right images to create 3D images using different methods.")
160
 
 
161
  with gr.Row():
162
- with gr.Column():
163
- with gr.Row():
164
- left_input = gr.Image(label="Left Image")
165
- right_input = gr.Image(label="Right Image")
166
 
167
- method = gr.Radio(
168
- ["anaglyph", "parallel", "crossed"],
169
- label="Method",
170
- value="anaglyph",
171
- info="Select the 3D image creation method"
172
- )
173
 
174
- color_method = gr.Radio(
175
- ["optimized", "true", "mono", "color", "halfcolor", "dubois", "dubois_optimized"],
176
- label="Color Method",
177
- value="dubois",
178
- info="Select the color processing method"
179
- )
180
 
181
- with gr.Accordion("Details about methods", open=False):
182
- gr.Markdown("""
183
- ### Methods:
184
- - **anaglyph**: Creates a red-cyan 3D image (requires 3D glasses)
185
- - **parallel**: Creates side-by-side images for parallel viewing
186
- - **crossed**: Creates side-by-side images for cross-eyed viewing
187
 
188
- ### Color Methods:
189
- - **optimized**: Best for most images (default)
190
- - **true**: True color anaglyph
191
- - **mono**: Monochrome output
192
- - **color**: Full color (may cause ghosting)
193
- - **halfcolor**: Balance between color and depth
194
- """)
195
 
196
- generate_btn = gr.Button("Generate 3D Image", variant="primary")
197
 
198
- output = gr.Image(label="Generated 3D Anaglyph Image")
199
 
200
  generate_btn.click(
201
  fn=process_images,
 
158
  gr.Markdown("# 3D Anaglyph Image Generator")
159
  gr.Markdown("Upload left and right images to create 3D images using different methods.")
160
 
161
+
162
  with gr.Row():
163
+ left_input = gr.Image(label="Left Image")
164
+ right_input = gr.Image(label="Right Image")
 
 
165
 
166
+ method = gr.Radio(
167
+ ["anaglyph", "parallel", "crossed"],
168
+ label="Method",
169
+ value="anaglyph",
170
+ info="Select the 3D image creation method"
171
+ )
172
 
173
+ color_method = gr.Radio(
174
+ ["optimized", "true", "mono", "color", "halfcolor", "dubois", "dubois_optimized"],
175
+ label="Color Method",
176
+ value="dubois",
177
+ info="Select the color processing method"
178
+ )
179
 
180
+ with gr.Accordion("Details about methods", open=False):
181
+ gr.Markdown("""
182
+ ### Methods:
183
+ - **anaglyph**: Creates a red-cyan 3D image (requires 3D glasses)
184
+ - **parallel**: Creates side-by-side images for parallel viewing
185
+ - **crossed**: Creates side-by-side images for cross-eyed viewing
186
 
187
+ ### Color Methods:
188
+ - **optimized**: Best for most images (default)
189
+ - **true**: True color anaglyph
190
+ - **mono**: Monochrome output
191
+ - **color**: Full color (may cause ghosting)
192
+ - **halfcolor**: Balance between color and depth
193
+ """)
194
 
195
+ generate_btn = gr.Button("Generate 3D Image", variant="primary")
196
 
197
+ output = gr.Image(label="Generated 3D Anaglyph Image")
198
 
199
  generate_btn.click(
200
  fn=process_images,