본문 바로가기

개발

YOLOv5 처음 실행해보기

OLOv5를 돌려보자, 환경구축은 이전글을 참조하면된다.

 

 

YOLOv5 개발환경 구축하기

어찌됬던 YOLOv8모델로 작업을 진행하려 했으나 TFLITE 변환에 실패하고 말았다. YOLO 공식사이트에서도 TFLITE 변경을 지원하는 정식 버전을 YOLOv5로 안내하는 것으로 보아 v5가 모바일에 탑재하기 가

ipsmaster.tistory.com

 

일단 냅다 https://docs.ultralytics.com/yolov5/tutorials/model_export/ 사이트 들어가서 내용을 시키는 대로 진행해보자.

 

그리고 시키는데로 벤치마크를 한번 돌려보자.

 

python benchmarks.py --weights yolov5s.pt --imgsz 640 --device 0

 

 

당연하게도 에러가 발생하면서 동작을 하지 않는다.

언제나 마찬가지지만 한번에 된적이 없기 때문이다.

하나씩 살펴보면, 먼저 CPU로 돌리려고 한다. 물론 CPU만 있으면 그렇게 돌리면 되는데, 나는 CUDA를 지원하는 GPU가 있으니까 그걸 활용하도록 설정을 바꿔야 될 것같다. 

 

구글링을 해보니 이런 답변이있다.

https://github.com/ultralytics/yolov5/issues/8848

 

한번 실행해보자.

먼저 cuda 버전을 확인해보자.

nvcc --version

 

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Nov__3_17:51:05_Pacific_Daylight_Time_2023
Cuda compilation tools, release 12.3, V12.3.103
Build cuda_12.3.r12.3/compiler.33492891_0

 

여러가지 답변이있었는데 대부분 colab에서 돌리기 때문에 별 문제 없었던것같고, 나처럼 내 컴퓨터에서 돌릴때는 해결방식을 찾기가 어려웠다.

 

pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

 

토치를 다시 설치해보자.

 

 

 

제발 되길 빌며,

 

python benchmarks.py --weights yolov5s.pt --imgsz 640 --device 0

 

짜잔!

 

 

돌아가기 시작한다. !!!!!

 

여러 에러 메시지와 패키지설치와 데이터 다운로드 등 열심히 돌아가면서 진행된다.

 

대망의 결과는

 

짜란.

 

성공.인거 같은데 결과 해석 등은 나중에 하도록하고 일단 로그 분석을 좀 해야겠다.

 

그런데 이제 출근해야할 시간이기 때문에 로그 분석은 저장만 해놓고 추후 분석하도록 하겠다.

 

아래 내용은 무시하길 바란다. 

 

끝.

 

더보기
benchmarks: weights=yolov5s.pt, imgsz=640, batch_size=1, data=C:\Users\jj\Desktop\AI\YOLOv5\yolov5\yolov5\data\coco128.yaml, device=0, half=False, test=False, pt_only=False, hard_fail=False       
YOLOv5  v7.0-271-g9abbef5 Python-3.9.6 torch-1.9.0+cu111 CUDA:0 (NVIDIA GeForce GTX 1080, 8192MiB)
Downloading https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s.pt to yolov5s.pt...
100%|███████████████████████████████████████████████████████| 14.1M/14.1M [00:00<00:00, 57.9MB/s]

YOLOv5  v7.0-271-g9abbef5 Python-3.9.6 torch-1.9.0+cu111 CUDA:0 (NVIDIA GeForce GTX 1080, 8192MiB)
Fusing layers... 
YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients, 16.4 GFLOPs

Dataset not found , missing paths ['C:\\Users\\jj\\Desktop\\AI\\YOLOv5\\yolov5\\datasets\\coco128\\images\\train2017']
Downloading https://ultralytics.com/assets/coco128.zip to coco128.zip...
100%|███████████████████████████████████████████████████████| 6.66M/6.66M [00:00<00:00, 50.6MB/s]
Dataset download success  (2.6s), saved to C:\Users\jj\Desktop\AI\YOLOv5\yolov5\datasets
val: Scanning C:\Users\jj\Desktop\AI스터디\YOLOv5\yolov5\datasets\coco128\labels\train2017... 126
val: New cache created: C:\Users\jj\Desktop\AI\YOLOv5\yolov5\datasets\coco128\labels\train2017.cache
                 Class     Images  Instances          P          R      mAP50   mAP50-95: 100%|██
                   all        128        929      0.669      0.661      0.712      0.472
