YoloV9: Exception in thread Thread-14 (plot_images):
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- jupyter-notebook, python, pytorch
- Ambito
- computer-vision, machine-learning
Direzione di ricerca
Inizia con il notebook YOLOv9 e ispeziona utils/plots.py, in particolare box_label alla riga 86 e plot_images alla riga 300. Riproduci l’esecuzione dell’addestramento nell’ambiente Python e PyTorch indicato, quindi verifica che il tracciamento delle immagini venga completato senza l’eccezione FreeTypeFont.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Search before asking
- I have searched the Roboflow Notebooks issues and found no similar bug report.
Notebook name
YOLOv9 Object Detection
(https://github.com/roboflow-ai/notebooks/blob/main/notebooks/train-yolov9-object-detection-on-custom-dataset.ipynb)
Bug
Hi everybody. I am training a custom dataset with the yoloV9 model and the following error message appears. Does someone have a similar problem or know how to fix this exception ? When I start the train.py the following exception (Exception in thread Thread-14 (plot_images)) is raising up, but it does not interrupt the program. Here is the full code.
0/299 10.8G 1.432 5.195 1.115 74 640: Exception in thread Thread-14 (plot_images):
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/opt/conda/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/kaggle/working/yolov9/utils/plots.py", line 300, in plot_images
annotator.box_label(box, label, color=color)
File "/kaggle/working/yolov9/utils/plots.py", line 86, in box_label
w, h = self.font.getsize(label) # text width, height
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
0/299 10.8G 1.432 5.195 1.115 74 640: /kaggle/working/yolov9/train.py:302: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
with torch.cuda.amp.autocast(amp):
/opt/conda/lib/python3.10/site-packages/torch/nn/parallel/parallel_apply.py:79: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
with torch.cuda.device(device), torch.cuda.stream(stream), autocast(enabled=autocast_enabled):
0/299 10.9G 1.364 4.798 1.082 80 640: Exception in thread Thread-17 (plot_images):
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/opt/conda/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/kaggle/working/yolov9/utils/plots.py", line 300, in plot_images
annotator.box_label(box, label, color=color)
File "/kaggle/working/yolov9/utils/plots.py", line 86, in box_label
w, h = self.font.getsize(label) # text width, height
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
0/299 10.9G 1.407 4.783 1.132 62 640: Exception in thread Thread-20 (plot_images):
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/opt/conda/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/kaggle/working/yolov9/utils/plots.py", line 300, in plot_images
annotator.box_label(box, label, color=color)
File "/kaggle/working/yolov9/utils/plots.py", line 86, in box_label
w, h = self.font.getsize(label) # text width, height
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'_**
Environment
Ultralytics 8.3.18 🚀 Python-3.10.14 torch-2.4.0 CUDA:0 (Tesla T4, 15095MiB)
Setup complete ✅ (4 CPUs, 31.4 GB RAM, 5934.0/8062.4 GB disk)
Minimal Reproducible Example
Starting training for 300 epochs...
/opt/conda/lib/python3.10/multiprocessing/popen_fork.py:66: RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock.
self.pid = os.fork()
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
0%| | 0/183 00:00/kaggle/working/yolov9/train.py:302: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
with torch.cuda.amp.autocast(amp):
/opt/conda/lib/python3.10/site-packages/torch/nn/parallel/parallel_apply.py:79: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
with torch.cuda.device(device), torch.cuda.stream(stream), autocast(enabled=autocast_enabled):
0/299 10.8G 1.432 5.195 1.115 74 640: Exception in thread Thread-14 (plot_images):
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/opt/conda/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/kaggle/working/yolov9/utils/plots.py", line 300, in plot_images
annotator.box_label(box, label, color=color)
File "/kaggle/working/yolov9/utils/plots.py", line 86, in box_label
w, h = self.font.getsize(label) # text width, height
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
0/299 10.8G 1.432 5.195 1.115 74 640: /kaggle/working/yolov9/train.py:302: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
with torch.cuda.amp.autocast(amp):
/opt/conda/lib/python3.10/site-packages/torch/nn/parallel/parallel_apply.py:79: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
with torch.cuda.device(device), torch.cuda.stream(stream), autocast(enabled=autocast_enabled):
0/299 10.9G 1.364 4.798 1.082 80 640: Exception in thread Thread-17 (plot_images):
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/opt/conda/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/kaggle/working/yolov9/utils/plots.py", line 300, in plot_images
annotator.box_label(box, label, color=color)
File "/kaggle/working/yolov9/utils/plots.py", line 86, in box_label
w, h = self.font.getsize(label) # text width, height
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
0/299 10.9G 1.407 4.783 1.132 62 640: Exception in thread Thread-20 (plot_images):
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/opt/conda/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/kaggle/working/yolov9/utils/plots.py", line 300, in plot_images
annotator.box_label(box, label, color=color)
File "/kaggle/working/yolov9/utils/plots.py", line 86, in box_label
w, h = self.font.getsize(label) # text width, height
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
0/299 10.9G 1.037 1.106 0.9808 32 640: 1
Class Images Instances P R mAP50
all 812 838 0.964 0.943 0.987 0.667
/opt/conda/lib/python3.10/multiprocessing/popen_fork.py:66: RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock.
self.pid = os.fork()
Additional
No response
Are you willing to submit a PR?
- Yes I'd like to help by submitting a PR!
- Lingua principale
- Jupyter Notebook
- Stelle
- 9.7k
- Fork
- 1.5k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di roboflow/notebooks
-
zero-shot-object-detection-with-grounding-dino.ipynb can't render correctlyForse già presa @rkrisa l’ha presa 146 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
-
Drone FPV Object DetectionApertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Minor Issue: The notebook tutorial is using the wrong model (yolov11s instead of RF-DETR)Forse già presa @BillionClaw l’ha presa 241 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 52/100
Tutte le issue di roboflow/notebooks
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
roboflow/supervision#2971 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
MagneticResonanceImaging/MRIReco.jl#356 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
cleanlab/cleanvision#282 ·