-
Notifications
You must be signed in to change notification settings - Fork 22
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
Python #7
Comments
Hi victorca25, your implementation looks cool! Some of my thoughts:
Not very sure whether you are familiar with a term called "affinity matrix". For example, let us say we have an image with shape [H,W,C] (height, width, channel). Because you have studied WLS so I assume that you know that pixels can share a "weight function" for example, if pixel (x1,y1) and (x2,y2) share a weight of w, we may write something like this |
Thank you very much for your detailed feedback! I'll study the knapsack solver and see what I can learn. I don't know for certain if my RTV code produces 1:1 the same results as the original, but it's at least close. I also used a sparse matrix in that case, similar to WLS and TV, but now I'll try with L0 that appears to be easier to understand than L1 and if that works I'll experiment with L1 as well. I have some knowledge about graph theory and affinity matrices, but your explanation helps a lot to visualize the problem. If it goes too bad with that alternative, I'll try with different options for the solver to see if any is at least useable. Once again, thanks for the comments! Let's see how it goes. Cheers! |
Hi all, I've also written a Python implementation here: My friends and I have been using it for a while in our games. The parameters are not exactly the same as in this repo, but at least it works well visually.
I think if we construct the matrix in the DIA sparse format, then convert it to CSR and use an iterative solver, it can finish in minutes. |
I've implemented a couple of different smoothing filters, including WLS, TV, and RTV in Python and I just added the EAP with human mask to RTV and I think it mostly works (I still have to fix an issue with the bottom border of the image):
I now want to continue with the automatic mask creation, but I'm wondering about the information in the readme:
Where exactly did you experience these problems? What should I expect? Any tips?
The text was updated successfully, but these errors were encountered: