Starting training for 20 epochs... Epoch GPUmem boxloss objloss clsloss Instances Size…
- User
Starting training for 20 epochs...
codeEpoch GPU_mem box_loss obj_loss cls_loss Instances Size 0/19 0G 0.1284 0.03323 0 26 640: 0%| | 0/1 00:55Exception in thread Thread-10 (plot_images):Traceback (most recent call last): File "C:\Users\chuuimc\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1045, in _bootstrap_inner self.run() File "C:\Users\chuuimc\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 982, in run self._target(*self._args, **self._kwargs) File "D:\yolo\yolov5-7.0\utils\plots.py", line 305, in plot_images annotator.box_label(box, label, color=color) File "D:\yolo\yolov5-7.0\utils\plots.py", line 91, in box_label w, h = self.font.getsize(label) # text width, height ^^^^^^^^^^^^^^^^^ AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
- Assistant
The error you're encountering indicates that there is an issue with the
FreeTypeFontobject in thebox_labelmethod of the YOLOv5 plotting utilities. Specifically, it appears that thegetsizemethod does not exist for theFreeTypeFontobject in the version of the PIL (Pillow) library you are using. This method may have been deprecated or replaced in recent updates.Potential solutions: