I try to use tensorflow2 object detection API, and i follow the link:https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html step by step.

When I try to training the model by anaconda, using the code:

python model_main.py --alsologtostderr --model_dir=training/ --pipeline_config_path=training/ssd_inception_v2_coco.config

and try

python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_inception_v2_coco.config

(I've changed the path, it's just the example from the URL) I've got some problem:

TensorFlow Addons (TFA) has ended development and introduction of new features.
TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024.
Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP).

For more information see: https://github.com/tensorflow/addons/issues/2807

  warnings.warn(
C:\Users\NCU306\Anaconda3\envs\tf2_api\lib\site-packages\tensorflow_addons\utils\ensure_tf_install.py:53: UserWarning: Tensorflow Addons supports using Python ops for all Tensorflow versions above or equal to 2.11.0 and strictly below 2.14.0 (nightly versions are not supported).
 The versions of TensorFlow you are currently using is 2.10.1 and is not supported.
Some things might work, some things might not.
If you were to encounter a bug, do not file an issue.
If you want to make sure you're using a tested and supported configuration, either change the TensorFlow version or the TensorFlow Addons's version.
You can find the compatibility matrix in TensorFlow Addon's readme:
https://github.com/tensorflow/addons
  warnings.warn(
WARNING:tensorflow:From C:\Users\NCU306\Anaconda3\envs\tf2_api\lib\site-packages\absl\app.py:254: main (from __main__) is deprecated and will be removed in a future version.
Instructions for updating:
Use object_detection/model_main.py.
W0804 14:00:49.594600 19544 deprecation.py:350] From C:\Users\NCU306\Anaconda3\envs\tf2_api\lib\site-packages\absl\app.py:254: main (from __main__) is deprecated and will be removed in a future version.
Instructions for updating:
Use object_detection/model_main.py.
Traceback (most recent call last):
  File "C:\Users\NCU306\Desktop\object_detection_example\tensorflow\workspace\training_demo\train.py", line 186, in <module>
    tf.app.run()
  File "C:\Users\NCU306\Anaconda3\envs\tf2_api\lib\site-packages\tensorflow\python\platform\app.py", line 36, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "C:\Users\NCU306\Anaconda3\envs\tf2_api\lib\site-packages\absl\app.py", line 308, in run
    _run_main(main, args)
  File "C:\Users\NCU306\Anaconda3\envs\tf2_api\lib\site-packages\absl\app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "C:\Users\NCU306\Anaconda3\envs\tf2_api\lib\site-packages\tensorflow\python\util\deprecation.py", line 357, in new_func
    return func(*args, **kwargs)
  File "C:\Users\NCU306\Desktop\object_detection_example\tensorflow\workspace\training_demo\train.py", line 94, in main
    configs = config_util.get_configs_from_pipeline_file(
  File "C:\Users\NCU306\Anaconda3\envs\tf2_api\lib\site-packages\object_detection\utils\config_util.py", line 138, in get_configs_from_pipeline_file
    proto_str = f.read()
  File "C:\Users\NCU306\Anaconda3\envs\tf2_api\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 114, in read
    self._preread_check()
  File "C:\Users\NCU306\Anaconda3\envs\tf2_api\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 76, in _preread_check
    self._read_buf = _pywrap_file_io.BufferedInputStream(
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa8 in position 91: invalid start byte

Did anyone know how to fix it? Really appricate. My env version :python=3.9, tensorflow=2.10

I've try other kinds of cocomodel(centernet_resnet50_v1, faster_rcnn_inception_resnet_v2, ssd_mobilenet_v2_fpnlite) , but all lead to the same output.

0

There are 0 best solutions below