MIRACLE-Center / YOLO_Universal_Anatomical_Landmark_Detection

[MICCAI 2021] You Only Learn Once: Universal Anatomical Landmark Detection https://arxiv.org/abs/2103.04657
MIT License
79 stars 22 forks source link

how to visualize the results? #12

Closed benzzhang closed 2 years ago

benzzhang commented 2 years ago

After testing,I got results included some .png and .npy I want to know how to fuse them to show the points in the Chest X-Ray pics. I used the following code,it didn't work:

import numpy as np
import cv2
import matplotlib.pyplot as plt
image = np.load(r'D:\code-zhangjian\code-space\src\chest\CHNCXR_0032_0_gt.npy')
src = plt.imread(r'D:\code-zhangjian\code-space\src\CHNCXR_0032_0.png')
for i in range(0,image.shape[0]):
    plt.imshow(image[i,:,:],cmap='gray')
    plt.imshow(src,cmap='gray')
    cv2.imwrite(str(i)+".png",image[i,:,:])
    plt.show()
heqin-zhu commented 2 years ago

The visualization code is in evaluation.py. You can add -ds arguments at the evaluation stage to generate visualization results. For example, python3 evaluation.py -i ../runs/GU2Net/results/test_epoch067 -ds.

benzzhang commented 2 years ago

the arguments should be ‘-s’