https://github.com/deep-diver/soccer-ball-detection-yolov2
我得到了加载yolo。
断言:期望202335260字节,找到203934260
但是,当我使用默认数据集运行相同的命令时,它起作用。我从https://drive.google.com/drive/folders/0B1TW_VTY7ONIDEWYQ2FTQVPLWLWEU
下载了权重文件。我在./darkflow/utils/loader.py
文件中修改了self.offset = 16
行,然后用self.offset = 20
替换。但无法解决问题。
我如何解决此问题?
只是添加到 @ zrufy的答案中
class weights_walker(object):
"""incremental reader of float32 binary files"""
def __init__(self, path):
self.eof = False # end of file
self.path = path # current pos
if path is None:
self.eof = True
return
else:
self.size = os.path.getsize(path)# save the path
major, minor, revision, seen = np.memmap(path,
shape = (), mode = 'r', offset = 0,
dtype = '({})i4,'.format(4))
self.transpose = major > 1000 or minor > 1000
self.offset = 16 + 203934260 - 202335260
进行更改,以使最后一行是形式的
self.offset = 16 + found_value - expected_value
stud_value和Expect_value可以从您面临的断言错误中获取。
我遇到了同样的问题,并在Ign0rele的帮助下解决了它。您可以在https://github.com/deep-diver/soccer-ball-detection-yolov2/issues/3
中找到细节基本上,发生在您的网络配置(.cfg)和权重文件(.waights)不匹配的情况下。,我认为此存储库中的CFG文件对于官方的权重文件是不正确的。<<<<<<<<<<<<<<<<<<<<<<<<<<
请尝试此权重文件
https://pjreddie.com/media/files/yolov2.weights
使用此CFG文件IGN0RELEE放置在发行页面
希望您运气
您需要从16
更改为20
的方法self.offset
不起作用。此错误的唯一工作方法是:
updated self.offset = old_offset_value + (found_value - expected_value)
例如,在您的案例中放置在self.offset中,而不是16:
16+(203934260-202314760)
让我知道!