1- This package contains data compression ops and layers for TensorFlow.
2-
3- # Documentation
4-
5- All documentation is hosted at https://tensorflow.github.io/compression .
6-
7- Refer to [ the API documentation] ( https://tensorflow.github.io/compression/docs/api_docs/python/tfc.html )
8- for a complete description of the Keras layers and TensorFlow ops this package
9- implements.
10-
11- There's also an introduction to our ` EntropyBottleneck ` class
12- [ here] ( https://tensorflow.github.io/compression/docs/entropy_bottleneck.html ) ,
13- and a description of the range coding operators
14- [ here] ( https://tensorflow.github.io/compression/docs/range_coding.html ) .
15-
16- # Google group
17-
18- For usage questions and discussions, please head over to our
19- [ Google group] ( https://groups.google.com/forum/#!forum/tensorflow-compression ) .
1+ This project contains data compression ops and layers for TensorFlow. The
2+ project website is at https://tensorflow.github.io/compression .
203
214# Quick start
225
236** Please note** : You need TensorFlow 1.9 (or the master branch as of May 2018)
247or later installed.
258
9+ Clone the repository to a filesystem location of your choice, or download the
10+ ZIP file and unpack it. Then include the root directory in your ` PYTHONPATH `
11+ environment variable:
12+
13+ ``` bash
14+ cd < target directory>
15+ git clone https://github.com/tensorflow/compression.git tensorflow_compression
16+ export PYTHONPATH=" $PWD /tensorflow_compression:$PYTHONPATH "
17+ ```
18+
2619To make sure the library imports succeed, try running the unit tests:
2720
2821``` bash
22+ cd tensorflow_compression
2923for i in tensorflow_compression/python/* /* _test.py; do
3024 python $i
3125done
3226```
3327
28+ We recommend importing the library from your Python code as follows:
29+
30+ ``` python
31+ import tensorflow as tf
32+ import tensorflow_compression as tfc
33+ ```
34+
3435## Example model
3536
3637The [ examples directory] ( https://github.com/tensorflow/compression/tree/master/examples )
3738directory contains an implementation of the image compression model described
3839in:
3940
40- > J. Ballé, V. Laparra, E. P. Simoncelli:
41- > "End-to-end optimized image compression"
41+ > "End-to-end optimized image compression"< br />
42+ > J. Ballé, V. Laparra, E. P. Simoncelli< br />
4243> https://arxiv.org/abs/1611.01704
4344
4445To see a list of options, change to the directory and run:
@@ -49,14 +50,28 @@ python bls2017.py -h
4950
5051To train the model, you need to supply it with a dataset of RGB training images.
5152They should be provided in PNG format and must all have the same shape.
52- Following training, the python script can be used to compress and decompress
53+ Following training, the Python script can be used to compress and decompress
5354images as follows:
5455
5556``` bash
5657python bls2017.py [options] compress original.png compressed.bin
5758python bls2017.py [options] decompress compressed.bin reconstruction.png
5859```
5960
61+ # Help & documentation
62+
63+ For usage questions and discussions, please head over to our
64+ [ Google group] ( https://groups.google.com/forum/#!forum/tensorflow-compression ) .
65+
66+ Refer to [ the API documentation] ( https://tensorflow.github.io/compression/docs/api_docs/python/tfc.html )
67+ for a complete description of the Keras layers and TensorFlow ops this package
68+ implements.
69+
70+ There's also an introduction to our ` EntropyBottleneck ` class
71+ [ here] ( https://tensorflow.github.io/compression/docs/entropy_bottleneck.html ) ,
72+ and a description of the range coding operators
73+ [ here] ( https://tensorflow.github.io/compression/docs/range_coding.html ) .
74+
6075# Authors
6176Johannes Ballé (github: [ jonycgn] ( https://github.com/jonycgn ) ),
6277Sung Jin Hwang (github: [ ssjhv] ( https://github.com/ssjhv ) ), and
0 commit comments