hi! Thank you for this SSD code, quite touching :1st_place_medal:
I face with strange error running detect.py, can anyone help me to solve it !?
thank you.
Traceback (most recent call last):
File "detect.py", line 102, in
detect(original_image, min_score=0.2, max_overlap=0.5, top_k=200).show()
File "detect.py", line 67, in detect
font = ImageFont.truetype("./calibril.ttf", 15)
File "/home/rahim/anaconda3/lib/python3.7/site-packages/PIL/ImageFont.py", line 642, in truetype
return freetype(font)
File "/home/rahim/anaconda3/lib/python3.7/site-packages/PIL/ImageFont.py", line 639, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/home/rahim/anaconda3/lib/python3.7/site-packages/PIL/ImageFont.py", line 188, in init
font, size, index, encoding, layout_engine=layout_engine
OSError: cannot open resource
Hello,
Search for the default fonts directory and choose one from the available options. Try without using ./
For me the following code snippet worked:
font = ImageFont.truetype("OpenSans-Regular.ttf", 20)
hi! Thank you for this SSD code, quite touching :1st_place_medal: I face with strange error running detect.py, can anyone help me to solve it !? thank you.
Traceback (most recent call last): File "detect.py", line 102, in
detect(original_image, min_score=0.2, max_overlap=0.5, top_k=200).show()
File "detect.py", line 67, in detect
font = ImageFont.truetype("./calibril.ttf", 15)
File "/home/rahim/anaconda3/lib/python3.7/site-packages/PIL/ImageFont.py", line 642, in truetype
return freetype(font)
File "/home/rahim/anaconda3/lib/python3.7/site-packages/PIL/ImageFont.py", line 639, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/home/rahim/anaconda3/lib/python3.7/site-packages/PIL/ImageFont.py", line 188, in init
font, size, index, encoding, layout_engine=layout_engine
OSError: cannot open resource