Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you please add support for Apple's M1 chip for running Mobilenet SSD V2 training #10429

Open
1 task done
getabhishekified opened this issue Dec 17, 2021 · 7 comments
Open
1 task done

Comments

@getabhishekified
Copy link

getabhishekified commented Dec 17, 2021

Prerequisites

Please answer the following question for yourself before submitting an issue.

  • I checked to make sure that this feature has not been requested already.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2.md

2. Describe the feature you request

I tried installing the Mobilenet SSD V2 on Apple's Mac M1 chip laptop, but getting error on running this command:
python -m pip install --use-feature=2020-resolver .

error:
ERROR: Could not find a version that satisfies the requirement tensorflow_io (from object-detection) (from versions: none)
ERROR: No matching distribution found for tensorflow_io

4. Are you willing to contribute it? (Yes or No)

No. I am a beginner.

@getabhishekified getabhishekified added models:research models that come under research directory type:feature labels Dec 17, 2021
@kumariko kumariko self-assigned this Dec 20, 2021
@kumariko kumariko added models:research:odapi ODAPI and removed models:research models that come under research directory labels Dec 20, 2021
@kumariko kumariko assigned tombstone, jch1 and pkulzc and unassigned kumariko Dec 20, 2021
@vineetsharma14
Copy link

I am having a similar issue. I have installed Tensorflow Mac OS using miniforge3 as per the instruction mentioned on the link : https://developer.apple.com/metal/tensorflow-plugin/

I have verified that the Tensorflow is correctly installed and is using the GPU on the M1 Mac.

I then tried to installed Tensorflow Object Detection API (tried both version 1 and 2); but the installation always gives error on the command "python -m pip install --use-feature=2020-resolver ."

Can someone please clarify - if we can use Tensorflow Object Detection API on Mac with Apple M1 Chip. If yes, it would be great if someone can provide us with the installation steps to follow.

Thanks.

@dusskapark
Copy link

dusskapark commented Jan 22, 2022

Same problem here.

I got error messages below:

// python -m pip install .

ERROR: Could not find a version that satisfies the requirement tensorflow_io (from object-detection) (from versions: none)
ERROR: No matching distribution found for tensorflow_io

@jvishnuvardhan jvishnuvardhan self-assigned this Jan 26, 2022
@AritroSaha10
Copy link

Here's a similar issue on the Tensorflow IO repo: tensorflow/io#1625

@jvishnuvardhan jvishnuvardhan removed their assignment Apr 6, 2022
@divyansh-kumar
Copy link

Same problem here.

I got error messages below:

// python -m pip install .

ERROR: Could not find a version that satisfies the requirement tensorflow_io (from object-detection) (from versions: none)
ERROR: No matching distribution found for tensorflow_io

This might help
https://stackoverflow.com/questions/70277737/cant-install-tensorflow-io-on-m1

@phuochung
Copy link

Same issue

@damian0815
Copy link

damian0815 commented Sep 8, 2022

Same issue, but there's another problem which has to do with protobuf versions. tensorflow-macos==2.9.2 (latest) and tensorboard 2.9.1 both want protobuf<3.20,>=3.9.2, but protobuf.internal.builder (needed to run object_detection/builders/model_builder_tf2_test.py and I guess other things too) does not exist in protobuf 3.19.

Forcing the upgrade past protobuf 3.20 causes this error:

(tensorflow-object-detection-api) damian@d-mba2 research % python object_detection/builders/model_builder_tf2_test.py
Traceback (most recent call last):
  File "object_detection/builders/model_builder_tf2_test.py", line 21, in <module>
    import tensorflow.compat.v1 as tf
  File "/Users/damian/miniforge3/envs/tensorflow-object-detection-api/lib/python3.8/site-packages/tensorflow/__init__.py", line 37, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "/Users/damian/miniforge3/envs/tensorflow-object-detection-api/lib/python3.8/site-packages/tensorflow/python/__init__.py", line 37, in <module>
    from tensorflow.python.eager import context
  File "/Users/damian/miniforge3/envs/tensorflow-object-detection-api/lib/python3.8/site-packages/tensorflow/python/eager/context.py", line 29, in <module>
    from tensorflow.core.framework import function_pb2
  File "/Users/damian/miniforge3/envs/tensorflow-object-detection-api/lib/python3.8/site-packages/tensorflow/core/framework/function_pb2.py", line 16, in <module>
    from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
  File "/Users/damian/miniforge3/envs/tensorflow-object-detection-api/lib/python3.8/site-packages/tensorflow/core/framework/attr_value_pb2.py", line 16, in <module>
    from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
  File "/Users/damian/miniforge3/envs/tensorflow-object-detection-api/lib/python3.8/site-packages/tensorflow/core/framework/tensor_pb2.py", line 16, in <module>
    from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
  File "/Users/damian/miniforge3/envs/tensorflow-object-detection-api/lib/python3.8/site-packages/tensorflow/core/framework/resource_handle_pb2.py", line 16, in <module>
    from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
  File "/Users/damian/miniforge3/envs/tensorflow-object-detection-api/lib/python3.8/site-packages/tensorflow/core/framework/tensor_shape_pb2.py", line 36, in <module>
    _descriptor.FieldDescriptor(
  File "/Users/damian/miniforge3/envs/tensorflow-object-detection-api/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 560, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

Rebuilding protos by doing protoc object_detection/protos/*.proto --python_out=. as in this guide does not make the issue go away.

The workaround here is awful - manually copy builder.py from a more recent installation of protobuf into <env>/lib/python3.8/site-packages/google/protobuf/internal/ - but it works.

Would be good to not have to do this!

@aino-gautam
Copy link

Is there support for tensorflow objection detection on Mac M1 / M2 ?

I am getting this error -

ERROR: Could not find a version that satisfies the requirement tensorflow_io (from object-detection) (from versions: none)
ERROR: No matching distribution found for tensorflow_io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests