1.SOCA moudle结构图
2,YOLOv5,YOLOv7改进之结合SOCA
1.配置common.py文件
#SOCA moudle 单幅图像超分辨率
class Covpool(Function):
@staticmethod
def forward(ctx, input):
x = input
batchSize = x.data.shape[0]
dim = x.data.shape[1]
h = x.data.shape[2]
w = x.data.shape[3]
M = h*w
x = x.reshape(batchSize,dim,M)
I_hat = (-1./M/M)*torch.ones(M,M,device = x.devi