Skip to content

Commit 862bb12

Browse files
spradeep28eaidova
andauthored
BiT Image Classification Quantization NNCF notebook (#1571)
* BiT Model Optimization (FP32) and Quantization (INT8) pipeline with OpenVINO and NNCF * Update * BiT Image Classification OpenVINO model quantization pipeline with NNCF * Rename big transfer notebook directory * Rename big transfer directory * Readme.md * Arrange code sections and add titles * Update readme.md * Update log messages * BiT image classification model quantization with NNCF * Remove unused imports * Fix build review check * Fix build review check * Fix build review check * Fix build review check * Fix build review check * Update README.md Add 127-big-transfer-quantization notebook * Fix build review check * Address review comments * Fix segmentation fault with nncf>=2.7.0 jra-Ccvs129152 * Add BiT to spell check script * docker_teron test fix * Update table of contents --------- Co-authored-by: Ekaterina Aidova <ekaterina.aidova@intel.com>
1 parent 387af32 commit 862bb12

File tree

4 files changed

+758
-0
lines changed

4 files changed

+758
-0
lines changed

.ci/spellcheck/.pyspelling.wordlist.txt

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Bicubic
5353
bicubic
5454
bilinear
5555
biometrics
56+
BiT
5657
blockwise
5758
boolean
5859
CentOS

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ Tutorials that explain how to optimize and quantize models with OpenVINO tools.
142142
| [124-hugging-face-hub](notebooks/124-hugging-face-hub/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F124-hugging-face-hub%2F124-hugging-face-hub.ipynb)<br>[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openvinotoolkit/openvino_notebooks/blob/main/notebooks/124-hugging-face-hub/124-hugging-face-hub.ipynb) | Load models from Hugging Face Model Hub with OpenVINO™ |
143143
| [125-torchvision-zoo-to-openvino](notebooks/125-torchvision-zoo-to-openvino/)<br>Classification<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F125-torchvision-zoo-to-openvino%2F125-convnext-classification.ipynb)<br>[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openvinotoolkit/openvino_notebooks/blob/main/notebooks/125-torchvision-zoo-to-openvino/125-convnext-classification.ipynb)<br>Semantic Segmentation<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F125-torchvision-zoo-to-openvino%2F125-lraspp-segmentation.ipynb)<br>[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openvinotoolkit/openvino_notebooks/blob/main/notebooks/125-torchvision-zoo-to-openvino/125-lraspp-segmentation.ipynb)| Convert torchvision classification and semantic segmentation models to OpenVINO IR |
144144
| [126-tensorflow-hub](notebooks/126-tensorflow-hub/)<br>[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath=notebooks%2F126-tensorflow-hub%2F126-tensorflow-hub.ipynb)<br>[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openvinotoolkit/openvino_notebooks/blob/main/notebooks/126-tensorflow-hub/126-tensorflow-hub.ipynb) | Convert TensorFlow Hub models to OpenVINO IR |
145+
| [127-big-transfer-quantization](notebooks/127-big-transfer-quantization/)| BiT Image Classification OpenVINO IR model Quantization with NNCF |
145146

146147
<div id='-model-demos'></div>
147148

notebooks/127-big-transfer-quantization/127-tensorflow-bit-image-classification-nncf-quantization.ipynb

+735
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Big Transfer Image Classification Model Quantization with NNCF in OpenVINO™
2+
3+
This tutorial demonstrates how to apply 'INT8' quantization to the [Big Transfer](https://tfhub.dev/google/bit/m-r50x1) Image Classification model. Here we demonstrate fine-tuning the model, OpenVINO optimization and followed by INT8 quantization processing with [NNCF](https://github.com/openvinotoolkit/nncf/).
4+
5+
## Notebook Contents
6+
7+
This tutorial consists of the following steps:
8+
- Prepare Dataset.
9+
- Plotting data samples.
10+
- Model fine-tuning.
11+
- Perform model optimization (IR) step.
12+
- Compute model accuracy of the TF model.
13+
- Compute model accuracy of the optimized model.
14+
- Run nncf.Quantize for getting an Optimized model.
15+
- Compute model accuracy of the quantized model.
16+
- Compare model accuracy of the optimized and quantized models.
17+
- Compare inference results on one picture
18+
19+
## Installation Instructions
20+
21+
If you have not installed all required dependencies, follow the [Installation Guide](https://github.com/openvinotoolkit/openvino_notebooks/blob/main/README.md#-installation-guide)

0 commit comments

Comments
 (0)