Amith4504 / Frozen-Graph-Inference-MaskRCNN

Semantic Segmentation [MaskRCNN] using Frozen graph for inference . The repository contains code to freeze a TensorFlow .h5 model [.h5 to .pb] and inference using the frozen model.
6 stars 1 forks source link

Frozen-Graph-Inference-MaskRCNN

Semantic Segmentation [MaskRCNN] using Frozen graph for inference . The repository contains code to freeze a Keras .h5 model [.h5 to .pb] and inference using the frozen model.

MaskRCNN Architecture

Mask R-CNN is built on ResNet 101 backbone and Feature Pyramidal Network FPN .

Dependencies

TensorFlow v1.x , pycocotools , OpenCV , GPU [>= 4 GB RAM] . The Keras model [.h5] requires more than 4GB RAM . The frozen model can be loaded in less than 4GB memory .

Instructions

Download COCO MaskRCNN trained model from here . Save in the main directory.

Freeze Model as follows .

python freeze_model.py

For Inference Provide path to frozen model and test image

python main.py -m model/mask_frozen_graph.pb -p test_image/tesla_cybertruck_F.jpg

Example Inference submanifold