roboflow / roboflow/notebooks

Error in Roboflow-TensorFlow2-Object-Detection.ipynb

Open
#302 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Jupyter Notebook
Stars
9.7k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

Search before asking
  • I have searched the Roboflow Notebooks issues and found no similar bug report.
Notebook name

Roboflow-TensorFlow2-Object-Detection.ipynb

Bug

Screenshot from 2024-08-14 10-38-25

Environment

Google Colab

Minimal Reproducible Example

#prepare
pipeline_fname = '/content/models/research/deploy/' + base_pipeline_file
fine_tune_checkpoint = '/content/models/research/deploy/' + model_name + '/checkpoint/ckpt-0'

Update the path to your label map file

label_map_pbtxt_fname = '/content/models/research/deploy/Beyond-Vision-Detection-1/train/cells_label_map.pbtxt' # Adjust this path if necessary

def get_num_classes(pbtxt_fname):
from object_detection.utils import label_map_util
label_map = label_map_util.load_labelmap(pbtxt_fname)
categories = label_map_util.convert_label_map_to_categories(
label_map, max_num_classes=90, use_display_name=True)
category_index = label_map_util.create_category_index(categories)
return len(category_index.keys())
num_classes = get_num_classes(label_map_pbtxt_fname)

Additional

No response

Are you willing to submit a PR?
  • Yes I'd like to help by submitting a PR!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open Roboflow-TensorFlow2-Object-Detection.ipynb in Google Colab and run the reported get_num_classes example using the label map path shown in the issue. Compare the failure with the attached screenshot and trace the notebook cell that loads the label map. Done means the affected object-detection setup runs without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, tensorflow
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.