Speed: 0.6ms pre-process, 9.2ms inference, 2.2ms NMS per image at shape (1, 3, 640, 640)
Results saved to runs\val\exp
YOLOv5  v7.0-271-g9abbef5 Python-3.9.6 torch-1.9.0+cu111 CUDA:0 (NVIDIA GeForce GTX 1080, 8192MiB)
Fusing layers... 
YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients, 16.4 GFLOPs

PyTorch: starting from yolov5s.pt with output shape (1, 25200, 85) (14.1 MB)

TorchScript: starting export with torch 1.9.0+cu111...
TorchScript: export success  1.7s, saved as yolov5s.torchscript (28.0 MB)

Export complete (2.1s)
Results saved to C:\Users\jj\Desktop\AI\YOLOv5\yolov5\yolov5
Detect:          python detect.py --weights yolov5s.torchscript
Validate:        python val.py --weights yolov5s.torchscript
PyTorch Hub:     model = torch.hub.load('ultralytics/yolov5', 'custom', 'yolov5s.torchscript')    
Visualize:       https://netron.app
YOLOv5  v7.0-271-g9abbef5 Python-3.9.6 torch-1.9.0+cu111 CUDA:0 (NVIDIA GeForce GTX 1080, 8192MiB)
Loading yolov5s.torchscript for TorchScript inference...
val: Scanning C:\Users\jj\Desktop\AI스터디\YOLOv5\yolov5\datasets\coco128\labels\train2017.cache.
                 Class     Images  Instances          P          R      mAP50   mAP50-95: 100%|██ 
                   all        128        929      0.669      0.661      0.712      0.472
Speed: 0.5ms pre-process, 8.1ms inference, 2.0ms NMS per image at shape (1, 3, 640, 640)
Results saved to runs\val\exp2
YOLOv5  v7.0-271-g9abbef5 Python-3.9.6 torch-1.9.0+cu111 CUDA:0 (NVIDIA GeForce GTX 1080, 8192MiB)
Fusing layers... 
YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients, 16.4 GFLOPs

PyTorch: starting from yolov5s.pt with output shape (1, 25200, 85) (14.1 MB)
requirements: Ultralytics requirement ['onnx>=1.12.0'] not found, attempting AutoUpdate...        
requirements: ❌ 'utf-8' codec can't decode byte 0xbd in position 155: invalid start byte

ONNX: starting export with onnx 1.15.0...
ONNX: export success  16.9s, saved as yolov5s.onnx (28.0 MB)

Export complete (17.2s)
Results saved to C:\Users\jj\Desktop\AI\YOLOv5\yolov5\yolov5
Detect:          python detect.py --weights yolov5s.onnx
Validate:        python val.py --weights yolov5s.onnx
PyTorch Hub:     model = torch.hub.load('ultralytics/yolov5', 'custom', 'yolov5s.onnx')
Visualize:       https://netron.app
YOLOv5  v7.0-271-g9abbef5 Python-3.9.6 torch-1.9.0+cu111 CUDA:0 (NVIDIA GeForce GTX 1080, 8192MiB)
Loading yolov5s.onnx for ONNX Runtime inference...
requirements: Ultralytics requirement ['onnxruntime-gpu'] not found, attempting AutoUpdate...
requirements: ❌ 'utf-8' codec can't decode byte 0xbd in position 493: invalid start byte
Forcing --batch-size 1 square inference (1,3,640,640) for non-PyTorch models
val: Scanning C:\Users\jj\Desktop\AI스터디\YOLOv5\yolov5\datasets\coco128\labels\train2017.cache.
                 Class     Images  Instances          P          R      mAP50   mAP50-95: 100%|██ 
                   all        128        929      0.669      0.661      0.712      0.472
Speed: 0.5ms pre-process, 19.7ms inference, 1.9ms NMS per image at shape (1, 3, 640, 640)
Results saved to runs\val\exp3
WARNING  Benchmark failure for OpenVINO: inference not supported on GPU
YOLOv5  v7.0-271-g9abbef5 Python-3.9.6 torch-1.9.0+cu111 CUDA:0 (NVIDIA GeForce GTX 1080, 8192MiB)
Fusing layers... 
YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients, 16.4 GFLOPs

PyTorch: starting from yolov5s.pt with output shape (1, 25200, 85) (14.1 MB)
TensorRT: export failure  0.0s: No module named 'tensorrt'
WARNING  Benchmark failure for TensorRT: list index out of range
WARNING  Benchmark failure for CoreML: inference only supported on macOS>=10.13
YOLOv5  v7.0-271-g9abbef5 Python-3.9.6 torch-1.9.0+cu111 CUDA:0 (NVIDIA GeForce GTX 1080, 8192MiB)
Fusing layers... 
YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients, 16.4 GFLOPs

PyTorch: starting from yolov5s.pt with output shape (1, 25200, 85) (14.1 MB)
requirements: Ultralytics requirement ['tensorflow'] not found, attempting AutoUpdate...
  WARNING: Failed to remove contents in a temporary directory 'C:\Users\jj\Desktop\AI스터디\YOLOv5\yolov5\Lib\site-packages\google\~upb'.
  You can safely remove it manually.
requirements: ❌ 'utf-8' codec can't decode byte 0xbd in position 581: invalid start byte
WARNING:tensorflow:From C:\Users\jj\Desktop\AI스터디\YOLOv5\yolov5\lib\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.


TensorFlow SavedModel: starting export with tensorflow 2.15.0...
WARNING  using Tensorflow 2.15.0 > 2.13.1 might cause issue when exporting the model to tflite https://github.com/ultralytics/yolov5/issues/12489

                 from  n    params  module                                  arguments

WARNING:tensorflow:From C:\Users\jj\Desktop\AI스터디\YOLOv5\yolov5\lib\site-packages\keras\src\backend.py:873: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.

  0                -1  1      3520  models.common.Conv                      [3, 32, 6, 2, 2]      

  1                -1  1     18560  models.common.Conv                      [32, 64, 3, 2]        

  2                -1  1     18816  models.common.C3                        [64, 64, 1]

  3                -1  1     73984  models.common.Conv                      [64, 128, 3, 2]       

  4                -1  1    115712  models.common.C3                        [128, 128, 2]

  5                -1  1    295424  models.common.Conv                      [128, 256, 3, 2]      

  6                -1  1    625152  models.common.C3                        [256, 256, 3]

  7                -1  1   1180672  models.common.Conv                      [256, 512, 3, 2]      

  8                -1  1   1182720  models.common.C3                        [512, 512, 1]

WARNING:tensorflow:From C:\Users\jj\Desktop\AI스터디\YOLOv5\yolov5\lib\site-packages\keras\src\layers\pooling\max_pooling2d.py:161: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

  9                -1  1    656896  models.common.SPPF                      [512, 512, 5]

 10                -1  1    131584  models.common.Conv                      [512, 256, 1, 1]      

 11                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']  

 12           [-1, 6]  1         0  models.common.Concat                    [1]

 13                -1  1    361984  models.common.C3                        [512, 256, 1, False]  

 14                -1  1     33024  models.common.Conv                      [256, 128, 1, 1]      

 15                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']  

 16           [-1, 4]  1         0  models.common.Concat                    [1]

 17                -1  1     90880  models.common.C3                        [256, 128, 1, False]  

 18                -1  1    147712  models.common.Conv                      [128, 128, 3, 2]      

 19          [-1, 14]  1         0  models.common.Concat                    [1]

 20                -1  1    296448  models.common.C3                        [256, 256, 1, False]  

 21                -1  1    590336  models.common.Conv                      [256, 256, 3, 2]      

 22          [-1, 10]  1         0  models.common.Concat                    [1]

 23                -1  1   1182720  models.common.C3                        [512, 512, 1, False]  

 24      [17, 20, 23]  1    229245  models.yolo.Detect                      [80, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [128, 256, 512], [640, 640]] 
Model: "model"
__________________________________________________________________________________________________ Layer (type)                Output Shape                 Param #   Connected to
================================================================================================== input_1 (InputLayer)        [(1, 640, 640, 3)]           0         []

 tf_conv (TFConv)            (1, 320, 320, 32)            3488      ['input_1[0][0]']

 tf_conv_1 (TFConv)          (1, 160, 160, 64)            18496     ['tf_conv[0][0]']

 tfc3 (TFC3)                 (1, 160, 160, 64)            18624     ['tf_conv_1[0][0]']

 tf_conv_7 (TFConv)          (1, 80, 80, 128)             73856     ['tfc3[0][0]']

 tfc3_1 (TFC3)               (1, 80, 80, 128)             115200    ['tf_conv_7[0][0]']

 tf_conv_15 (TFConv)         (1, 40, 40, 256)             295168    ['tfc3_1[0][0]']

 tfc3_2 (TFC3)               (1, 40, 40, 256)             623872    ['tf_conv_15[0][0]']

 tf_conv_25 (TFConv)         (1, 20, 20, 512)             1180160   ['tfc3_2[0][0]']

 tfc3_3 (TFC3)               (1, 20, 20, 512)             1181184   ['tf_conv_25[0][0]']

 tfsppf (TFSPPF)             (1, 20, 20, 512)             656128    ['tfc3_3[0][0]']

 tf_conv_33 (TFConv)         (1, 20, 20, 256)             131328    ['tfsppf[0][0]']

 tf_upsample (TFUpsample)    (1, 40, 40, 256)             0         ['tf_conv_33[0][0]']

 tf_concat (TFConcat)        (1, 40, 40, 512)             0         ['tf_upsample[0][0]',
                                                                     'tfc3_2[0][0]']

 tfc3_4 (TFC3)               (1, 40, 40, 256)             361216    ['tf_concat[0][0]']

 tf_conv_39 (TFConv)         (1, 40, 40, 128)             32896     ['tfc3_4[0][0]']

 tf_upsample_1 (TFUpsample)  (1, 80, 80, 128)             0         ['tf_conv_39[0][0]']

 tf_concat_1 (TFConcat)      (1, 80, 80, 256)             0         ['tf_upsample_1[0][0]',       
                                                                     'tfc3_1[0][0]']

 tfc3_5 (TFC3)               (1, 80, 80, 128)             90496     ['tf_concat_1[0][0]']

 tf_conv_45 (TFConv)         (1, 40, 40, 128)             147584    ['tfc3_5[0][0]']

 tf_concat_2 (TFConcat)      (1, 40, 40, 256)             0         ['tf_conv_45[0][0]',
                                                                     'tf_conv_39[0][0]']

 tfc3_6 (TFC3)               (1, 40, 40, 256)             295680    ['tf_concat_2[0][0]']

 tf_conv_51 (TFConv)         (1, 20, 20, 256)             590080    ['tfc3_6[0][0]']

 tf_concat_3 (TFConcat)      (1, 20, 20, 512)             0         ['tf_conv_51[0][0]',
                                                                     'tf_conv_33[0][0]']

 tfc3_7 (TFC3)               (1, 20, 20, 512)             1181184   ['tf_concat_3[0][0]']

 tf_detect (TFDetect)        ((1, 25200, 85),             229245    ['tfc3_5[0][0]',
                             )                                       'tfc3_6[0][0]',
                                                                     'tfc3_7[0][0]']

==================================================================================================Total params: 7225885 (27.56 MB)
Trainable params: 0 (0.00 Byte)
Non-trainable params: 7225885 (27.56 MB)
__________________________________________________________________________________________________TensorFlow SavedModel: export failure  78.0s: yolov5s_saved_model\variables is not a directory
WARNING  Benchmark failure for TensorFlow SavedModel: list index out of range
YOLOv5  v7.0-271-g9abbef5 Python-3.9.6 torch-1.9.0+cu111 CUDA:0 (NVIDIA GeForce GTX 1080, 8192MiB)
Fusing layers... 
YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients, 16.4 GFLOPs

PyTorch: starting from yolov5s.pt with output shape (1, 25200, 85) (14.1 MB)

