- Model summary (fused): 168 layers, 3011108 parameters, 0 gradients
- Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 1/1 [00:00<00:00, 45.58it/s]
- all 12 12 0 0 0 0
- Traceback (most recent call last):
- File "D:\yolo\testyolo.py", line 13, in <module>
- model.train(data="data.yaml",
- File "D:\ProgramData\Anaconda3\envs\python310\lib\site-packages\ultralytics\engine\model.py", line 334, in train
- self.trainer.train()
- File "D:\ProgramData\Anaconda3\envs\python310\lib\site-packages\ultralytics\engine\trainer.py", line 195, in train
- self._do_train(world_size)
- File "D:\ProgramData\Anaconda3\envs\python310\lib\site-packages\ultralytics\engine\trainer.py", line 418, in _do_train
- self.final_eval()
- File "D:\ProgramData\Anaconda3\envs\python310\lib\site-packages\ultralytics\engine\trainer.py", line 573, in final_eval
- self.metrics = self.validator(model=f)
- File "D:\ProgramData\Anaconda3\envs\python310\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
- return func(*args, **kwargs)
- File "D:\ProgramData\Anaconda3\envs\python310\lib\site-packages\ultralytics\engine\validator.py", line 190, in __call__
- self.print_results()
- File "D:\ProgramData\Anaconda3\envs\python310\lib\site-packages\ultralytics\models\yolo\detect\val.py", line 165, in print_results
- names=self.names.values(),
- AttributeError: 'str' object has no attribute 'values'
- Exception in thread Thread-12 (plot_images):
- Traceback (most recent call last):
- File "D:\ProgramData\Anaconda3\envs\python310\lib\threading.py", line 1009, in _bootstrap_inner
- self.run()
- File "D:\ProgramData\Anaconda3\envs\python310\lib\threading.py", line 946, in run
- self._target(*self._args, **self._kwargs)
- File "D:\ProgramData\Anaconda3\envs\python310\lib\site-packages\ultralytics\utils\plotting.py", line 442, in plot_images
- c = names.get(c, c) if names else c
- AttributeError: 'str' object has no attribute 'get'
-
- Process finished with exit code 1
-
複製代碼
這邊失足
-
- names:
- 0:angel
- 1:redfish
- 2:bluefish
複製代碼
改成(冒號後多一個空格)
- names:
- 0: angel
- 1: redfish
- 2: bluefish
複製代碼
文章出處: NetYea 網頁設計
參考文章
https://github.com/ultralytics/ultralytics/issues/639
本文出自:
留言列表