New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JPEG2000 encoding/decoding fails when running in multiprocessing pool #22974
Labels
Comments
Could you attach |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System Information
Python version: 3.10.6
OpenCV Python version: 4.6.0.66
Operating System / Platform: Windows 11
Detailed description
When rapidly encoding and decoding images using the
cv.imencode(".jp2")
Python method inside a multiprocessing pool, the resulting image is somehow corrupted, as calls tocv.imdecode(buffer)
log several errors in a non-deterministic way.The kind of error depends on the images that are used.
For instance, when using the CIFAR-10 dataset, this is the error that is reported:
Other images from different sources produce other errors. For instance, another image produces this error log:
The image which produces this comes from the FRGC Morphs dataset (in particular
FRGC-Morphs\morph_facemorpher\04482d96.jpg_04493d86.jpg.jpg
).Also, this issue isn't present (or at least no errors are printed) when not calling
cv.imdecode(buffer)
or not using the multiprocessing pool.Steps to reproduce
Run this piece of code (you may need to change the
all_files
variable accordingly; the important thing is that more than one worker must be busy, preferably all); the console should report the mentioned OpenCV errors.Issue submission checklist
The text was updated successfully, but these errors were encountered: