models icon indicating copy to clipboard operation
models copied to clipboard

Bug when do "from object_detection.utils import label_map_util"

Open cheumeni-commit opened this issue 1 year ago • 1 comments

Prerequisites

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

  • [ yes] I am using the latest TensorFlow Model Garden release and TensorFlow 2.
  • [ yes] I am reporting the issue to the correct repository. (Model Garden official or research directory)
  • [ yes] I checked to make sure that this issue has not already been filed.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/research/object_detection/utils

2. Describe the bug

When we do the "from object_detection.utils import label_map_util" inside the notebook "object_detection_tutorial", we encouter this issue : cannot import name 'string_int_label_map_pb2' from 'object_detection.protos' This issue is it right because inside folder "protos", the name of file is 'string_int_label_map_pb' not 'string_int_label_map_pb2' .

3. Steps to reproduce

Try to run step by step the notebook ""object_detection_tutorial"

4. Expected behavior

Change import of "'string_int_label_map_pb2' inside file "label_map_util" by "'string_int_label_map_pb'

5. Additional context

RAS

6. System information

Google Colab

cheumeni-commit avatar Dec 07 '23 17:12 cheumeni-commit

Hi @cheumeni-commit,

I strongly suggest utilizing the TensorFlow Official Model Garden to circumvent issues related to outdated code commonly found in research codebases. Unlike the research repositories, the Official Model Garden is consistently updated and aligned with the latest changes in TensorFlow and other libraries and there are lot of API's are available that you can define a training experiment using Python commands in the TensorFlow Model library.We have developed several Notebook examples like object detection that illustrate how to train models from the ground up.

Thanks.

laxmareddyp avatar Jan 03 '24 21:01 laxmareddyp