ChenHongruixuan / ChangeDetectionRepository

This repository contains some python code of some traditional change detection methods or provides their original websites, such as SFA, MAD, and some deep learning-based change detection methods, such as SiamCRNN, DSFA, and some FCN-based methods.
MIT License
468 stars 100 forks source link

Are there some errors in MAD? #3

Closed kaiusgs closed 3 years ago

kaiusgs commented 3 years ago

In irmad.py, line 51: eigenvector_Y = np.dot(np.dot(inv(sigma_22), sigma_21), eigenvector_X) # the eigenvector of image Y I suppose the eigenvector of image Y should be divided by the eigenvalue, according to equations in the common way of solving CCA. eigenvector_Y_ =np.dot(np.dot(inv(sigma_22), sigma_21), eigenvector_X) /eigenvalue Am I wrong or it's an error in code ? Hope for your reply, and I'll be very thankful.

ChenHongruixuan commented 3 years ago

Sorry for my late reply. The data used for MAD should be centralized, so the code uses the center_X and center_Y rather than X and Y. And accordion to the formula of CCA, I don't think the eigenvector_Y should be divided with eigenvalue. Because eigenvector_Y is solved according to its relation with eigenvector_X, like the following: [image: image.png] [image: image.png] You can refer to the original MATLAB implementation by Nilsen ( http://www.imm.dtu.dk/~alan/software.html).

On Wed, Apr 21, 2021 at 5:12 PM Chenkai @.***> wrote:

In irmad.py, line 51: eigenvector_Y = np.dot(np.dot(inv(sigma_22), sigma_21), eigenvector_X) # the eigenvector of image Y I suppose the eigenvector of image Y should be divided by the eigenvalue, according to equations in the common way of solving CCA. eigenvectorY =np.dot(np.dot(inv(sigma_22), sigma_21), eigenvector_X) /eigenvalue Am I wrong or it's an error in code ? And in line 59: mad_variates = np.dot(eigenvector_X.T, center_X) - np.dot(eigenvector_Y.T, center_Y) # (6, width * height) I was wondering why center_X and center_Y rather than X and Y are used to calculate the MAD. Hope for your reply, and I'll be very thankful.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/I-Hope-Peace/ChangeDetectionRepository/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQFWQ7NTZIDFV6OAFFQPLJDTJ2JHBANCNFSM43J6AJFA .