RenYurui / StructureFlow

Code for paper "StructureFlow: Image Inpainting via Structure-aware Appearance Flow"
Other
222 stars 42 forks source link

Question abount the input structure during test #27

Closed cmyyy closed 4 years ago

cmyyy commented 4 years ago

@RenYurui , hello. Is the input structure obtained according to the equation S_in = S_gt ◦ (1 − M) during test?

RenYurui commented 4 years ago

Yes. The input structure images are obtained by the equation.

cmyyy commented 4 years ago

So in practical, we don't know the I_gt, therefore we can't get the S_gt, which means we need to get the S_in directly from an incompelete image, can it be done by the edge-preserved smooth methods?

cmyyy commented 4 years ago

@RenYurui , it seems we need to comment out https://github.com/RenYurui/StructureFlow/blob/c586ae13d6770d7fc4d489659a2b9e7758695842/src/models.py#L53 in order to run test.py successfully, since the weight file of discriminator is not provided. So it would be better if you can remind people of this in the README.md. Thanks for your great work!~

RenYurui commented 4 years ago

In practice, we can directly smooth the S_in image using the RTV method. However, some modifications are needed. We will provide an update to deal with this situation.

RenYurui commented 4 years ago

The 'tsmooth.m' is updated to smooth the masked input image I_in. Use the following code

S = t_smooth(I_in, 0.015, 3, 0.001, 3, mask);

where I_in = I_gt * (1-mask)