LoginSignup
2
0

More than 1 year has passed since last update.

Yolov7でエラーが出た時の解決法

Last updated at Posted at 2022-10-10

大丈夫です。すぐ解決できます。

エラー1:"_pickle.UnpicklingError: STACK_GLOBAL requires str"

Yolov7で、「さあ、トレーニングしよう」というときにこのエラーが出てがっかりすること、ありますよね。

"_pickle.UnpicklingError: STACK_GLOBAL requires str"

datasetのcacheファイルを削除すればいいだけです。

os.remove('my_dataset/labels/train.cache')
os.remove('my_dataset/labels/val.cache')

これでもう一度train.pyを実行すれば、うまくいくはずです。

エラー2:"Command 'git tag' returned non-zero exit status 128."

Command 'git tag' returned non-zero exit status 128.

models/experimental.py の251行目をコメントアウトしましょう。

models/experimental.py
#  attempt_download(w)

きっと解決します。

エラー3:"RuntimeError: CUDA out of memory. Tried to allocate XXX GiB ..."

RuntimeError: CUDA out of memory. Tried to allocate XXX GiB ...

GPUのメモリが不足すると出ます。特に、img-size 1280のモデルを使うと、メモリが不足しやすいです。
--batch-size を小さくしてtrain.pyを再実行しましょう。例えば32→16
小さくしても出る場合は、さらに小さくして、トレーニングが開始されるまで試してみましょう。16→8→4→2

理力があなたと共にありますように。

🐣


フリーランスエンジニアです。
お仕事のご相談こちらまで
rockyshikoku@gmail.com

機械学習、ARアプリ(Web/iOS)を作っています。
機械学習/AR関連の情報を発信しています。

Twitter
Medium
GitHub

2
0
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
2
0