6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

darkflowでAssertionErrorが出た場合の対処

Posted at

tensorflow版のyolov2:https://github.com/thtrieu/darkflowにて
本家のYOLOで学習させたmodeとcfgを用いて、predictをやろうとすると以下のエラーが出た。

AssertionError: expect 202314760 bytes, found 202314764

↑4byteだけ違う。
4byteどころではなく明らかに数値が違った場合はおそらくtrain時のcfgとpredict時のcfgが異なっている

対処方法は、darkflow/darkflow/utils/loader.pyの121行目

loader.py(121行目)
self.offset = 16

となっているところを

self.offset = 20

に書き換えれば直る。

参考

6
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?