-
Notifications
You must be signed in to change notification settings - Fork 11
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
ImageIO Benchmarks #21
Comments
That's awesome. Just this morning I discovered via profiling that the biggest contributor to ImageMagick's slowness for small files is extracting the pixel depth, which is a single For the smallest images, JuliaIO/FileIO.jl#295 will improve matters even further. It's noteworthy that for TIFF, 10x10 and 100x100 are almost the same speed. That might merit some investigation, eventually. |
With my recent JpegTurbo.jl development, I noticed that only benchmarking with randomly generated images can be quite misleading; many image compression tricks work only when there exist overlaps between meaningful blocks and patches. Thus I would suggest adding more test images of the same size and plotting the median result of those samples when we regenerate the graphs. |
Absolutely. Note that PNGFiles.jl now has automated CI benchmarking set up JuliaIO/PNGFiles.jl#52 i.e. see the report here that asserted there was no performance change in this PR JuliaIO/PNGFiles.jl#51 (comment) But that is currently using random images, and @Drvi already suggested they should be replaced with test images. Perhaps we should set the same thing up for ImageIO with TestImages vs. each backend |
We just need to add a few high-resolution test images to TestImages.jl... Among those widely used test image dataset, I know there's DIV2k but it's licensed for academic purposes only, do you have any suggestions on where we can find such test images? |
NASA? |
It's been a goal of mine for awhile to add automated CI benchmarking to But I agree with @johnnychen94 that it makes sense to use real images in addition to randomly-generated ones. |
Performance benchmarks are used for two purposes: 1) test against other similar packages, which can usually be written in other languages, and 2) regression test For benchmark CI such as JuliaIO/PNGFiles.jl#52, it is used to track if PRs/releases are slowing things down. For benchmark scripts like this issue, JuliaIO/JpegTurbo.jl#15, and the one @timholy created in https://github.com/JuliaImages/image_benchmarks, it's used for advertising purposes to convince people that we're doing great stuff. Also to prepare for JuliaImages 1.0, we definitely need such benchmarks.
Unless we move all packages into one gigantic monorepo, benchmark CIs for regression tests should still be put together with the source codes. On the other hand, I prefer to have the "benchmark against other frameworks" codes stay in one repo as @timholy already did. I haven't yet committed to https://github.com/JuliaImages/image_benchmarks because the codes there are not very extensible/flexible in the sense that it's not always easy to switch on/off certain cases. Thus if we keep adding more benchmark cases there, we'll soon reach a status that it takes too long to get the result of interest. This is quite similar to the DemoCards I made for https://juliaimages.org/stable/examples/; that we can easily create an ad-hoc version of benchmark/demo scripts that works at first, but it's always a pain to convince/guide others to contribute benchmark/demo cases using the ad-hoc undocumented framework. Some discussion on this can be found in JuliaImages/Images.jl#947 and I also have a very draft experiment in johnnychen94/Workflows.jl#1, but I certainly don't have enough time to finish it... Maybe we can propose this as this year's GSoC project by updating https://julialang.org/jsoc/gsoc/images/? |
I'm supportive of changes to the architecture of Consequently, anything that you want to live "forever" and be primarily focused on within-Julia performance I would put elsewhere. I'm happy to rename that repo if that would help, e.g., |
Some benchmarks for FileIO
save
andload
functions with the different Image IO backends, log x axis, because ImageMagick can be a lot slower.All defaults, no kwargs.
This is with
FileIO JuliaIO/FileIO.jl#290
ImageMagick
v0.7.6
QuartzImageIO
v0.7.3
ImageIO
v0.5.1
TiffImages
v0.2.2
PNGFiles
v0.3.6
Benchmark code
cc. @tlnagy @timholy @Drvi
The text was updated successfully, but these errors were encountered: