Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问是否可以将darknet-tiny-yolov4的weights文件转换成.h5? #33

Open
B1D1ng opened this issue Aug 22, 2020 · 2 comments
Open

Comments

@B1D1ng
Copy link

B1D1ng commented Aug 22, 2020

我尝试执行convert.py转换darknet的yolov4-tiny weights,输出如下:

Weights Header:  0 2 5 [1280000]
Converting  0
Converting  1
Converting  2
Converting  3
Converting  4
Converting  5
Converting  6
Converting  7
Converting  8
Converting  9
Converting  10
Converting  11
Converting  12
Converting  13
Converting  14
Converting  15
Converting  16
Converting  17
Converting  18
Converting  19
Converting  20
Converting  21
Converting  22
Converting  23
Converting  24
Converting  25
Converting  26
Converting  27
Converting  28
Converting  29
Converting  30
Converting  31
Converting  32
Converting  33
Converting  34
Converting  35
Converting  36
Converting  37
Converting  38
Converting  39
Converting  40
Converting  41
Converting  42
Converting  43
Converting  44
Converting  45
Converting  46
Converting  47
Converting  48
Traceback (most recent call last):
  File "convert.py", line 173, in <module>
    yolo4_model = Yolo4(score, iou, anchors_path, classes_path, model_path, weights_path)
  File "convert.py", line 157, in __init__
    self.load_yolo()
  File "convert.py", line 130, in load_yolo
    buffer=weights_file.read(weights_size * 4))
TypeError: buffer is too small for requested array
@zongzong0408
Copy link

zongzong0408 commented Jan 19, 2023

請問解決了嗎 ? 我也遇到同樣的問題。

@zongzong0408
Copy link

zongzong0408 commented Jan 25, 2023

Hi,我利用這個資料庫可以成功轉檔。
keras-YOLOv3-model-set
你可以利用其中的 tools/model_converter/convert.py 去轉換 yolov4-tiny.weight -> yolov4-tiny.h5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants