fix cv2.error when use PIL.Image.Image

This commit is contained in:
shiraha721 2024-06-11 20:48:47 +08:00
parent 0efdd2f0c4
commit 38bcce53c2

View File

@ -375,6 +375,9 @@ class BasePredictor:
# Save images
else:
if save_path.split("/")[-1].startswith("predict"):
# havn't provide file name
save_path = save_path + "/tmp.jpg"
cv2.imwrite(save_path, im)
def show(self, p=""):