Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion tools/quantize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Install dependencies before trying quantization:
pip install -r requirements.txt
```

## Usage
## Quantization Usage

Quantize all models in the Zoo:
```shell
Expand Down Expand Up @@ -52,6 +52,16 @@ models = dict(
python quantize-inc.py model1
```

## Blockwise quantization usage

`block_quantize.py` requires Python>=3.7

To perform weight-only blockwise quantization:

```shell
python block_quantize.py --input_model INPUT_MODEL.onnx --output_model OUTPUT_MODEL.onnx --block_size {block size} --bits {8,16}
```

## Dataset
Some models are quantized with extra datasets.
- [MP-PalmDet](../../models/palm_detection_mediapipe) and [MP-HandPose](../../models/handpose_estimation_mediapipe) are quantized with evaluation set of [FreiHAND](https://lmb.informatik.uni-freiburg.de/resources/datasets/FreihandDataset.en.html). Download the dataset from [this link](https://lmb.informatik.uni-freiburg.de/data/freihand/FreiHAND_pub_v2_eval.zip). Unpack it and replace `path/to/dataset` with the path to `FreiHAND_pub_v2_eval/evaluation/rgb`.
Loading