Hello
After following the installation procedure mentioned in the below NVIDIA TensorRT sample documentation:
I encountered an error while trying to export the TensorFlow Object Detection model.
python3 ../models/research/object_detection/exporter_main_v2.py --input_type float_image_tensor --trained_checkpoint_dir ./ssd_mobilenet_v2_320x320_coco17_tpu-8/checkpoint/ --pipeline_config_path ./ssd_mobilenet_v2_320x320_coco17_tpu-8/pipeline.config --output_directory ./exported_model
/home/nx/.local/lib/python3.10/site-packages/google/api_core/_python_version_support.py:266: FutureWarning: You are using a Python version (3.10.12) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
warnings.warn(message, FutureWarning)
/home/nx/.local/lib/python3.10/site-packages/matplotlib/projections/init.py:63: UserWarning: Unable to import Axes3D. This may be due to multiple versions of Matplotlib being installed (e.g. as a system package and as a pip package). As a result, the 3D projection is not available.
warnings.warn("Unable to import Axes3D. This may be due to multiple versions of "
Traceback (most recent call last):
File “/home/nx/workspace/example_models/../models/research/object_detection/exporter_main_v2.py”, line 104, in
from object_detection import exporter_lib_v2
File “/home/nx/.local/lib/python3.10/site-packages/object_detection/exporter_lib_v2.py”, line 22, in
from object_detection.builders import model_builder
File “/home/nx/.local/lib/python3.10/site-packages/object_detection/builders/model_builder.py”, line 26, in
from object_detection.builders import hyperparams_builder
File “/home/nx/.local/lib/python3.10/site-packages/object_detection/builders/hyperparams_builder.py”, line 27, in
from object_detection.core import freezable_sync_batch_norm
File “/home/nx/.local/lib/python3.10/site-packages/object_detection/core/freezable_sync_batch_norm.py”, line 20, in
class FreezableSyncBatchNorm(tf.keras.layers.experimental.SyncBatchNormalization
AttributeError: module ‘keras._tf_keras.keras.layers’ has no attribute ‘experimental’
Environment Details:
-
Device: Jetson Orin NX
-
JetPack: 6.2
-
Python: 3.10.12
-
TensorFlow: 2.16.1
-
Keras: 3.12.0
-
TensorRT: !0.3.0
Is there any document which can help me with TFOD installation?