Deep-Flow-Guided-Video-Inpainting
Deep-Flow-Guided-Video-Inpainting copied to clipboard
Mask conversion; Derived project
Mask issue
I had one technical issue... in OpenCV4, the masks read with "cv2.IMREAD_UNCHANGED" converts RGB encoded masks into np.bool types with insufficient channels. This causes many problems later. Without this argument, the masks are read as a expected (as np.uint8, as 3-channel RGB)
line 76-77 in dataset/FlowInitial.py :
# --> fails; converts to np.bool, shape ( x, y)
#tmp_mask = cv2.imread(mask_dir[i], cv2.IMREAD_UNCHANGED)
# --> correct with OpenCV4; reads as np.uint8, shape (x,y,3)
tmp_mask = cv2.imread(mask_dir[i])
Derived Project
Great project! I made a derivative project based on your models which automatically generates the masks using Detectron2. Additionally, I added a web app to allow easier setup:
https://github.com/RexBarker/VideoObjectRemoval
Hi @RexBarker , about the problem in mask processing, I think it is related to the saved type and how to deal with the masks. You may customize the pre-processing as you want.
BTW, thanks for your derived project!