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

Function tmp_plot2

script/run_feature.py:48–64  ·  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

46 sys.exit()
47
48def tmp_plot2(target_in, rgb_in, features_target, features_rgb, i=0):
49 '''
50 print 1 pair of batch of salient feature map
51 :param: target_in [B, 3, H, W]
52 :param: rgb_in [B, 3, H, W]
53 :param: features_target [B, C, H, W]
54 :param: features_rgb [B, C, H, W]
55 :param: frame index i of batch
56 '''
57 print("for debug only...")
58 save_image(target_in[i], './tmp/target_in.png')
59 save_image(rgb_in[i], './tmp/rgb_in.png')
60 pdb.set_trace()
61 features_t = features_target[i].clone()[:, None, :, :]
62 features_r = features_rgb[i].clone()[:, None, :, :]
63 save_image_saliancy(features_t, './tmp/target', True)
64 save_image_saliancy(features_r, './tmp/rgb', True)
65
66def tmp_plot3(target_in, rgb_in, features_target, features_rgb, i=0):
67 '''

Callers

nothing calls this directly

Calls 1

save_image_saliancyFunction · 0.90

Tested by

no test coverage detected