(output_dir, gt_anno)
| 147 | plot_results(im, scores, bboxes_scaled, output_dir) |
| 148 | |
| 149 | def save_gt_fig(output_dir, gt_anno): |
| 150 | im = cv2.imread(os.path.join(output_dir, "img.png")) |
| 151 | h, w = im.shape[:2] |
| 152 | bboxes_scaled = rescale_bboxes(gt_anno['boxes'], (w,h)) |
| 153 | labels = gt_anno['labels'] |
| 154 | plot_gt(im, labels, bboxes_scaled, output_dir) |
| 155 | |
| 156 | def get_one_query_meanattn(vis_attn,h_featmap,w_featmap): |
| 157 | mean_attentions = vis_attn.mean(0).reshape(h_featmap, w_featmap) |
no test coverage detected