Hi,
I am facing a challenge importing the model_builder from the object_detection.utils as illustrated below:
<ipython-input-4-acc72192bdbe> in <cell line: 12>()
10
11 # import module for building the detection model
---> 12 from object_detection.utils import model_builder
13 ### END CODE HERE ###
14
ImportError: cannot import name 'model_builder' from 'object_detection.utils' (/usr/local/lib/python3.10/dist-packages/object_detection/utils/__init__.py)
Please advise,
Thanks,
Sheila
Hello @Sheila_Murunga
the above code is incorrect as you are try import the module from utils which is incorrect package to import model_builder.
for building objection_detection model you need to use builders package for importing model_builder.
- From the builders package:
- model_builder: This builds your model according to the model configuration that you’ll specify.
Regards
DP
Hello @Deepti_Prasad,
Great to hear from you again 
Thanks for this(this is embarrassing!
I cant believe I put utils instead of builders.
However, am still getting the another error that I was grappling with through various attempts hence the embarrassing confusion.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-6-58c818709b7f> in <cell line: 12>()
10
11 # import module for building the detection model
---> 12 from object_detection.builders import model_builder
13 ### END CODE HERE ###
14
2 frames
/usr/local/lib/python3.10/dist-packages/object_detection/core/freezable_sync_batch_norm.py in <module>
18
19
---> 20 class FreezableSyncBatchNorm(tf.keras.layers.experimental.SyncBatchNormalization
21 ):
22 """Sync Batch normalization layer (Ioffe and Szegedy, 2014).
AttributeError: module 'keras._tf_keras.keras.layers' has no attribute 'experimental'
Please help
Sheila
Is this error for the same grader cell where you import modules?
Got the same error, may be the model builder package provided is outdated.
@Deepti_Prasad, yes, not in my local computer, this time 
Hello @Sheila_Murunga
Could you confirm me if you had any metadata error on installing object detection API??
Regards
DP
Hi @Deepti_Prasad,
No meta error as shown below:
Please send me codes for the cell you encountered error via personal DM. Click on my name and then message.
Regards
DP
Hi everyone. This has now been patched. Looks like there’s a compatibility issue with TF2.16 so we have to rollback to use TF2.15. Kindly reopen your notebook from the classroom to see the revision. Thank you for reporting!
Hi @Deepti_Prasad
Sorry for the late response. I just got on this platform now. It has been sorted by @chris.favila so I will have to go back to the notebook then try running it again.
Thanks so much for your help
Sheila
Hello @Sheila_Murunga
I had only informed Chris about your issue.
Regards
DP
I am facing a challenge importing the model_builder from the object_detection.builders as illustrated below:
Its better to create a new topic because this has been solved.
Anyways I just ran that part of the notebook and worked fine.
Two things to look at, 1. You fill in the correct solution, check it again?
- Maybe you have an older version of the colab notebook, just reopen it from Coursera again!
is your issue resolved? if you have created a new topic kindly tag me or gent.spah if your issue is persisting. as mentioned by the mentor, your object_detection.builders is probably has an error in the metadata to import the model_builder. This could be resolved by updating your programme assignment page or refreshing the page, to get an updated copy.
let us know @CongNgn