We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roboflow-TensorFlow2-Object-Detection.ipynb
Google Colab
#prepare pipeline_fname = '/content/models/research/deploy/' + base_pipeline_file fine_tune_checkpoint = '/content/models/research/deploy/' + model_name + '/checkpoint/ckpt-0'
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)
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Search before asking
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?
The text was updated successfully, but these errors were encountered: