5890d98d650b9bf3c1824f48fec96ad90c94fbbb,grad-cam.py,,,#,212

Before Change



    cam_mask = np.zeros(gb.shape)
    for i in range(0, gb.shape[0]):
        cam_mask[i, :, :] = mask

    cam_gb = np.multiply(cam_mask, gb)
    utils.save_image(torch.from_numpy(cam_gb), "cam_gb.jpg")

After Change


    gb = gb.transpose((1, 2, 0))
    cam_mask = cv2.merge([mask, mask, mask])
    cam_gb = deprocess_image(cam_mask*gb)
    gb = deprocess_image(gb)

    cv2.imwrite("gb.jpg", gb)
    cv2.imwrite("cam_gb.jpg", cam_gb)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: jacobgil/pytorch-grad-cam
Commit Name: 5890d98d650b9bf3c1824f48fec96ad90c94fbbb
Time: 2020-01-11
Author: jacob.gildenblat@gmail.com
File Name: grad-cam.py
Class Name:
Method Name:


Project Name: arraiy/torchgeometry
Commit Name: 486009c80eee28ba081e1092902e3398463150c4
Time: 2018-09-27
Author: edgar.riba@gmail.com
File Name: examples/depth_warper/main.py
Class Name:
Method Name: DepthWarperApp


Project Name: jacobgil/pytorch-grad-cam
Commit Name: c5f4a946052ac81bda7c9e8d15ea1cd891a6200a
Time: 2020-12-26
Author: jacob.gildenblat@gmail.com
File Name: gradcam.py
Class Name:
Method Name:


Project Name: cleardusk/3DDFA
Commit Name: e53a741fc7a36fc7be927e1cd7352176a29102a4
Time: 2018-12-01
Author: guojianzhu1994@foxmail.com
File Name: main.py
Class Name:
Method Name: main