lllyasviel / AppearanceEraser

Erasing Appearance Preservation in Optimization-based Smoothing (ECCV 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unrecognized function or variable 'seg'.

bycloudai opened this issue · comments

Hi, thank you for your amazing work.

I tried to run this code with this line:
matlab ./code/matlab/L1_EAP_auto/run.m

but it gave me this error:

>> run
     1

Construct local sparse matrix...
Construct global sparse matrix...
Unrecognized function or variable 'seg'.

Error in l1flattening (line 45)
splabel = seg(image_lab, 0.5, 5, 500);

Error in run>@(a,b)l1flattening(a,b,struct()) (line 2)
output=eap(img, 0.1, @(a, b)l1flattening(a, b, struct()));

Error in eap (line 10)
    output=func(img, repmat(mask, [1, 1, 3]));

Error in run (line 2)
output=eap(img, 0.1, @(a, b)l1flattening(a, b, struct()));

How can I fix this? Thank you

This is weird, I have never seen this problem. What is your OS and Matlab version?

I am on Windows 10, MATLAB r2020a

I am using MATLAB r2016a and it automatically configurated my path.

For MATLAB r2020a, I believe gceboh is correct and you may follow that steps 1&2.

I tried to do the following steps that gceboh provided. I am able to run run.m now.
Btw how long does it usually run for? I've been running 1 image for 1.5hours and it's still going.

I use I7 CPU. An 512*512 image takes about 7 minutes. The algorithm complexity is O(n^4) and large image is not recommended.

And this is exactly the reason why it is not possible to implement this algorithm in python. Python's sparse optimisation is even weaker than matlab and will take much longer time.