Error in Roboflow-TensorFlow2-Object-Detection.ipynb #302
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
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!