danfenghong / IEEE_TPAMI_SpectralGPT

Hong, D., Zhang, B., Li, X., Li, Y., Li, C., Yao, J., Yokoya, N., Li, H., Ghamisi, P., Jia, X., Plaza, A. and Gamba, P., Benediktsson, J., Chanussot, J. (2024). SpectralGPT: Spectral remote sensing foundation model. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024. DOI:10.1109/TPAMI.2024.3362475.
191 stars 20 forks source link

ignoring class 0 during training #15

Open andremakar opened 7 months ago

andremakar commented 7 months ago

Hello, can you tell me if it is possible to exclude the 0th grade from training in your code?

moonboy12138 commented 7 months ago

Of courese you can, just modify the datasetloader and loss criterion file.

andremakar commented 7 months ago

Moonboy12138 will it in any way affect the quality of learning if I exclude the knowledge that I have in class 0 and leave subjects in class 1, 2, 3, etc.?

Your network takes into account the spatial location of objects, and I exclude them from training, that is, the spatial location of pixels should change.

andremakar commented 7 months ago

You also take into account the spatial arrangement of objects on 128x128 windows in semantic segmentation, if I understood correctly. And if you remove pixels with 0 markup in the data_loader, everything will get mixed up.

moonboy12138 commented 6 months ago

It appears that you only need to modify the ignore_index=255 parameter in line 10 of this file. I understand your concern; removing pixels with a value of 0 could significantly alter the results compared to those reported in the paper.