From 84c0e81fe9683dbdd5ee6b088fa756302f60dc25 Mon Sep 17 00:00:00 2001 From: Fan Yang Date: Mon, 10 Jan 2022 17:24:22 -0800 Subject: [PATCH] Update dependency on official/vision/image_classification. PiperOrigin-RevId: 420895912 --- research/object_detection/g3doc/using_your_own_dataset.md | 2 +- .../models/ssd_efficientnet_bifpn_feature_extractor.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/research/object_detection/g3doc/using_your_own_dataset.md b/research/object_detection/g3doc/using_your_own_dataset.md index c44acb2bf..6192af2dd 100644 --- a/research/object_detection/g3doc/using_your_own_dataset.md +++ b/research/object_detection/g3doc/using_your_own_dataset.md @@ -3,7 +3,7 @@ [TOC] To use your own dataset in TensorFlow Object Detection API, you must convert it -into the [TFRecord file format](https://www.tensorflow.org/tutorials/load_data/tfrecord). +into the [TFRecord file format](https://www.tensorflow.org/api_guides/python/python_io#tfrecords_format_details). This document outlines how to write a script to generate the TFRecord file. ## Label Maps diff --git a/research/object_detection/models/ssd_efficientnet_bifpn_feature_extractor.py b/research/object_detection/models/ssd_efficientnet_bifpn_feature_extractor.py index 3184a1c68..c688bacc3 100644 --- a/research/object_detection/models/ssd_efficientnet_bifpn_feature_extractor.py +++ b/research/object_detection/models/ssd_efficientnet_bifpn_feature_extractor.py @@ -31,7 +31,10 @@ from object_detection.utils import shape_utils from object_detection.utils import tf_version # pylint: disable=g-import-not-at-top if tf_version.is_tf2(): - from official.vision.image_classification.efficientnet import efficientnet_model + try: + from official.legacy.image_classification.efficientnet import efficientnet_model + except ModuleNotFoundError: + from official.vision.image_classification.efficientnet import efficientnet_model _EFFICIENTNET_LEVEL_ENDPOINTS = { 1: 'stack_0/block_0/project_bn', -- GitLab