From 8c022b5391573a04f0c10d22d348d1ec82572047 Mon Sep 17 00:00:00 2001 From: Jerry Zhang Date: Tue, 19 Mar 2019 20:18:29 +0800 Subject: [PATCH] metrics for pre-trained FPN RCNN (#693) * number of gpus * syncbn * pylint * resnetv1c * merge * indent * unitest * trigger * norm args * indent * resnet v1d +0.5% * style * update docs * fix args * trigger build * add test * resolve conflict * Add FPN model * Add FPN train scripts * Fix FPN error, Stay tuned Training on VOC is still going on, I will report the result and log later. * Revert "Sync from dmlc/master" * Revert "Revert "Sync from dmlc/master"" * Update gluoncv/model_zoo/fpn/fpn.py * Fix `FPN` Bugs mAP on VOC07 is 58%, stay tuned. * add faster_rcnn_fpn_resnet50_v1b model * Update gluoncv/model_zoo/fpn/fpn.py * Update gluoncv/model_zoo/fpn/fpn.py * Create Readme.md * Update Readme.md * Update Readme.md * Update Readme.md * Update Readme.md * Update Readme.md * Rename Readme.md to README.md * Update Train and Eval script, Support Eval VOC12 Test. * Update scripts/detection/fpn/eval_fpn_voc12.py * Update scripts/detection/fpn/eval_fpn_voc12.py * Update README.md * Update README.md * Update fpn.py * Update gluoncv/model_zoo/model_zoo.py * Update gluoncv/model_zoo/model_zoo.py * default not to use static alloc to save memory, speed is not significantly impacted. added dilated faster_rcnn_resnet50_v1b added mask_rcnn_resnet101_v1b * fix missing args * small fix * docs * rm unneeded file * rm debug log * Faster RCNN with FPN * rm unnecessary files pylint rm Non-ASCII fix syntax lint rm from .fpn import * stride => strides rm syncbn in rpn rm syncbn arg mask rcnn arg fix missing "s" * rm 's' in anchor_generators * old model compatibility fix * not using RPNHead to keep backward compatibility with old models * _strides * mask rcnn compatibility * docs * rm dilated faster rcnn * mask rcnn w/ fpn * rm undefined functions * change default roi mode to 'align' * trigger build * change name of the fpn networks * model store update * Fix typo (#622) * Improve custo coco compatible detection dataset (#624) * coco det improve for custom datasets * allow flexible image path parser * fix pycocotools _isArrayLike * better comment * clean * Add assertions for invalid class names for VOCDetection (#614) * Add assertions for invalid class names * Add assertions for invalid class names (revision1) * Add assertions/warnings for invalid class names (revision2) * Add assertions/warnings for invalid class names (revision3) * Add assertions/warnings for invalid class names (revision4) * add detection paper (#628) * add bibtex * rephrase * update bibtex * Update PSP Params (#629) * update psp params * update with pin-device_id (#630) * sync bn faster rcnn * pylint * change roi from 7 to 14, since the last fpn model we trained use 14 * add pretrained faster rcnn fpn bn * Update model_zoo.py * Update model_zoo.py * fpn RCNN docs --- docs/model_zoo/detection.rst | 26 +++++++++++++++++++------- docs/model_zoo/segmentation.rst | 20 +++++++++++++++----- gluoncv/model_zoo/model_zoo.py | 5 +++-- 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/docs/model_zoo/detection.rst b/docs/model_zoo/detection.rst index 6cd4691a22..d1a22c1717 100644 --- a/docs/model_zoo/detection.rst +++ b/docs/model_zoo/detection.rst @@ -168,13 +168,19 @@ Checkout Faster-RCNN demo tutorial here: :ref:`sphx_glr_build_examples_detection .. table:: :widths: 50 5 25 20 - +------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ - | Model | Box AP | Training Command | Training Log | - +====================================+=================+===================================================================================================================================+==================================================================================================================================+ - | faster_rcnn_resnet50_v1b_coco [2]_ | 37.0/57.8/39.6 | `shell script `_ | `log `_ | - +------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ - | faster_rcnn_resnet101_v1d_coco [2]_| 40.1/60.9/43.3 | `shell script `_ | `log `_ | - +------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | Model | Box AP | Training Command | Training Log | + +===========================================+=================+=========================================================================================================================================+==================================================================================================================================+ + | faster_rcnn_resnet50_v1b_coco [2]_ | 37.0/57.8/39.6 | `shell script `_ | `log `_ | + +-------------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | faster_rcnn_resnet101_v1d_coco [2]_ | 40.1/60.9/43.3 | `shell script `_ | `log `_ | + +-------------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | faster_rcnn_fpn_resnet50_v1b_coco [4]_ | 38.4/60.3/41.4 | `shell script `_ | `log `_ | + +-------------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | faster_rcnn_fpn_resnet101_v1d_coco [4]_ | 41.2/62.7/44.8 | `shell script `_ | `log `_ | + +-------------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | faster_rcnn_fpn_bn_resnet50_v1b_coco [5]_ | 39.3/61.3/42.9 | `shell script `_ | `log `_ | + +-------------------------------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ YOLO-v3 ------- @@ -213,3 +219,9 @@ Checkout YOLO demo tutorial here: :ref:`sphx_glr_build_examples_detection_demo_y .. [3] Redmon, Joseph, and Ali Farhadi. \ "Yolov3: An incremental improvement." \ arXiv preprint arXiv:1804.02767 (2018). +.. [4] Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, Serge Belongie. \ + "Feature Pyramid Networks for Object Detection." \ + IEEE Conference on Computer Vision and Pattern Recognition 2017. +.. [5] Kaiming He, Ross Girshick, Piotr Dollár. \ + "Rethinking ImageNet Pre-training." \ + arXiv preprint arXiv:1811.08883 (2018). diff --git a/docs/model_zoo/segmentation.rst b/docs/model_zoo/segmentation.rst index eb297325b6..2136c99411 100644 --- a/docs/model_zoo/segmentation.rst +++ b/docs/model_zoo/segmentation.rst @@ -104,11 +104,21 @@ Table of pre-trained models for instance segmentation and their performance. For instance segmentation task, both box overlap and segmentation overlap based AP are evaluated and reported. -+------------------------------+---------------------------+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ -| Model | Box AP | Segm AP | Command | Training Log | -+==============================+===========================+==========================+====================================================================================================================================+======================================================================================================================================+ -| mask_rcnn_resnet50_v1b_coco | 38.3/58.7/41.4 | 33.1/54.8/35.0 | `shell script `_ | `log `_ | -+------------------------------+---------------------------+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +MS COCO +------- + ++------------------------------------+---------------------------+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| Model | Box AP | Segm AP | Command | Training Log | ++====================================+===========================+==========================+====================================================================================================================================+======================================================================================================================================+ +| mask_rcnn_resnet50_v1b_coco | 38.3/58.7/41.4 | 33.1/54.8/35.0 | `shell script `_ | `log `_ | ++------------------------------------+---------------------------+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| mask_rcnn_fpn_resnet50_v1b_coco | 39.2/61.2/42.2 | 35.4/57.5/37.3 | `shell script `_ | `log `_ | ++------------------------------------+---------------------------+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| mask_rcnn_resnet101_v1d_coco | 41.3/61.7/44.4 | 35.2/57.8/36.9 | `shell script `_ | `log `_ | ++------------------------------------+---------------------------+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| mask_rcnn_fpn_resnet101_v1d_coco | 42.3/63.9/46.2 | 37.7/60.5/40.0 | `shell script `_ | `log `_ | ++------------------------------------+---------------------------+--------------------------+------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ .. [1] He, Kaming, Georgia Gkioxari, Piotr Dollár and Ross Girshick. \ "Mask R-CNN." \ diff --git a/gluoncv/model_zoo/model_zoo.py b/gluoncv/model_zoo/model_zoo.py index 6d08954643..2d1633601a 100644 --- a/gluoncv/model_zoo/model_zoo.py +++ b/gluoncv/model_zoo/model_zoo.py @@ -16,6 +16,7 @@ from .nasnet import * from .pruned_resnet.resnetv1b_pruned import * from .pspnet import * +from .quantized import * from .residual_attentionnet import * from .resnet import * from .resnetv1b import * @@ -26,7 +27,6 @@ from .ssd import * from .vgg import * from .yolo import * -from .quantized import * __all__ = ['get_model', 'get_model_list'] @@ -198,7 +198,8 @@ 'ssd_512_mobilenet1.0_voc_int8': ssd_512_mobilenet1_0_voc_int8, 'ssd_512_resnet50_v1_voc_int8': ssd_512_resnet50_v1_voc_int8, 'ssd_512_vgg16_atrous_voc_int8': ssd_512_vgg16_atrous_voc_int8, - } +} + def get_model(name, **kwargs): """Returns a pre-defined model by name