おそらくlibgtk2がインストールされていない環境でcv2.waitKey() および cv2.destroyAllWindows() が動作しないので除外

This commit is contained in:
tsukimiya
2023-04-20 06:20:02 +09:00
parent ee5cec7530
commit e746829b5f

View File

@@ -1445,8 +1445,8 @@ def debug_dataset(train_dataset, show_input_ids=False):
im = im[:, :, ::-1] # RGB -> BGR (OpenCV)
if os.name == "nt": # only windows
cv2.imshow("img", im)
k = cv2.waitKey()
cv2.destroyAllWindows()
k = cv2.waitKey()
cv2.destroyAllWindows()
if k == 27 or k == ord("s") or k == ord("e"):
break
steps += 1