danfenghong / IEEE_TGRS_SpectralFormer

Danfeng Hong, Zhu Han, Jing Yao, Lianru Gao, Bing Zhang, Antonio Plaza, Jocelyn Chanussot. Spectralformer: Rethinking hyperspectral image classification with transformers, IEEE Transactions on Geoscience and Remote Sensing (TGRS), 2021
219 stars 39 forks source link

patch_size整除 #14

Open Yanmiss opened 2 years ago

Yanmiss commented 2 years ago

老师您好,我想向您请教一个问题,使用transformer处理高光谱图像时,需要把一整张高光谱图像分成很多个patch,如IP数据集的H=145,W=145,patch_size=x, 如果不能分成整数个patch(即图像大小和patch大小不能整除)怎么解决呢

danfenghong commented 2 years ago

你好,我们在做高光谱分类的时候是有重叠的分patch,每个像素点周围一个7*7的区域,类似于这样。

Yanmiss @.***> 于2022年7月22日周五 10:58写道:

老师您好,我想向您请教一个问题,使用transformer处理高光谱图像时,需要把一整张高光谱图像分成很多个patch,如IP数据集的H=145,W=145,patch_size=x, 如果不能分成整数个patch(即图像大小和patch大小不能整除)怎么解决呢

— Reply to this email directly, view it on GitHub https://github.com/danfenghong/IEEE_TGRS_SpectralFormer/issues/14, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFL2GZQL5WLQQDBG2L3UDRTVVIE4RANCNFSM54JVZ6OQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Yanmiss commented 2 years ago

好的,谢谢老师解答