Skip to content

Commit 5ddf552

Browse files
committed
update readme
1 parent 501222d commit 5ddf552

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

compressai/sadl_codec/readme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
## Workflow
44

55
1- compressAI:
6-
- train a model convertible to SADL (for example FactorizedPriorBasic), see below for details
6+
- train a model convertible to SADL (for example FactorizedPriorReLU), see below for details
77
- dump a pth containing the model (g\_a, g\_s, possibly the cdfs and quantizers if needed)
88
- prepare a training set of raw patch 256x256x3 in npy format (uint8) to be used to recompute statistics of the latents
9-
9+
1010

1111
2- Conversion
1212
- initialize the SADL submodule
1313
- run the script build\_codec.sh in a working directory:
1414
```shell
15-
compressai/sadl_codec/build_codec.sh --model model.pth --training_dataset trainingdataset.npy
15+
compressai/sadl_codec/build_codec.sh --model model.pth --training_dataset trainingdataset.npy
1616
```
1717
Note: it can take a while to generate the first time as it has to perform an inference on the whole training set.
1818

@@ -23,7 +23,7 @@ Note: it can take a while to generate the first time as it has to perform an inf
2323
- OPTIONAL STEP 3/4: extract quantizers information and create a sadl int16 decoder.
2424
- STEP 5: build the C++ decoder
2525
- STEP 6: extract the encoder, build the C++ encoder
26-
26+
2727

2828
3- Run on kodak dataset
2929
```shell
@@ -45,10 +45,10 @@ Several version of the encoder/decoder are available (float version, non SIMD et
4545
4- Details
4646

4747
File details:
48-
- model\_dec.onnx: contains just the network part with the deconvolution and activation compatible with SADL (e.g. ReLU).
49-
- model\_info.pkl: contains information beside the network itself:
48+
- model\_dec.onnx: contains just the network part with the deconvolution and activation compatible with SADL (e.g. ReLU).
49+
- model\_info.pkl: contains information beside the network itself:
5050
the cdfs, cdfs length and cdfs offset and the quantizers for each deconv layers parameters inside a dict { 'cdfs': nparray, 'cdflen': nparray, 'cdfoff': nparray, 'quantizers': '0.weight': 8, '0.bias': 10, ...} }
51-
- model_enc.onnx: contains just the network part with the convolution and activation compatible with SADL (e.g. ReLU).
51+
- model_enc.onnx: contains just the network part with the convolution and activation compatible with SADL (e.g. ReLU).
5252

5353

5454
5- Train a model

0 commit comments

Comments
 (0)