byungjae89 / SPADE-pytorch

PyTorch implementation of "Sub-Image Anomaly Detection with Deep Pyramid Correspondences"
Apache License 2.0
235 stars 43 forks source link

for d_idx in range(feat_gallery.shape[0] // 100)? #21

Open PENGYUN906 opened 6 months ago

PENGYUN906 commented 6 months ago

The basic idea of SPADE is relatively well understood, but some parts of it are not understood in the calculation of AnomalyMap: for d_idx in range(feat_gallery.shape[0] // 100): # TODO: feat_gallery_map = feat_gallery[d_idx 100:d_idx 100 + 100].to(self.device) dist_matrix = torch.pairwise_distance(feat_gallery_map, test_feat_map.to(self.device)) dist_matrix_list.append(dist_matrix)

What is the meaning of 100 in this place? never understood it.