Frame on Frame RAM Increase Using PyBindings for 3.1.0 Converting EXR To Uncompressed PNG
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
調査の方向性
提供されたPython変換スクリプトから始め、Windows上でEXR-to-uncompressed-PNG変換を繰り返し再現し、EXR-to-TIFFおよびoiiotool.exeとメモリ使用量を比較します。Python bindingとPNGパスを調査し、フレーム間でRAMが増加する理由を特定します。原因を特定し、変換を繰り返してもメモリが安定することを確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I'm using the Python Bindings for 3.1.0 with Python 3.10.6 on Windows and getting increasing RAM usage with the script below which converts exrs to pngs - about 1Gb for every frame processed. For context, the original .exr is circa 20k x 2k so is pretty large. This doesn't seem to be a problem for oiiotool.exe (3.1.0) which does the same process perfectly with no increase in RAM usage frame by frame. It's also not a problem if I convert from .exr to .tiff so it does seem to be specific to png. Obvious answer is to switch from png to tiff which I will do but felt I should at least make a record of this here.
import OpenImageIO as oiio
def convert_exr_to_png(exr_file, png_file):
# Open the EXR file
input_image = oiio.ImageInput.open(exr_file)
if not input_image:
print("Error opening EXR file:", oiio.geterror())
return
# Read the image data
spec = input_image.spec()
pixels = input_image.read_image()
input_image.close()
# Create the output PNG file
output_image = oiio.ImageOutput.create(png_file)
if not output_image:
print("Error creating PNG file:", oiio.geterror())
return
# Set the compression level to 0 (no compression)
spec.attribute("png:compressionLevel", 0)
spec.attribute("png:filter", 8)
#spec.attribute("oiio:ColorSpace", "sRGB")
# Open the output PNG file
output_image.open(png_file, spec)
# Write the image data to the PNG file
output_image.write_image(pixels)
# Close the output image
output_image.close()
pixels = None
print(f"Successfully converted {exr_file} to {png_file} with no compression.")
for x in range(1, 2701):
frame = str(x).zfill(4)
exr = f"//flabby/jobs/client_62185/build/virtual_set/comps/openimage/stitchhalfres/stitch_v021.{frame}.exr"
png = f"//flabby/jobs/client_62185/build/virtual_set/comps/openimage/stitchdebug/stitchcspace_v021.{frame}.png"
convert_exr_to_png(exr, png)
print("Processed Frame: ", x)
- 主要言語
- C++
- スター
- 2.4k
- フォーク
- 718
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 85
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AcademySoftwareFoundation/OpenImageIO のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
AcademySoftwareFoundation/OpenImageIO#5662 ·
メンテナーはふだん 2 日以内に返信
-
bug: copy() writes destination channels the source does not have, taking the values from past the source's pixel対応中かも @lgritz が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
AcademySoftwareFoundation/OpenImageIO#5661 ·
メンテナーはふだん 2 日以内に返信
-
bug: a malformed filename throws std::regex_error out of ImageCache, and catching it deadlocks the file cache対応中かも @lgritz が今日担当しました。 オープン
AcademySoftwareFoundation/OpenImageIO#5660 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
PSD: layers with a "real user supplied layer mask" (channel -3) stored as Raw fail to load ("unsupported compression")対応中かも @linsen458-spec が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
AcademySoftwareFoundation/OpenImageIO#5659 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
bug: deep paste wraps into the next scanline instead of clipping, and ignores chbegin対応中かも @lgritz が 2 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
AcademySoftwareFoundation/OpenImageIO#5649 ·
メンテナーはふだん 2 日以内に返信
AcademySoftwareFoundation/OpenImageIO の issue をすべて見る
似ている issue
-
documentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
QuantStack/git2cpp#203 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
BaptisteHudyma/Lamp-Da#588 ·
メンテナーはふだん 1 日以内に返信
-
bug macOS networking
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
docling-project/docling-parse#448 ·
メンテナーはふだん 5 日以内に返信