LiruiZhao commited on
Commit
13a253a
·
1 Parent(s): 887de2c

[Minor] Add relevant links

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -249,13 +249,11 @@ def generate(
249
  for image in image_video:
250
  video.append_data(image)
251
 
252
- # 对edited_mask做膨胀
253
  edited_mask_copy = edited_mask.copy()
254
  kernel = np.ones((3, 3), np.uint8)
255
  edited_mask = cv2.dilate(np.array(edited_mask), kernel, iterations=3)
256
  edited_mask = Image.fromarray(edited_mask)
257
 
258
-
259
  m_img = edited_mask.filter(ImageFilter.GaussianBlur(radius=3))
260
  m_img = np.asarray(m_img).astype('float') / 255.0
261
  img_np = np.asarray(input_image_copy).astype('float') / 255.0
@@ -307,6 +305,20 @@ with gr.Blocks(css="footer {visibility: hidden}") as demo:
307
  gr.Markdown(
308
  "<div align='center'><font size='14'>Diffree: Text-Guided Shape Free Object Inpainting with Diffusion Model</font></div>" # noqa
309
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
 
311
  with gr.Row():
312
  with gr.Column(scale=1, min_width=100):
 
249
  for image in image_video:
250
  video.append_data(image)
251
 
 
252
  edited_mask_copy = edited_mask.copy()
253
  kernel = np.ones((3, 3), np.uint8)
254
  edited_mask = cv2.dilate(np.array(edited_mask), kernel, iterations=3)
255
  edited_mask = Image.fromarray(edited_mask)
256
 
 
257
  m_img = edited_mask.filter(ImageFilter.GaussianBlur(radius=3))
258
  m_img = np.asarray(m_img).astype('float') / 255.0
259
  img_np = np.asarray(input_image_copy).astype('float') / 255.0
 
305
  gr.Markdown(
306
  "<div align='center'><font size='14'>Diffree: Text-Guided Shape Free Object Inpainting with Diffusion Model</font></div>" # noqa
307
  )
308
+ with gr.Row():
309
+ gr.Markdown(
310
+ """
311
+ <div align='center'>
312
+ <a href="https://opengvlab.github.io/Diffree/"><u>[🌐Project Page]</u></a>
313
+ &nbsp;&nbsp;&nbsp;
314
+ <a href="https://drive.google.com/file/d/1AdIPA5TK5LB1tnqqZuZ9GsJ6Zzqo2ua6/view"><u>[🎥 Video]</u></a>
315
+ &nbsp;&nbsp;&nbsp;
316
+ <a href="https://github.com/OpenGVLab/Diffree"><u>[🔍 Code]</u></a>
317
+ &nbsp;&nbsp;&nbsp;
318
+ <a href="https://arxiv.org/pdf/2407.16982"><u>[📜 Arxiv]</u></a>
319
+ </div>
320
+ """ # noqa
321
+ )
322
 
323
  with gr.Row():
324
  with gr.Column(scale=1, min_width=100):