bcmi / Object-Shadow-Generation-Dataset-DESOBA

[AAAI 2022] The first dataset on foreground object shadow generation for image composition in real-world scenes. The code used in our paper "Shadow Generation for Composite Image in Real-world Scenes", AAAI2022. Useful for shadow generation, shadow removal, image composition, etc.
MIT License
166 stars 21 forks source link

How do you calculate linear transformation parameters? #2

Closed UdonDa closed 3 years ago

UdonDa commented 3 years ago

Hi, @ustcnewly .

I read your paper and think that your work can bring the future direction to shadow generation research!

I have a question about your method about

Given paired images {Ic, Ig}, the ground-truth shadow parameter {w_{dark}, b_{dark}} for the foreground shadow can be easily calculated by using linear regression.

How do you calculate a linear regression? Would you explain this question?

Best regards.

hy-zpg commented 3 years ago

The linear regression is calculated according to the Eqn. (6) in our paper. Specifically, we calculate the linear regression based on the tuple {Ic, Ig, Mfs}, related code please refer the link [https://github.com/cvlab-stonybrook/SID/blob/main/data_processing/compute_params.py].

UdonDa commented 3 years ago

Hi, @hy-zpg Thank you for replying! I can produce such parameters. Thank you.