ReID-MGN icon indicating copy to clipboard operation
ReID-MGN copied to clipboard

How to make the title of the result graph change color?

Open bruce14800 opened this issue 4 years ago • 1 comments

in main.py line.113 to line.137

I modified some programs but still can't get out.

I modified this code :

   for i in range(10):
        img_path = gallery_path[index[i]]
        
        print(img_path)

        ax = plt.subplot(1, 11, i + 2)
        ax.axis('off')
        plt.imshow(plt.imread(img_path))
        
        if img_path == gallery_label:
            ax.set_title('%d'%(i+1),color='green')
        else:
            ax.set_title('%d'%(i+1),color='red')
            
    fig.savefig("show.png")
    print('result saved to show.png')

bruce14800 avatar Dec 29 '20 05:12 bruce14800

It's not a technical problem, it's a simple code problem.

GNAYUOHZ avatar May 08 '21 07:05 GNAYUOHZ