TensorFlow SavedModel: starting export with tensorflow 2.15.0...
WARNING  using Tensorflow 2.15.0 > 2.13.1 might cause issue when exporting the model to tflite https://github.com/ultralytics/yolov5/issues/12489

                 from  n    params  module                                  arguments

  0                -1  1      3520  models.common.Conv                      [3, 32, 6, 2, 2]      

  1                -1  1     18560  models.common.Conv                      [32, 64, 3, 2]        

  2                -1  1     18816  models.common.C3                        [64, 64, 1]

  3                -1  1     73984  models.common.Conv                      [64, 128, 3, 2]       

  4                -1  1    115712  models.common.C3                        [128, 128, 2]

  5                -1  1    295424  models.common.Conv                      [128, 256, 3, 2]      

  6                -1  1    625152  models.common.C3                        [256, 256, 3]

  7                -1  1   1180672  models.common.Conv                      [256, 512, 3, 2]      

  8                -1  1   1182720  models.common.C3                        [512, 512, 1]

  9                -1  1    656896  models.common.SPPF                      [512, 512, 5]

 10                -1  1    131584  models.common.Conv                      [512, 256, 1, 1]      

 11                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']  

 12           [-1, 6]  1         0  models.common.Concat                    [1]

 13                -1  1    361984  models.common.C3                        [512, 256, 1, False]  

 14                -1  1     33024  models.common.Conv                      [256, 128, 1, 1]      

 15                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']  

 16           [-1, 4]  1         0  models.common.Concat                    [1]

 17                -1  1     90880  models.common.C3                        [256, 128, 1, False]  

 18                -1  1    147712  models.common.Conv                      [128, 128, 3, 2]      

 19          [-1, 14]  1         0  models.common.Concat                    [1]

 20                -1  1    296448  models.common.C3                        [256, 256, 1, False]  

 21                -1  1    590336  models.common.Conv                      [256, 256, 3, 2]      

 22          [-1, 10]  1         0  models.common.Concat                    [1]

 23                -1  1   1182720  models.common.C3                        [512, 512, 1, False]  

 24      [17, 20, 23]  1    229245  models.yolo.Detect                      [80, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [128, 256, 512], [640, 640]] 
Model: "model_1"
__________________________________________________________________________________________________ Layer (type)                Output Shape                 Param #   Connected to
================================================================================================== input_2 (InputLayer)        [(1, 640, 640, 3)]           0         []

 tf_conv_57 (TFConv)         (1, 320, 320, 32)            3488      ['input_2[0][0]']

 tf_conv_58 (TFConv)         (1, 160, 160, 64)            18496     ['tf_conv_57[0][0]']

 tfc3_8 (TFC3)               (1, 160, 160, 64)            18624     ['tf_conv_58[0][0]']

 tf_conv_64 (TFConv)         (1, 80, 80, 128)             73856     ['tfc3_8[0][0]']

 tfc3_9 (TFC3)               (1, 80, 80, 128)             115200    ['tf_conv_64[0][0]']

 tf_conv_72 (TFConv)         (1, 40, 40, 256)             295168    ['tfc3_9[0][0]']

 tfc3_10 (TFC3)              (1, 40, 40, 256)             623872    ['tf_conv_72[0][0]']

 tf_conv_82 (TFConv)         (1, 20, 20, 512)             1180160   ['tfc3_10[0][0]']

 tfc3_11 (TFC3)              (1, 20, 20, 512)             1181184   ['tf_conv_82[0][0]']

 tfsppf_1 (TFSPPF)           (1, 20, 20, 512)             656128    ['tfc3_11[0][0]']

 tf_conv_90 (TFConv)         (1, 20, 20, 256)             131328    ['tfsppf_1[0][0]']

 tf_upsample_2 (TFUpsample)  (1, 40, 40, 256)             0         ['tf_conv_90[0][0]']

 tf_concat_4 (TFConcat)      (1, 40, 40, 512)             0         ['tf_upsample_2[0][0]',       
                                                                     'tfc3_10[0][0]']

 tfc3_12 (TFC3)              (1, 40, 40, 256)             361216    ['tf_concat_4[0][0]']

 tf_conv_96 (TFConv)         (1, 40, 40, 128)             32896     ['tfc3_12[0][0]']

 tf_upsample_3 (TFUpsample)  (1, 80, 80, 128)             0         ['tf_conv_96[0][0]']

 tf_concat_5 (TFConcat)      (1, 80, 80, 256)             0         ['tf_upsample_3[0][0]',       
                                                                     'tfc3_9[0][0]']

 tfc3_13 (TFC3)              (1, 80, 80, 128)             90496     ['tf_concat_5[0][0]']

 tf_conv_102 (TFConv)        (1, 40, 40, 128)             147584    ['tfc3_13[0][0]']

 tf_concat_6 (TFConcat)      (1, 40, 40, 256)             0         ['tf_conv_102[0][0]',
                                                                     'tf_conv_96[0][0]']

 tfc3_14 (TFC3)              (1, 40, 40, 256)             295680    ['tf_concat_6[0][0]']

 tf_conv_108 (TFConv)        (1, 20, 20, 256)             590080    ['tfc3_14[0][0]']

 tf_concat_7 (TFConcat)      (1, 20, 20, 512)             0         ['tf_conv_108[0][0]',
                                                                     'tf_conv_90[0][0]']

 tfc3_15 (TFC3)              (1, 20, 20, 512)             1181184   ['tf_concat_7[0][0]']

 tf_detect_1 (TFDetect)      ((1, 25200, 85),             229245    ['tfc3_13[0][0]',
                             )                                       'tfc3_14[0][0]',
                                                                     'tfc3_15[0][0]']

