YOLOを今日始めた初心者です。
git clone https://github.com/ultralytics/yolov5 # clone cd yolov5 pip install -r requirements.txt # install
を実行して環境構築は何とかできました.
こちらのサイトを見てやりました。
https://github.com/ultralytics/yolov5
ここから本題です
コマンドプロンプトからコマンドで画像の物体検出を行おうとすると
python detect.py --source C:\Users\User\yolov5\data\images\zidane.jpg
error
1detect: weights=yolov5s.pt, source=C:\Users\User\yolov5\data\images\zidane.jpg, data=data\coco128.yaml, imgsz=[640, 640], conf_thres=0.25, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs\detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False 2YOLOv5 v6.1-258-g1156a32 Python-3.10.5 torch-1.11.0+cpu CPU 3 4Traceback (most recent call last): 5 File "C:\Users\User\yolov5\detect.py", line 252, in <module> 6 main(opt) 7 File "C:\Users\User\yolov5\detect.py", line 247, in main 8 run(**vars(opt)) 9 File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context 10 return func(*args, **kwargs) 11 File "C:\Users\User\yolov5\detect.py", line 92, in run 12 model = DetectMultiBackend(weights, device=device, dnn=dnn, data=data, fp16=half) 13 File "C:\Users\User\yolov5\models\common.py", line 331, in __init__ 14 names = yaml.safe_load(f)['names'] 15 File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\yaml\__init__.py", line 162, in safe_load 16 return load(stream, SafeLoader) 17 File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\yaml\__init__.py", line 112, in load 18 loader = Loader(stream) 19 File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\yaml\loader.py", line 34, in __init__ 20 Reader.__init__(self, stream) 21 File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\yaml\reader.py", line 85, in __init__ 22 self.determine_encoding() 23 File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\yaml\reader.py", line 135, in determine_encoding 24 self.update(1) 25 File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\yaml\reader.py", line 169, in update 26 self.check_printable(data) 27 File "C:\Users\User\AppData\Roaming\Python\Python310\site-packages\yaml\reader.py", line 143, in check_printable 28 raise ReaderError(self.name, position, ord(character), 29yaml.reader.ReaderError: unacceptable character #x0080: special characters are not allowed 30 in "data\coco128.yaml", position 227
が出てきてしまいます。
いくら調べても全くわかりません
どなたかご教授お願い致します。
回答1件
あなたの回答
tips
プレビュー