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

Function tmp_plot3

script/run_feature.py:66–81  ·  view source on GitHub ↗

print 1 pair of 1 sample 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

64 save_image_saliancy(features_r, './tmp/rgb', True)
65
66def tmp_plot3(target_in, rgb_in, features_target, features_rgb, i=0):
67 '''
68 print 1 pair of 1 sample of salient feature map
69 :param: target_in [B, 3, H, W]
70 :param: rgb_in [B, 3, H, W]
71 :param: features_target [B, C, H, W]
72 :param: features_rgb [B, C, H, W]
73 :param: frame index i of batch
74 '''
75 print("for debug only...")
76 save_image(target_in[i], './tmp/target_in.png')
77 save_image(rgb_in[i], './tmp/rgb_in.png')
78 features_t = features_target[i].clone()[:, None, :, :]
79 features_r = features_rgb[i].clone()[:, None, :, :]
80 save_image_saliancy(features_t[0], './tmp/target', True)
81 save_image_saliancy(features_r[0], './tmp/rgb', True)
82
83def lognuniform(low=-2, high=0, size=1, base=10):
84 ''' sample from log uniform distribution between 0.01~1 '''

Callers

nothing calls this directly

Calls 1

save_image_saliancyFunction · 0.90

Tested by

no test coverage detected