基于Matejek等人的工作,对compresso算法进行了非正式打包。

compresso的Python项目详细描述


Compresso:用于连接组学的有效分段数据压缩

*注:这是Matejek等人作品的非官方包装,可在此处找到:https://github.com/VCG/compresso*

PaperMICCAIdoi

Segmentations

Recent advances in segmentation methods for connectomics and biomedical imaging produce very large datasets with labels that assign object classes to image pixels. The resulting label volumes are bigger than the raw image data and need compression for efficient storage and transfer. General-purpose compression methods are less effective because the label data consists of large low-frequency regions with structured boundaries unlike natural image data. We present Compresso, a new compression scheme for label data that outperforms existing approaches by using a sliding window to exploit redundancy across border regions in 2D and 3D. We compare our method to existing compression schemes and provide a detailed evaluation on eleven biomedical and image segmentation datasets. Our method provides a factor of 600-2200x compression for label volumes, with running times suitable for practice.

论文:Matejek等人,,“Compresso:用于连接组学的有效分割数据压缩”,医学图像计算和计算机辅助干预国际会议论文集,2017年10月14日。[CITE| PDF]

要求

  • Python 3.5+
  • 康达

设置

git clone https://github.com/vcg/compresso &&cd compresso
conda create -n compresso_env --file requirements.txt -c chen -c sunpy -c conda-forge -c auto -c indygreg
source activate compresso_env
# for Compresso scheme as presented in MICCAIcd experiments/compression/compresso; python setup.py build_ext --inplace
# to run the neuroglancer compression schemecd ../neuroglancer; python setup.py build_ext --inplace
# for Compresso v2 that is under developmentcd ../../../src/python; python setup.py build_ext --inplace

压缩分段堆栈

此存储库中有两个版本的Compresso。在src文件夹下有一个更新的c++和python版本,它扩展了MICCAI中的Compresso方案。除其他外,该算法实现位压缩,以进一步改善压缩结果。在

experiments/compression/compresso中的压缩方案与MICCAI论文完全一致。在

压缩分段堆栈

要对自己的数据测试Compresso,只需使用:

^{pr2}$

实验

# the dataset must be in hdf5 format.
experiments/run.py COMPRESSO LZMA ac3 -r 1 -s 1 -d '/<PATH>/<TO>/<DATA>'

用法:

usage: run.py [-h] [--directory PATH] [--runs NUM] [--slices NUM]
              [--verbose]
              encoding compression dataset

positional arguments:
  encoding              name of encoding scheme
  compression           name of compression scheme
  dataset               name of data set

optional arguments:
  -h, --help            show this help message and exit
  --directory PATH, -d PATH
                        path to data directory
  --runs NUM, -r NUM    number of runs (default: 1)
  --slices NUM, -s NUM  number of slices per dataset (default: -1 (all))
  --verbose, -v         print progress (default: False) 

确保数据集位于~/compresso/data/中或指定位置。论文中的数据可以在这里找到:

论文结果

压缩性能

Compression Performance of Connectomics Datasets

联合使用Compresso和NeuroScarer的通用压缩方法的压缩比。Compresso与LZMA配对产生了所有connectomics数据集(左)的最佳压缩比,其他数据集(右)的平均压缩比(五分之四)。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
如何使用JSON将值从安卓 java类传递到php?   Java MySQL语法错误不会消失   java Android应用程序无法启动活动   bytebuffer在Java中从字节解码实数   java我无法在php中解码json对象   Swing中的JavaFX集成   java如何在JPA实体bean中使用或注释虚拟字段,该字段不应持久化到数据库中   来自另一个活动的java访问方法   java Tapestry动态生成图像   java有没有一种正则表达式方法可以将一组字符替换为另一组字符(比如shell tr命令)?   java通过转换gson将一些特定的表导出为文件   用java格式化字符串并写入文件   Java使用Graphics2D矩形在面板中创建2D平铺贴图?