Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

OSError: cannot identify image file <_io.BytesIO object at 0x7fc87f2ec678>

オープン
#43 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python, tensorflow

調査の方向性

まず、labels.npz を使って tf_record_generation.py のドキュメント化されたサンプルコマンドを実行し、次に Image.open の呼び出し部分にある create_tf_example と、それが受け取る入力を調べます。コマンドが OSError なしで完了し、要求されたトレーニングおよび評価用のレコードファイルが生成されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

I'm following the Example Use: A building detector with TensorFlow API, and ran into an error when trying to generate the training/eval data.

System information

** What is the top-level directory of the model you are using: **
~/tensorflow/models/research/object_detection

OS Platform and Distribution: Linux Ubuntu 16.04, Elementary OS

TensorFlow installed from (source or binary): pip install tensorflow-gpu

TensorFlow version: v1.5.0

Python version: v3.6.0

CUDA/cuDNN version: CUDA 9.0, cudnn 7.0, nVidia driver: 384.111

GPU: nVidia GeForce GTX 1070 Ti 8GB memory

CPU: Intel x86-64 Intel Core i5-6400K @ 2.70GHz x 4, 16GB memory

Exact command to reproduce:

python tf_record_generation.py --label_input=labels.npz              --train_rd_path=data/train_buildings.record              --test_rd_path=data/test_buildings.record

Sample code / logs:

python tf_record_generation.py --label_input=labels.npz              --train_rd_path=data/train_buildings.record              --test_rd_path=data/test_buildings.record
You have 221 training tiles and 144 test tiles ready
Traceback (most recent call last):
  File "tf_record_generation.py", line 172, in <module>
    tf.app.run()
  File "/home/xban/.pyenv/versions/general/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 124, in run
    _sys.exit(main(argv))
  File "tf_record_generation.py", line 143, in main
    tf_example = create_tf_example(group, train_dir)
  File "tf_record_generation.py", line 56, in create_tf_example
    image = Image.open(encoded_jpg_io)
  File "/home/xban/.pyenv/versions/general/lib/python3.6/site-packages/PIL/Image.py", line 2572, in open
    % (filename if filename else fp))
OSError: cannot identify image file <_io.BytesIO object at 0x7fc87f2ec678>
主要言語
Python
スター
472
フォーク
106
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

developmentseed/label-maker のほかの issue

developmentseed/label-maker の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。