Open
Description
Prerequisites
Please answer the following questions for yourself before submitting an issue.
- [*] I am using the latest TensorFlow Model Garden release and TensorFlow 2.
- [*] I am reporting the issue to the correct repository. (Model Garden official or research directory)
- [*] I checked to make sure that this issue has not already been filed.
1. The entire URL of the file you are using
N/A
2. Describe the bug
I'm following this official guide for getting starting with the Object Detection API with TF2: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2.md
After manually cloning and building tensorflow/io (necessary on macOS/M1 at this point), the only way to get model_builder_tf2_test.py
to run is to follow the hack I describe here to make protobuf.internal.builder
available.
3. Steps to reproduce
- Have a Mac with an M1 chip running macOS 12.5.1.
- Install
tensorflow-macos
2.9.2,tensorflow-metal
0.5.1. - Follow the Python Package Installation steps in the
Object Detection API with TensorFlow 2
document in this repo (https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2.md).
- You'll have to manually build and install
tensorflow_io
andtensorflow_io_gcs_filesystem
, see https://stackoverflow.com/questions/70277737/cant-install-tensorflow-io-on-m1. - Some packages need to be installed with
pip --no-dependencies
.
- Try to run
python object_detection/builders/model_builder_tf2_test.py
- note ImportError. - Follow the workaround to make
proto.internal.builder
available here: Could you please add support for Apple's M1 chip for running Mobilenet SSD V2 training #10429 (comment). - Run
python object_detection/builders/model_builder_tf2_test.py
- success.
4. Expected behavior
I can successfully install and test the Object Detection API using python object_detection/builders/model_builder_tf2_test.py
without having to manually copy files into my python site-packages folder.
5. Additional context
N/A
6. System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 12.5.2
- Mobile device name if the issue happens on a mobile device:
- TensorFlow installed from (source or binary): binary
- TensorFlow version (use command below): tensorflow-macos 2.9.2
- Python version: 3.8.13
- Bazel version (if compiling from source): N/A
- GCC/Compiler version (if compiling from source): N/A
- CUDA/cuDNN version: N/A
- GPU model and memory: Mac M1