Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask conversion; Derived project #78

Open
RexBarker opened this issue Nov 8, 2020 · 1 comment
Open

Mask conversion; Derived project #78

RexBarker opened this issue Nov 8, 2020 · 1 comment

Comments

@RexBarker
Copy link

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

Video Object Removal Project

@nbei
Copy link
Owner

nbei commented Nov 9, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants