Frame on Frame RAM Increase Using PyBindings for 3.1.0 Converting EXR To Uncompressed PNG
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- computer-graphics
Hướng nghiên cứu
Bắt đầu với script chuyển đổi Python được cung cấp và tái hiện các lần chuyển đổi EXR-to-uncompressed-PNG lặp lại trên Windows, đồng thời so sánh mức sử dụng bộ nhớ với EXR-to-TIFF và oiiotool.exe. Điều tra Python binding và đường dẫn PNG để xác định lý do RAM tăng giữa các frame; công việc được xem là hoàn tất khi xác định được nguyên nhân và xác nhận bộ nhớ ổn định qua các lần chuyển đổi lặp lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- C++
- Star
- 2.4k
- Fork
- 718
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 87
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AcademySoftwareFoundation/OpenImageIO
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
AcademySoftwareFoundation/OpenImageIO#5658 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: deep paste wraps into the next scanline instead of clipping, and ignores chbeginCó thể đã có người làm @lgritz đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
AcademySoftwareFoundation/OpenImageIO#5649 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: make_kernel("binomial", ...) indexes its tap arrays past their allocation for even or fractional extentsCó thể đã có người làm @lgritz đã nhận 1 ngày trước. Đang mở
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 62/100
AcademySoftwareFoundation/OpenImageIO#5648 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
AcademySoftwareFoundation/OpenImageIO#5619 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
AcademySoftwareFoundation/OpenImageIO#5570 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của AcademySoftwareFoundation/OpenImageIO
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
SCIInstitute/SCIRun#2909 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug libcudf
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Triage: Needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 2 ngày