diff --git a/README.md b/README.md
index 3994721..b1a4cdc 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@
-
+
@@ -48,7 +48,7 @@
## Update
-- **2023.09.24**: We remove the watermark removal demo officially to prevent the misuse of our work for unethical purposes.
+- **2023.09.24**: We remove the watermark removal demos officially to prevent the misuse of our work for unethical purposes.
- **2023.09.21**: Add features for memory-efficient inference. Check our [GPU memory](https://github.com/sczhou/ProPainter#-memory-efficient-inference) requirements. 🚀
- **2023.09.07**: Our code and model are publicly available. 🐳
- **2023.09.01**: This repo is created.
@@ -83,6 +83,14 @@
+
+
+
+ |
+
+
+ |
+
@@ -136,7 +144,7 @@ Run the following commands to try it out:
# The first example (object removal)
python inference_propainter.py --video inputs/object_removal/bmx-trees --mask inputs/object_removal/bmx-trees_mask
# The second example (video completion)
-python inference_propainter.py --video inputs/video_completion/running_car.mp4 --mask inputs/video_completion/mask.png
+python inference_propainter.py --video inputs/video_completion/running_car.mp4 --mask inputs/video_completion/mask_square.png --height 240 --width 432
```
The results will be saved in the `results` folder.
@@ -145,7 +153,7 @@ To test your own videos, please prepare the input `mp4 video` (or `split frames`
If you want to specify the video resolution for processing or avoid running out of memory, you can set the video size of `--width` and `--height`:
```shell
# process a 576x320 video; set --fp16 to use fp16 (half precision) during inference.
-python inference_propainter.py --video inputs/video_completion/running_car.mp4 --mask inputs/video_completion/mask.png --height 320 --width 576 --fp16
+python inference_propainter.py --video inputs/video_completion/running_car.mp4 --mask inputs/video_completion/mask_square.png --height 320 --width 576 --fp16
```
### 🚀 Memory-efficient inference
diff --git a/assets/video_completion1.gif b/assets/video_completion1.gif
index 4a46cca..53bae85 100644
Binary files a/assets/video_completion1.gif and b/assets/video_completion1.gif differ
diff --git a/assets/video_completion2.gif b/assets/video_completion2.gif
index 86469fb..796ff3c 100644
Binary files a/assets/video_completion2.gif and b/assets/video_completion2.gif differ
diff --git a/assets/watermark_removal1.gif b/assets/watermark_removal1.gif
deleted file mode 100644
index b77cfb4..0000000
Binary files a/assets/watermark_removal1.gif and /dev/null differ
diff --git a/assets/watermark_removal2.gif b/assets/watermark_removal2.gif
deleted file mode 100644
index 3724482..0000000
Binary files a/assets/watermark_removal2.gif and /dev/null differ
diff --git a/inference_propainter.py b/inference_propainter.py
index 698333d..80d476d 100644
--- a/inference_propainter.py
+++ b/inference_propainter.py
@@ -165,7 +165,7 @@ def get_ref_index(mid_neighbor_id, neighbor_ids, length, ref_stride=10, ref_num=
else:
start_idx = max(0, mid_neighbor_id - ref_stride * (ref_num // 2))
end_idx = min(length, mid_neighbor_id + ref_stride * (ref_num // 2))
- for i in range(start_idx, end_idx + 1, ref_stride):
+ for i in range(start_idx, end_idx, ref_stride):
if i not in neighbor_ids:
if len(ref_index) > ref_num:
break
@@ -254,6 +254,7 @@ if __name__ == '__main__':
green = np.zeros([h, w, 3])
green[:,:,1] = 255
alpha = 0.6
+ # alpha = 1.0
fuse_img = (1-alpha)*img + alpha*green
fuse_img = mask_ * fuse_img + (1-mask_)*img
masked_frame_for_save.append(fuse_img.astype(np.uint8))
diff --git a/inputs/video_completion/mask_logo.png b/inputs/video_completion/mask_logo.png
new file mode 100644
index 0000000..61c1dff
Binary files /dev/null and b/inputs/video_completion/mask_logo.png differ
diff --git a/inputs/video_completion/mask_square.png b/inputs/video_completion/mask_square.png
new file mode 100644
index 0000000..2fd9873
Binary files /dev/null and b/inputs/video_completion/mask_square.png differ
diff --git a/inputs/video_completion/running_car.mp4 b/inputs/video_completion/running_car.mp4
new file mode 100644
index 0000000..990218a
Binary files /dev/null and b/inputs/video_completion/running_car.mp4 differ
diff --git a/inputs/watermark_removal/mask.png b/inputs/watermark_removal/mask.png
deleted file mode 100644
index 1fbb955..0000000
Binary files a/inputs/watermark_removal/mask.png and /dev/null differ
diff --git a/inputs/watermark_removal/running_car.mp4 b/inputs/watermark_removal/running_car.mp4
deleted file mode 100644
index 31a650f..0000000
Binary files a/inputs/watermark_removal/running_car.mp4 and /dev/null differ