From 0bcf7ab0c6a7524531921d0fd87832910e45bac3 Mon Sep 17 00:00:00 2001 From: Amir Servi <131249114+ServiAmirPM@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:29:22 +0200 Subject: [PATCH 1/2] Updated readme file with better design, less text (#1265) - Re-structure - changed the way the document is structured (table of content), including changing titles names - Redesigned the header - with better look and feel, with as much information in the header. - Removed tutorials from the tutorials section in the readme - will add some back after re-structuring the tutorials. - Added visuals to the page for better look and feel, and to better explain the product. - improved the quantization flow table and added 4 tutorials to it. - Re-ordered the Resources section, making it clear that API is per quantization method - Hidden (collapsed) the supported version table. users can open it on demand - Results - removed text, still requires updating the numbers, add mixed precision and the update graph - Troubleshooting and community - added community to this section. - Updated the license section with text and a badge --- README.md | 160 +++++++++++++++++++---------- docsrc/images/Classification.png | Bin 0 -> 39642 bytes docsrc/images/ObjDet.png | Bin 0 -> 51804 bytes docsrc/images/PoseEst.png | Bin 0 -> 73996 bytes docsrc/images/SemSeg.png | Bin 0 -> 77214 bytes docsrc/images/colab-badge.svg | 1 + docsrc/images/mctDiagramFlow.svg | 1 + docsrc/images/mctDiagram_clean.svg | 1 + docsrc/images/mctFlow.png | Bin 0 -> 187647 bytes 9 files changed, 106 insertions(+), 57 deletions(-) create mode 100644 docsrc/images/Classification.png create mode 100644 docsrc/images/ObjDet.png create mode 100644 docsrc/images/PoseEst.png create mode 100644 docsrc/images/SemSeg.png create mode 100644 docsrc/images/colab-badge.svg create mode 100644 docsrc/images/mctDiagramFlow.svg create mode 100644 docsrc/images/mctDiagram_clean.svg create mode 100644 docsrc/images/mctFlow.png diff --git a/README.md b/README.md index 6b898678e..a5065aac1 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,101 @@ -# Model Compression Toolkit (MCT) - -Model Compression Toolkit (MCT) is an open-source project for neural network model optimization under efficient, constrained hardware. +
+ Getting Started • + Tutorials • + High level features and techniques • + Resources • + Community • + License +
+ ++ Quantization Method | Complexity | Computational Cost | Tutorial +-------------------- | -----------|--------------------|--------- +PTQ (Post Training Quantization) | Low | Low (~1-10 CPU minutes) | +GPTQ (parameters fine-tuning using gradients) | Moderate | Moderate (~1-3 GPU hours) | +QAT (Quantization Aware Training) | High | High (~12-36 GPU hours) | -## Getting Started +
+-For installing the nightly version or installing from source, refer to the [installation guide](https://github.com/sony/model_optimization/blob/main/INSTALLATION.md). + +
+
+
+
+
+
-### Pytorch
+ ### Pytorch
We quantized classification networks from the torchvision library.
In the following table we present the ImageNet validation results for these models:
@@ -151,6 +186,14 @@ In the following table we present the ImageNet validation results for these mode
| ResNet-18 [3] | 69.86 | 69.63 |69.53|
| SqueezeNet 1.1 [3] | 58.128 | 57.678 ||
+### Keras
+MCT can quantize an existing 32-bit floating-point model to an 8-bit fixed-point (or less) model without compromising accuracy.
+Below is a graph of [MobileNetV2](https://keras.io/api/applications/mobilenet/) accuracy on ImageNet vs average bit-width of weights (X-axis), using
+single-precision quantization, mixed-precision quantization, and mixed-precision quantization with GPTQ.
+
+
+
+For more results, please see [1]
#### Pruning Results
@@ -161,23 +204,26 @@ Results for applying pruning to reduce the parameters of the following models by
| ResNet50 [2] | 75.1 | 72.4 |
| DenseNet121 [3] | 74.44 | 71.71 |
+## Troubleshooting and Community
-## Trouble Shooting
+If you encountered large accuracy degradation with MCT, check out the [Quantization Troubleshooting](https://github.com/sony/model_optimization/tree/main/quantization_troubleshooting.md)
+for common pitfalls and some tools to improve quantized model's accuracy.
-If the accuracy degradation of the quantized model is too large for your application, check out the [Quantization Troubleshooting](https://github.com/sony/model_optimization/tree/main/quantization_troubleshooting.md)
-for common pitfalls and some tools to improve quantization accuracy.
+Check out the [FAQ](https://github.com/sony/model_optimization/tree/main/FAQ.md) for common issues.
-Check out the [FAQ](https://github.com/sony/model_optimization/tree/main/FAQ.md) for common issues.
+You are welcome to ask questions and get support on our [issues section](https://github.com/sony/model_optimization/issues) and manage community discussions under [discussions section](https://github.com/sony/model_optimization/discussions).
## Contributions
MCT aims at keeping a more up-to-date fork and welcomes contributions from anyone.
-*You will find more information about contributions in the [Contribution guide](https://github.com/sony/model_optimization/blob/main/CONTRIBUTING.md).
+*Checkout our [Contribution guide](https://github.com/sony/model_optimization/blob/main/CONTRIBUTING.md) for more details.
## License
-[Apache License 2.0](https://github.com/sony/model_optimization/blob/main/LICENSE.md).
+MCT is licensed under Apache License Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
+
+
## References
diff --git a/docsrc/images/Classification.png b/docsrc/images/Classification.png
new file mode 100644
index 0000000000000000000000000000000000000000..c5359baf4f3dc640e8afdbc50332a98c984c21fe
GIT binary patch
literal 39642
zcmeEtRZyEx_%2r5-GUa^QmjzirMN>NP$=$Bi(8AkdkGRCIHXX#Kymj{tSu1Siv&*k
zyEqr;>VJ3U%$#o~^Cg*N_uJifpI4q|Kj~ MZbfc3MAt&c^;E22_-A^s6Icd14n`QUf3mKpeuHD@kp2a56&!hKJ$?74<-EMT?WTSP!$X{{Y(-jI&!@zG
zX5SH0G5^~QW%DCl`xW^i_DC4Wi}~iSZl01&*T^OV!KL?G#=f;3**%}^#QVLYoduUR
z^*`cX@U?on0k{8}XqTA=*9II7C0dR3JR+hE3>VaIj)C*eiz5TclXKRTL6>{%91Ni?
z-2`|)pA>_QJ{2I=)4|@mEcY{Q)$T4fN9f4j&k2MLrpDBOK_jc1xc66w{2U1~>Q=|T
z>m6^-Z_h=Vel`E@*bSR)>JmEa?K>}IRo>qvdRkPiuBuJDF=Pt9IEse*T75s=Quqz$
zsf6PZl=x5@j|gqtSKk!`|IYLpa@+yybNsgvokH~h7R~2r^_F>gdFACk$;YeQGBQ@N
zW*A28=jXTp)lR=7USOw>mMLT1*Izuy6})`|5x8A-i*T-Z>%oS6)*dxqkBQYG)Bj8g
zNNw@y9{^GPpZ5
}^2Lg?C}Q{va>vgR5IxH)H#io6-94M%a>x*e6c)fANX5F%Za?FIJlkiNmdi
z)TY28+|@em&dv}+lsade!WDeE_NppX3IAi>^$y>32C1OE9_mvV4(y$(N)^E%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