Skip to content

Commit

Permalink
[WIP] Add int8 docs (#691)
Browse files Browse the repository at this point in the history
* add int8 docs

* ci

* fix doc

* fix doc

* fix int8_inference

* fix table in modelzoo

* fix broken link in int8_inference

* improve docs
  • Loading branch information
xinyu-intel authored and zhreshold committed Mar 19, 2019
1 parent 4c624de commit a83ef8c
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 11 deletions.
12 changes: 12 additions & 0 deletions docs/model_zoo/classification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,17 @@ ImageNet

- Download weights given a hashtag: ``net = get_model('ResNet50_v1d', pretrained='117a384e')``

``ResNet50_v1_int8`` and ``MobileNet1.0_int8`` are quantized model calibrated on ImageNet dataset.

.. role:: tag

ResNet
------

.. hint::

- ``ResNet50_v1_int8`` is a quantized model for ``ResNet50_v1``.

- ``ResNet_v1b`` modifies ``ResNet_v1`` by setting stride at the 3x3 layer for a bottleneck block.

- ``ResNet_v1c`` modifies ``ResNet_v1b`` by replacing the 7x7 conv layer with three 3x3 conv layers.
Expand All @@ -107,6 +111,8 @@ ResNet
+---------------------------+--------+--------+----------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| ResNet50_v1 [1]_ | 77.36 | 93.57 | cc729d95 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/resnet50_v1.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/resnet50_v1.log>`_ |
+---------------------------+--------+--------+----------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| ResNet50_v1_int8 [1]_ | 76.86 | 93.46 | cc729d95 | | |
+---------------------------+--------+--------+----------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| ResNet101_v1 [1]_ | 78.34 | 94.01 | d988c13d | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/resnet101_v1.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/resnet101_v1.log>`_ |
+---------------------------+--------+--------+----------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| ResNet152_v1 [1]_ | 79.22 | 94.64 | acfd0970 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/resnet152_v1.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/resnet152_v1.log>`_ |
Expand Down Expand Up @@ -177,6 +183,10 @@ ResNext
MobileNet
---------

.. hint::

- ``MobileNet1.0_int8`` is a quantized model for ``MobileNet1.0``.

.. table::
:widths: 45 5 5 10 20 15

Expand All @@ -185,6 +195,8 @@ MobileNet
+==========================+========+========+==========+=========================================================================================================================================+===============================================================================================================================+
| MobileNet1.0 [4]_ | 73.28 | 91.30 | efbb2ca3 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/mobilenet1.0-mixup.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/mobilenet1.0-mixup.log>`_ |
+--------------------------+--------+--------+----------+-----------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| MobileNet1.0_int8 [4]_ | 72.85 | 90.99 | efbb2ca3 | | |
+--------------------------+--------+--------+----------+-----------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| :tag:`MobileNet1.0` [4]_ | 72.93 | 91.14 | cce75496 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/mobilenet1.0.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/mobilenet1.0.log>`_ |
+--------------------------+--------+--------+----------+-----------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
| MobileNet0.75 [4]_ | 70.25 | 89.49 | 84c801e2 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/mobilenet0.75.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/classification/imagenet/mobilenet0.75.log>`_ |
Expand Down
34 changes: 23 additions & 11 deletions docs/model_zoo/detection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ and their performances with more details.

- ``(320x320)`` indicate that the model was evaluated with resolution 320x320. If not otherwise specified, all detection models in GluonCV can take various input shapes for prediction. Some models are trained with various input data shapes, e.g., Faster-RCNN and YOLO models.

- ``ssd_300_vgg16_atrous_voc_int8`` is a quantized model calibrated on Pascal VOC dataset for ``ssd_300_vgg16_atrous_voc``.

.. hint::

The training commands work with the following scripts:
Expand All @@ -53,6 +55,8 @@ Pascal VOC

The VOC metric, mean Average Precision (mAP) across all classes with IoU threshold 0.5 is reported.

Quantized SSD models are evaluated with ``nms_thresh=0.45``, ``nms_topk=200``.


SSD
---
Expand All @@ -62,17 +66,25 @@ Checkout SSD demo tutorial here: :ref:`sphx_glr_build_examples_detection_demo_ss
.. table::
:widths: 50 5 25 20

+----------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| Model | mAP | Training Command | Training log |
+==================================+=======+======================================================================================================================================+=====================================================================================================================================+
| ssd_300_vgg16_atrous_voc [1]_ | 77.6 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_300_vgg16_atrous_voc.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_300_vgg16_atrous_voc_train.log>`_ |
+----------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| ssd_512_vgg16_atrous_voc [1]_ | 79.2 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_vgg16_atrous_voc.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_vgg16_atrous_voc_train.log>`_ |
+----------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| ssd_512_resnet50_v1_voc [1]_ | 80.1 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_resnet50_v1_voc.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_resnet50_v1_voc_train.log>`_ |
+----------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| ssd_512_mobilenet1.0_voc [1]_ | 75.4 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_mobilenet1_0_voc.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_mobilenet1_0_voc_train.log>`_ |
+----------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| Model | mAP | Training Command | Training log |
+========================================+=======+======================================================================================================================================+=====================================================================================================================================+
| ssd_300_vgg16_atrous_voc [1]_ | 77.6 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_300_vgg16_atrous_voc.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_300_vgg16_atrous_voc_train.log>`_ |
+----------------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| ssd_300_vgg16_atrous_voc_int8* [1]_ | 77.46 | | |
+----------------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| ssd_512_vgg16_atrous_voc [1]_ | 79.2 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_vgg16_atrous_voc.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_vgg16_atrous_voc_train.log>`_ |
+----------------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| ssd_512_vgg16_atrous_voc_int8* [1]_ | 78.39 | | |
+----------------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| ssd_512_resnet50_v1_voc [1]_ | 80.1 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_resnet50_v1_voc.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_resnet50_v1_voc_train.log>`_ |
+----------------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| ssd_512_resnet50_v1_voc_int8* [1]_ | 80.16 | | |
+----------------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| ssd_512_mobilenet1.0_voc [1]_ | 75.4 | `shell script <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_mobilenet1_0_voc.sh>`_ | `log <https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/logs/detection/ssd_512_mobilenet1_0_voc_train.log>`_ |
+----------------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| ssd_512_mobilenet1.0_voc_int8* [1]_ | 75.04 | | |
+----------------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+

Faster-RCNN
-----------
Expand Down
Loading

0 comments on commit a83ef8c

Please sign in to comment.