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

Function tmp_plot2

script/feature/direct_feature_matching.py:23–39  ·  view source on GitHub ↗

print 1 pair of batch of salient feature map :param: target_in [B, 3, H, W] :param: rgb_in [B, 3, H, W] :param: features_target [B, C, H, W] :param: features_rgb [B, C, H, W] :param: frame index i of batch

(target_in, rgb_in, features_target, features_rgb, i=0)

Source from the content-addressed store, hash-verified

21from utils.utils import plot_features, save_image_saliancy
22
23def tmp_plot2(target_in, rgb_in, features_target, features_rgb, i=0):
24 '''
25 print 1 pair of batch of salient feature map
26 :param: target_in [B, 3, H, W]
27 :param: rgb_in [B, 3, H, W]
28 :param: features_target [B, C, H, W]
29 :param: features_rgb [B, C, H, W]
30 :param: frame index i of batch
31 '''
32 print("for debug only...")
33 pdb.set_trace()
34 save_image(target_in[i], './tmp/target_in.png')
35 save_image(rgb_in[i], './tmp/rgb_in.png')
36 features_t = features_target[i].clone()[:, None, :, :]
37 features_r = features_rgb[i].clone()[:, None, :, :]
38 save_image_saliancy(features_t, './tmp/target', True)
39 save_image_saliancy(features_r, './tmp/rgb', True)
40
41def preprocess_features_for_loss(feature):
42 '''

Callers

nothing calls this directly

Calls 1

save_image_saliancyFunction · 0.90

Tested by

no test coverage detected