资源算法FastMaskRCNN_ForwardTest

FastMaskRCNN_ForwardTest

2019-12-30 | |  53 |   0 |   0

FastMaskRCNN_ForwardTest

This is a forward test script of a single input image for the FastMaskRCNN: https://github.com/CharlesShang/FastMaskRCNN

Display

Requirements

Functionalities

  • Draw bounding box of the predicted RoI

  • Draw mask of the predicted RoI (without bbox)

  • Draw mask of the predicted RoI with its bbox and predicted categroy

Getting Start

  1. It requires you to download the whole repo firstly from https://github.com/CharlesShang/FastMaskRCNN

  2. Add the whole dir ./forward_test under the root of the repo; then replace the original ./libs/visualization/pil_utils.py with the new one in my repo. Downloading the 2 pre-trained models above and place them(with the ./output/mask_rcnn/checkpoint) as shown below. Finally the folder structure would be:

root/
├── data/pretrained_models/resnet_v1_50.ckpt
│   └── ......
│
├── forward_test/
│   ├── testdata/
│   ├── output/
│   └── forward_test_single_image.py
│
├── libs/
│   ├── visualization/
│   │   ├── pil_utils.py
│   │   └── ......
│   ├── nets/
│   │   ├── pyramid_network.py
│   │   └── ......
│   └── ......
│
├── output/mask_rcnn/
│   ├── checkpoint
│   ├── coco_resnet50_model.ckpt-2499999.data-00000-of-00001
│   ├── coco_resnet50_model.ckpt-2499999.index
│   └── coco_resnet50_model.ckpt-2499999.meta
└── ......
  1. Modify original ./libs/nets/pyramid_network.py according to Issues#1-F3 and Issues#1-F4. Or you can just replace the original one with mine.

  2. Put your test image under ./forward_test/testdata/

  3. (Optional) If you want to change the output image dir, modify the code ./forward_test/forward_test_single_image.py at Line30-31

save_dir_bbox = 'output/bbox/'
save_dir_mask = 'output/mask/'
  1. (Optional) If your test image is in PNG format, modify the code ./forward_test/forward_test_single_image.py at Line32

file_pattern = 'jpg'    # or 'png'
  1. run ./forward_test/forward_test_single_image.py and wait for the result

Acknowledgment

  • The ./forward_test/forward_test_single_image.py is modified from the original ./train/train.py from FastMaskRCNN

  • The ./libs/visualization/pil_utils.py is modified from @chen1005's suggestion

  • The pre-trained Mask-RCNN model from @QtSignalProcessing

To-Do


上一篇:MaskRCNN_Practise

下一篇:nlp-beginner-guide-keras

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...