Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Found 10 boxes for bigfile.jpg OSError: cannot open resource #1

Open
sahusarkar opened this issue Jun 4, 2020 · 0 comments
Open

Found 10 boxes for bigfile.jpg OSError: cannot open resource #1

sahusarkar opened this issue Jun 4, 2020 · 0 comments

Comments

@sahusarkar
Copy link

`Found 10 boxes for bigfile.jpg

OSError Traceback (most recent call last)
in ()
----> 1 out_scores, out_boxes, out_classes = predict(sess,'bigfile.jpg')

4 frames
in predict(sess, image_file)
31 colors = generate_colors(class_names)
32 # Draw bounding boxes on the image file
---> 33 draw_boxes(image, out_scores, out_boxes, out_classes, class_names, colors)
34 # Save the predicted bounding box on the image
35 image.save(os.path.join("out", image_file), quality=90)

/content/drive/My Drive/yolo_utils1.py in draw_boxes(image, out_scores, out_boxes, out_classes, class_names, colors)
50 def draw_boxes(image, out_scores, out_boxes, out_classes, class_names, colors):
51
---> 52 font = ImageFont.truetype(font='font/FiraMono-Medium.otf',size=np.floor(3e-2 * image.size[1] + 0.5).astype('int32'))
53 thickness = (image.size[0] + image.size[1]) // 300
54

/usr/local/lib/python3.6/dist-packages/PIL/ImageFont.py in truetype(font, size, index, encoding, layout_engine)
640
641 try:
--> 642 return freetype(font)
643 except OSError:
644 if not isPath(font):

/usr/local/lib/python3.6/dist-packages/PIL/ImageFont.py in freetype(font)
637
638 def freetype(font):
--> 639 return FreeTypeFont(font, size, index, encoding, layout_engine)
640
641 try:

/usr/local/lib/python3.6/dist-packages/PIL/ImageFont.py in init(self, font, size, index, encoding, layout_engine)
186 return
187 self.font = core.getfont(
--> 188 font, size, index, encoding, layout_engine=layout_engine
189 )
190 else:`

Please help me, I got stock in last line of the code, what is this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant