mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 13:34:23 +08:00
Update predictor.py
This commit is contained in:
parent
38bcce53c2
commit
8fd13b1b2c
@ -345,7 +345,8 @@ class BasePredictor:
|
|||||||
if self.args.show:
|
if self.args.show:
|
||||||
self.show(str(p))
|
self.show(str(p))
|
||||||
if self.args.save:
|
if self.args.save:
|
||||||
self.save_predicted_images(str(self.save_dir / p.name), frame)
|
|
||||||
|
self.save_predicted_images(str(self.save_dir / (p.name or "tmp.jpg")), frame)
|
||||||
|
|
||||||
return string
|
return string
|
||||||
|
|
||||||
@ -375,9 +376,6 @@ class BasePredictor:
|
|||||||
|
|
||||||
# Save images
|
# Save images
|
||||||
else:
|
else:
|
||||||
if save_path.split("/")[-1].startswith("predict"):
|
|
||||||
# havn't provide file name
|
|
||||||
save_path = save_path + "/tmp.jpg"
|
|
||||||
cv2.imwrite(save_path, im)
|
cv2.imwrite(save_path, im)
|
||||||
|
|
||||||
def show(self, p=""):
|
def show(self, p=""):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user