==================================================================================================Total params: 7225885 (27.56 MB)
Trainable params: 0 (0.00 Byte)
Non-trainable params: 7225885 (27.56 MB)
__________________________________________________________________________________________________TensorFlow SavedModel: export failure  5.4s: yolov5s_saved_model\variables is not a directory

TensorFlow GraphDef: starting export with tensorflow 2.15.0...
TensorFlow GraphDef: export failure  0.0s: 'NoneType' object has no attribute 'inputs'
WARNING  Benchmark failure for TensorFlow GraphDef: list index out of range
WARNING  Benchmark failure for TensorFlow Lite: inference not supported on GPU
WARNING  Benchmark failure for TensorFlow Edge TPU: inference not supported
WARNING  Benchmark failure for TensorFlow.js: inference not supported
YOLOv5  v7.0-271-g9abbef5 Python-3.9.6 torch-1.9.0+cu111 CUDA:0 (NVIDIA GeForce GTX 1080, 8192MiB)
Fusing layers... 
YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients, 16.4 GFLOPs

PyTorch: starting from yolov5s.pt with output shape (1, 25200, 85) (14.1 MB)
requirements: Ultralytics requirements ['paddlepaddle', 'x2paddle'] not found, attempting AutoUpdate...
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow-intel 2.15.0 requires protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3, but you have protobuf 3.20.2 which is incompatible.
requirements: ❌ 'utf-8' codec can't decode byte 0xbd in position 428: invalid start byte
PaddlePaddle: export failure  19.3s: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated 
with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
WARNING  Benchmark failure for PaddlePaddle: list index out of range


benchmarks: weights=yolov5s.pt, imgsz=640, batch_size=1, data=C:\Users\jj\Desktop\AI\YOLOv5\yolov5\yolov5\data\coco128.yaml, device=0, half=False, test=False, pt_only=False, hard_fail=False       
Checking setup...
YOLOv5  v7.0-271-g9abbef5 Python-3.9.6 torch-1.9.0+cu111 CUDA:0 (NVIDIA GeForce GTX 1080, 8192MiB)Setup complete  (6 CPUs, 15.9 GB RAM, 433.8/465.0 GB disk)

Benchmarks complete (170.30s)
                   Format  Size (MB)  mAP50-95  Inference time (ms)
0                 PyTorch       14.1    0.4715                 9.16
1             TorchScript       28.0    0.4715                 8.13
2                    ONNX       28.0    0.4715                19.73
3                OpenVINO        NaN       NaN                  NaN
4                TensorRT        NaN       NaN                  NaN
5                  CoreML        NaN       NaN                  NaN
6   TensorFlow SavedModel        NaN       NaN                  NaN
7     TensorFlow GraphDef        NaN       NaN                  NaN
8         TensorFlow Lite        NaN       NaN                  NaN
9     TensorFlow Edge TPU        NaN       NaN                  NaN
10          TensorFlow.js        NaN       NaN                  NaN
11           PaddlePaddle        NaN       NaN                  NaN
728x90
반응형
LIST

'개발' 카테고리의 다른 글

YOLOv5: Export.py  (0) 2024.01.15
YOLOv5 갖고 놀기  (0) 2024.01.14
YOLOv5 개발환경 구축하기  (0) 2024.01.12
YOLOv5 to tflite  (0) 2024.01.10
플러터참조  (0) 2024.01.10