jw2yang commited on
Commit
4675577
1 Parent(s): cc747c3

Update tasks/ref_in_gpt3.py

Browse files
Files changed (1) hide show
  1. tasks/ref_in_gpt3.py +1 -1
tasks/ref_in_gpt3.py CHANGED
@@ -92,7 +92,7 @@ def referring_inpainting_gpt3(model, image, instruction, *args, **kwargs):
92
  if inp_text not in ['no', '']:
93
  image_crop = image_ori
94
  struct2 = ndimage.generate_binary_structure(2, 2)
95
- mask_dilated = ndimage.binary_dilation(grd_mask[0], structure=struct2, iterations=5).astype(grd_mask[0].dtype)
96
  mask = Image.fromarray(mask_dilated * 255).convert('RGB')
97
  image_and_mask = {
98
  "image": image_crop,
 
92
  if inp_text not in ['no', '']:
93
  image_crop = image_ori
94
  struct2 = ndimage.generate_binary_structure(2, 2)
95
+ mask_dilated = ndimage.binary_dilation(grd_mask[0], structure=struct2, iterations=3).astype(grd_mask[0].dtype)
96
  mask = Image.fromarray(mask_dilated * 255).convert('RGB')
97
  image_and_mask = {
98
  "image": image_crop,