Philippe Weinzaepfel commited on
Commit
f8f3a7d
1 Parent(s): a49c8fd

exif, more examples

Browse files
app.py CHANGED
@@ -2,9 +2,13 @@ import gradio as gr
2
  import sys, os
3
  import torch
4
  import matplotlib.pylab as plt
 
5
 
6
  def pump_matching(img1, img2, trained_with_st=False, scale=300, max_scale=1, max_rot=0, use_gpu=False):
7
 
 
 
 
8
  use_singlescale = max_scale==1 and max_rot==0
9
  if use_singlescale: # single
10
  from test_singlescale import Main, arg_parser
@@ -73,6 +77,8 @@ iface = gr.Interface(
73
  description=description,
74
  article=article,
75
  examples=[
 
 
76
  ['datasets/demo_warp/mountains_src.jpg','datasets/demo_warp/mountains_tgt.jpg',False],#,400,1,0]+([True] if has_cuda else []),
77
  ]
78
  )
 
2
  import sys, os
3
  import torch
4
  import matplotlib.pylab as plt
5
+ from PIL import ImageOps
6
 
7
  def pump_matching(img1, img2, trained_with_st=False, scale=300, max_scale=1, max_rot=0, use_gpu=False):
8
 
9
+ img1 = ImageOps.exif_transpose(img1)
10
+ img2 = ImageOps.exif_transpose(img2)
11
+
12
  use_singlescale = max_scale==1 and max_rot==0
13
  if use_singlescale: # single
14
  from test_singlescale import Main, arg_parser
 
77
  description=description,
78
  article=article,
79
  examples=[
80
+ ['datasets/gradio_demo/cat_src.jpg','datasets/gradio_demo/cat_tgt.jpg',False],#,400,1,0]+([True] if has_cuda else []),
81
+ ['datasets/gradio_demo/food_src.jpg','datasets/gradio_demo/food_tgt.jpg',False],#,400,1,0]+([True] if has_cuda else []),
82
  ['datasets/demo_warp/mountains_src.jpg','datasets/demo_warp/mountains_tgt.jpg',False],#,400,1,0]+([True] if has_cuda else []),
83
  ]
84
  )
datasets/gradio_demo/cat_src.jpg ADDED
datasets/gradio_demo/cat_tgt.jpg ADDED
datasets/gradio_demo/food_src.jpg ADDED
datasets/gradio_demo/food_tgt.jpg ADDED