PyTorch-YOLOv3 icon indicating copy to clipboard operation
PyTorch-YOLOv3 copied to clipboard

problem of detect.py

Open hezhangubc opened this issue 6 years ago • 4 comments

when I run detect.py, it shows :

File "detect.py", line 140 plt.savefig(f"output/{filename}.jpg", bbox_inches="tight", pad_inches=0.0) ^ SyntaxError: invalid syntax

Is it because of the Linux system? How to solve it?

hezhangubc avatar Jun 11 '19 13:06 hezhangubc

I just delete "f" and add "format", it works for me, but I'm not sure whether it works for you:

plt.savefig("output/{}.jpg".format(filename), bbox_inches="tight", pad_inches=0.0)

mama110 avatar Jun 20 '19 08:06 mama110

when I run detect.py, it shows :

File "detect.py", line 140 plt.savefig(f"output/{filename}.jpg", bbox_inches="tight", pad_inches=0.0) ^ SyntaxError: invalid syntax

Is it because of the Linux system? How to solve it?

"f-string" can't be used in python3.5 and previous versions of python. What's your version of python ?

yyx1107 avatar Jun 30 '19 06:06 yyx1107

Whats your cls_conf, mine is always 1.0, I think its not right

  • Label: without_mask, Conf: 1.00000

ly0303521 avatar Apr 09 '20 08:04 ly0303521

Whats your cls_conf, mine is always 1.0, I think its not right

  • Label: without_mask, Conf: 1.00000

Me too.Do you know why?

zxin8218 avatar Aug 05 '20 16:08 zxin8218