We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Looks like jpeg and png are faster than magick for reading images. We should probably use them instead:
jpeg
png
file <- "~/Downloads/tiny-imagenet/tiny-imagenet-200/train/n01443537/images/n01443537_0.JPEG" bench::mark( jpeg = jpeg::readJPEG(file), magick = as.integer(magick::image_data(magick::image_read(file), "rgb"))/255, check = FALSE ) #> # A tibble: 2 x 6 #> expression min median `itr/sec` mem_alloc `gc/sec` #> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl> #> 1 jpeg 115µs 157.19µs 6189. 121.49KB 13.8 #> 2 magick 950µs 1.11ms 862. 5.45MB 2.04 file <- "~/Documents/torch/man/figures/torch.png" bench::mark( png = png::readPNG(file), magick = as.integer(magick::image_data(magick::image_read(file), "rgb"))/255, check = FALSE ) #> Warning: Some expressions had a GC in every iteration; so filtering is disabled. #> # A tibble: 2 x 6 #> expression min median `itr/sec` mem_alloc `gc/sec` #> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl> #> 1 png 150ms 170ms 5.84 127MB 3.89 #> 2 magick 404ms 411ms 2.44 148MB 2.44
Created on 2020-08-29 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Looks like
jpeg
andpng
are faster than magick for reading images. We should probably use them instead:Created on 2020-08-29 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: