I’m looking for guidance on how to modify an existing script to use the EfficientDet D1 model. I followed a tutorial and successfully trained a custom dataset using the default script. The script uses the following line to configure the model:
This works fine for the default RetinaNet model. However, I would like to switch to using the EfficientDet D1 model instead. I have already downloaded the EfficientDet D1 configuration file, but I’m not sure how to reference it in the script.
What I Have Tried
Reviewed the Configuration File: I checked the parameters in the EfficientDet D1 config file to see if it had any clear reference names that I could use with exp_factory.get_exp_config().
Checked for Alternative Configuration Methods: I looked for alternative ways to load custom model configurations but couldn’t find any clear instructions.
What I’m Looking For
How do I modify the exp_factory.get_exp_config() line to reference the EfficientDet D1 configuration file?
If this approach is not possible, how do I load and reference the configuration file manually?
Are there any specific changes required in the config file itself to make this work?
I’m open to modifying the config file parameters manually if required. and tried to run the training through this
<code>2024-12-1823:14:43.163543: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1734563683.18212616153 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1734563683.18781316153 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
Traceback(most recent call last):
File "/content/trainingdemo/model_main_tf2.py", line 32, in<module>
from object_detection import model_lib_v2
File "/usr/local/lib/python3.10/dist-packages/object_detection/model_lib_v2.py", line 29, in<module>
from object_detection import eval_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/eval_util.py", line 35, in<module>
from object_detection.metrics import coco_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/metrics/coco_evaluation.py", line 28, in<module>
from object_detection.utils import object_detection_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/object_detection_evaluation.py", line 46, in<module>
from object_detection.utils import label_map_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/label_map_util.py", line 29, in<module>
from object_detection.protos import string_int_label_map_pb2
File "/usr/local/lib/python3.10/dist-packages/object_detection/protos/string_int_label_map_pb2.py", line 33, in<module>
_descriptor.EnumValueDescriptor(
File "/usr/local/lib/python3.10/dist-packages/google/protobuf/descriptor.py", line 789, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
Ifthis 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).
</code>
<code>2024-12-18 23:14:43.163543: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1734563683.182126 16153 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1734563683.187813 16153 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
Traceback (most recent call last):
File "/content/trainingdemo/model_main_tf2.py", line 32, in <module>
from object_detection import model_lib_v2
File "/usr/local/lib/python3.10/dist-packages/object_detection/model_lib_v2.py", line 29, in <module>
from object_detection import eval_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/eval_util.py", line 35, in <module>
from object_detection.metrics import coco_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/metrics/coco_evaluation.py", line 28, in <module>
from object_detection.utils import object_detection_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/object_detection_evaluation.py", line 46, in <module>
from object_detection.utils import label_map_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/label_map_util.py", line 29, in <module>
from object_detection.protos import string_int_label_map_pb2
File "/usr/local/lib/python3.10/dist-packages/object_detection/protos/string_int_label_map_pb2.py", line 33, in <module>
_descriptor.EnumValueDescriptor(
File "/usr/local/lib/python3.10/dist-packages/google/protobuf/descriptor.py", line 789, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot 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).
</code>
2024-12-18 23:14:43.163543: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1734563683.182126 16153 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1734563683.187813 16153 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
Traceback (most recent call last):
File "/content/trainingdemo/model_main_tf2.py", line 32, in <module>
from object_detection import model_lib_v2
File "/usr/local/lib/python3.10/dist-packages/object_detection/model_lib_v2.py", line 29, in <module>
from object_detection import eval_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/eval_util.py", line 35, in <module>
from object_detection.metrics import coco_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/metrics/coco_evaluation.py", line 28, in <module>
from object_detection.utils import object_detection_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/object_detection_evaluation.py", line 46, in <module>
from object_detection.utils import label_map_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/label_map_util.py", line 29, in <module>
from object_detection.protos import string_int_label_map_pb2
File "/usr/local/lib/python3.10/dist-packages/object_detection/protos/string_int_label_map_pb2.py", line 33, in <module>
_descriptor.EnumValueDescriptor(
File "/usr/local/lib/python3.10/dist-packages/google/protobuf/descriptor.py", line 789, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot 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).
tensorflow
machine-learning
deep-learning
google-colaboratory
efficientnet
New contributor
Capstone Team Nugget is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I’m looking for guidance on how to modify an existing script to use the EfficientDet D1 model. I followed a tutorial and successfully trained a custom dataset using the default script. The script uses the following line to configure the model:
This works fine for the default RetinaNet model. However, I would like to switch to using the EfficientDet D1 model instead. I have already downloaded the EfficientDet D1 configuration file, but I’m not sure how to reference it in the script.
What I Have Tried
Reviewed the Configuration File: I checked the parameters in the EfficientDet D1 config file to see if it had any clear reference names that I could use with exp_factory.get_exp_config().
Checked for Alternative Configuration Methods: I looked for alternative ways to load custom model configurations but couldn’t find any clear instructions.
What I’m Looking For
How do I modify the exp_factory.get_exp_config() line to reference the EfficientDet D1 configuration file?
If this approach is not possible, how do I load and reference the configuration file manually?
Are there any specific changes required in the config file itself to make this work?
I’m open to modifying the config file parameters manually if required. and tried to run the training through this
<code>2024-12-1823:14:43.163543: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1734563683.18212616153 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1734563683.18781316153 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
Traceback(most recent call last):
File "/content/trainingdemo/model_main_tf2.py", line 32, in<module>
from object_detection import model_lib_v2
File "/usr/local/lib/python3.10/dist-packages/object_detection/model_lib_v2.py", line 29, in<module>
from object_detection import eval_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/eval_util.py", line 35, in<module>
from object_detection.metrics import coco_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/metrics/coco_evaluation.py", line 28, in<module>
from object_detection.utils import object_detection_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/object_detection_evaluation.py", line 46, in<module>
from object_detection.utils import label_map_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/label_map_util.py", line 29, in<module>
from object_detection.protos import string_int_label_map_pb2
File "/usr/local/lib/python3.10/dist-packages/object_detection/protos/string_int_label_map_pb2.py", line 33, in<module>
_descriptor.EnumValueDescriptor(
File "/usr/local/lib/python3.10/dist-packages/google/protobuf/descriptor.py", line 789, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
Ifthis 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).
</code>
<code>2024-12-18 23:14:43.163543: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1734563683.182126 16153 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1734563683.187813 16153 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
Traceback (most recent call last):
File "/content/trainingdemo/model_main_tf2.py", line 32, in <module>
from object_detection import model_lib_v2
File "/usr/local/lib/python3.10/dist-packages/object_detection/model_lib_v2.py", line 29, in <module>
from object_detection import eval_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/eval_util.py", line 35, in <module>
from object_detection.metrics import coco_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/metrics/coco_evaluation.py", line 28, in <module>
from object_detection.utils import object_detection_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/object_detection_evaluation.py", line 46, in <module>
from object_detection.utils import label_map_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/label_map_util.py", line 29, in <module>
from object_detection.protos import string_int_label_map_pb2
File "/usr/local/lib/python3.10/dist-packages/object_detection/protos/string_int_label_map_pb2.py", line 33, in <module>
_descriptor.EnumValueDescriptor(
File "/usr/local/lib/python3.10/dist-packages/google/protobuf/descriptor.py", line 789, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot 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).
</code>
2024-12-18 23:14:43.163543: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1734563683.182126 16153 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1734563683.187813 16153 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
Traceback (most recent call last):
File "/content/trainingdemo/model_main_tf2.py", line 32, in <module>
from object_detection import model_lib_v2
File "/usr/local/lib/python3.10/dist-packages/object_detection/model_lib_v2.py", line 29, in <module>
from object_detection import eval_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/eval_util.py", line 35, in <module>
from object_detection.metrics import coco_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/metrics/coco_evaluation.py", line 28, in <module>
from object_detection.utils import object_detection_evaluation
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/object_detection_evaluation.py", line 46, in <module>
from object_detection.utils import label_map_util
File "/usr/local/lib/python3.10/dist-packages/object_detection/utils/label_map_util.py", line 29, in <module>
from object_detection.protos import string_int_label_map_pb2
File "/usr/local/lib/python3.10/dist-packages/object_detection/protos/string_int_label_map_pb2.py", line 33, in <module>
_descriptor.EnumValueDescriptor(
File "/usr/local/lib/python3.10/dist-packages/google/protobuf/descriptor.py", line 789, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot 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).
tensorflow
machine-learning
deep-learning
google-colaboratory
efficientnet
New contributor
Capstone Team Nugget is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.