CasiaFan / SSD_EfficientNet

SSD using TensorFlow object detection API with EfficientNet backbone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSD EfficientNet in tensorflow keras version

Unofficial implementation of SSD with EfficientNet backbone using tf keras.

UPDATE

Here is the link for official EfficientNet implementation for TPU training.

Install Requirement

  • Python 3.X
  • TensorFlow 1.13.1 (Use current version 1.14 would cause a wired dimension mismatch caused by se-expand operation in se block.)
  • TensorFlow Models master branch
  • Protoc 3.5.7

Usage Steps

  1. Put efficientnet.py and efficient_feature_extractor.py under object_detection/models directory
  2. Modify model_builder.py and add SSDEfficientNetFeatureExtractor and SSDEfficientNetFPNFeatureExtractor
from object_detection.models.efficientnet_feature_extractor import SSDEfficientNetFeatureExtractor, SSDEfficientNetFPNFeatureExtractor

SSD_KERAS_FEATURE_EXTRACTOR_CLASS_MAP = {
    ...
    'ssd_efficientnet': SSDEfficientNetFeatureExtractor,
    'ssd_efficientnet_fpn': SSDEfficientNetFPNFeatureExtractor,
}
  1. Replace ssd.proto file under protos with this one. Then make sure to rerun protoc object_detection/protos/ssd.proto --python_out=.
  2. Install TensorFlow object detection api: see here
  3. Train model following official steps
  4. Refer to ssd_efficientnet.config and ssd_efficientnet_fpn.config as example config (If use ssd_efficientnet_fpn backbone, make sure use_explicit_padding is true to prevent potential mismatch error during top down addition operation).

About

SSD using TensorFlow object detection API with EfficientNet backbone


Languages

Language:Python 100.0%