pymatting / foreground-estimation-evaluation

Evaluate the quality of foreground estimation methods
MIT License
2 stars 0 forks source link

Provide high resolution alpha and foreground results from other methods for comparison #1

Closed MarcoForte closed 3 years ago

MarcoForte commented 3 years ago

Hello, thank you for providing this library. I have been using it to develop a novel foreground estimation technique. I'd like to compare on the high resolution images not just with ground-truth alpha but also with alpha from other methods as input.

They are very slow and computationally expensive to compute however. I am using the pymatting implementations. Would you be able to provide a download link to these if you still have them?

99991 commented 3 years ago

I have been using it to develop a novel foreground estimation technique.

Are you referring to FBA Matting or something else? Either way, I am looking forward to the results!

I am using the pymatting implementations.

For the comparisons in our paper, we used the author's alpha matting implementations.

I agree that it would be convenient if those alpha mattes were provided here. It might take a few days though, since the MATLAB code is not very fast and I only have a MATLAB license for my office computer, but due to COVID- 19 I am not always in office.

MarcoForte commented 3 years ago

Not FBA Matting actually. I took a closer look at your multi-level method and made some simplifications to the cost function and the way to solve it. And it worked surprisingly well in some cases. So I'm just writing a short paper on that.
I will upload those alpha mattes here if I get the chance.

99991 commented 3 years ago

I've added the alpha mattes computed with IndexNet Matting, Closed-Form Matting, Information-flow matting and KNN Matting. The ground truth alpha mattes will be copied to foreground-estimation-evaluation/data/alpha/gt automatically when calling the download script.

The foreground estimation errors for the ground truth alpha and IndexNet Matting alpha match exactly, but Information-flow matting and especially KNN Matting prove hard to reproduce. KNN Matting depends on https://github.com/vlfeat/vlfeat which seems to be unmaintained as far as I can tell and requires many hacks to compile. I've tried various configurations (Matlab/octave, vlfeat version 0.9.16/0.9.20/0.9.21) and the results are always different. I also tried to replace the approximate nearest neighbor search in vlfeat with an exact nearest neighbor search, but apparently, the approximate is strictly necessary since the ichol preconditioner will otherwise crash because it became singular for some images in the dataset.

Long story short, I uploaded the alpha mattes computed with PyMatting's estimate_alpha_knn instead. Although the results do not match exactly, they are pretty close and more importantly, they are the same every time.

For Information-flow matting, the currently uploaded alpha mattes produce slightly smaller errors than in our paper.

I took a closer look at your multi-level method and made some simplifications to the cost function and the way to solve it.

That sounds very interesting. Did you compare to the foregrounds computed with your FBA method yet?

MarcoForte commented 3 years ago

Thanks, I successfully used these images and finished writing the paper. ( I submitted to ICIP which is not double blind but I don't want to publish it online before the reviews come back. ) I'll try with FBA Matting to compute a trimap from a provided alpha matte and evaluate the foreground accuracy. There is also this method recently published, https://v-sense.scss.tcd.ie/research/deep-learning/foreground-color-prediction-through-inverse-compositing/

99991 commented 3 years ago

Thanks, I successfully used these images and finished writing the paper.

Congratulations! :tada:

I'll try with FBA Matting to compute a trimap from a provided alpha matte and evaluate the foreground accuracy.

I wonder in how far the dilation radius of the trimap will influence the quality of the result. The estimated foreground will probably be fine since smoothly extrapolating the foreground color works well, but if the estimated alpha matte is inaccurate, the NN might extrapolate the wrong color. How stable is the alpha matte with respect to different dilation radii?

There is also this method recently published

Thanks, that paper was new to me.