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)
| 21 | from utils.utils import plot_features, save_image_saliancy |
| 22 | |
| 23 | def 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 | |
| 41 | def preprocess_features_for_loss(feature): |
| 42 | ''' |
nothing calls this directly
no test coverage detected