Skip to content
Snippets Groups Projects
Unverified Commit c762d1e4 authored by Haian Huang(深度眸)'s avatar Haian Huang(深度眸) Committed by GitHub
Browse files

Fix window data won't destroy error when out_file is not None and show=False (#4442)

parent 3a0e75b0
No related branches found
No related tags found
No related merge requests found
......@@ -112,7 +112,7 @@ def imshow_det_bboxes(img,
img = mmcv.bgr2rgb(img)
img = np.ascontiguousarray(img)
plt.figure(figsize=fig_size)
plt.figure(win_name, figsize=fig_size)
plt.title(win_name)
plt.axis('off')
ax = plt.gca()
......@@ -159,6 +159,8 @@ def imshow_det_bboxes(img,
dir_name = osp.abspath(osp.dirname(out_file))
mmcv.mkdir_or_exist(dir_name)
plt.savefig(out_file)
if not show:
plt.close()
if show:
if wait_time == 0:
plt.show()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment