不同图书馆的图像阅读基准。
imread-benchmark的Python项目详细描述
I/O基准
不同图像处理python库的I/O基准测试。在
代码的灵感来自Alex Parinov库的Alex Parinov基准代码。在
https://github.com/albu/albumentations/blob/master/benchmark/benchmark.py
这个想法的灵感来源于Roman Soloviov:
https://www.kaggle.com/zfturbo/benchmark-2019-speed-of-image-reading
安装
sudo apt install libturbojpeg libvips-dev
您可以使用pip安装imread_benchmark
:
如果您想在PyPI上发布代码之前获得代码的最新版本,可以从GitHub安装该库:
pip install -U git+https://github.com/ternaus/imread_benchmark
在Linux中计算SSD/HDD的I/O速度
sudo apt-get install hdparm sudo hdparm -Tt <disk_id>
其中disk_id
的类型是/dev/sda
因此,您可能会期望以下内容:
/dev/sda: Timing cached reads: 26114 MB in 1.99 seconds=13122.03 MB/sec Timing buffered disk reads: 1062 MB in 3.00 seconds=353.70 MB/sec
运行基准测试
获取所有输入参数的描述
imread_benchmark -h
imread_benchmark -d <path to images> \ -i <number of images to use> \ -r <number of repeats>
额外选项:
-p
-打印基准库版本
-s
-每次运行时都要洗牌
--show-std
-显示测量的标准偏差
基准测试库:
- 开放式CV
- 枕头simd(PIL-simd)
- jpeg4py
- scikit图像(略图)
- 图像
- 皮维普斯
- 项目
标签: