I am trying to run the Car detection on my local machine. I keep getting this error no matter what font I use. Can any one help?
2025-08-06 22:13:54.044925: E tensorflow/core/util/util.cc:131] oneDNN supports DT_INT32 only on platforms with AVX-512. Falling back to the default Eigen-based implementation if present.
Found 10 boxes for C:/Users/alber/OneDrive/Documents/py4e/NeuralNetworksandDeepLearning/YOLOCardetection/images/test.jpg
Traceback (most recent call last):
File “C:\Users\alber\OneDrive\Documents\py4e\NeuralNetworksandDeepLearning\YOLOCardetection\AutonomousCar.py”, line 690, in
out_scores, out_boxes, out_classes = predict(“test.jpg”)
File “C:\Users\alber\OneDrive\Documents\py4e\NeuralNetworksandDeepLearning\YOLOCardetection\AutonomousCar.py”, line 680, in predict
draw_boxes(image, out_boxes, out_classes, class_names, out_scores)
File “C:\Users\alber\OneDrive\Documents\py4e\NeuralNetworksandDeepLearning\YOLOCardetection\yad2k\utils\utils.py”, line 91, in draw_boxes
font = ImageFont.truetype(
File “C:\ProgramData\anaconda3\Lib\site-packages\PIL\ImageFont.py”, line 819, in truetype
return freetype(font)
File “C:\ProgramData\anaconda3\Lib\site-packages\PIL\ImageFont.py”, line 816, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File “C:\ProgramData\anaconda3\Lib\site-packages\PIL\ImageFont.py”, line 245, in init
self.font = core.getfont(
OSError: cannot open resource
1 Like
One key thing to realize is that the assignments use whatever versions of TF and all the various packages that were current at the time they were last updated. In the case of this course, that would be April of 2021. So there is no guarantee that it will “just work” if you run with the current versions of all the packages. But it looks like you are already using Anaconda, which supports setting up specific versions of all the various packages. Here’s a thread that includes some information about how to set that up.
2 Likes