MCPcopy Create free account
hub / github.com/ActiveVisionLab/DFNet / print_feature_examples

Function print_feature_examples

script/utils/utils.py:72–84  ·  view source on GitHub ↗

print feature maps ::param: features

(features, path)

Source from the content-addressed store, hash-verified

70 plt.close()
71
72def print_feature_examples(features, path):
73 """
74 print feature maps
75 ::param: features
76 """
77 kwargs = {'normalize' : True, } # 'scale_each' : True
78
79 for i in range(len(features)):
80 fn = path + '{}.png'.format(i)
81 # save_image(features[i].permute(1,0,2,3), fn, **kwargs)
82 save_image_saliancy(features[i].permute(1,0,2,3), fn, normalize=True)
83 # pdb.set_trace()
84 ###
85
86def plot_features(features, path='f', isList=True):
87 """

Callers 1

plot_featuresFunction · 0.85

Calls 1

save_image_saliancyFunction · 0.85

Tested by

no test coverage detected