Have anyone know I can get open tensorboard and show the accuracy plot and etc in Object Detection TFLITE Model Maker that I have trained Locally I just run
This is what I just run on my jupyernotebook
and this is the train.py
-- coding: utf-8 --
“”"train.py
Automatically generated by Colaboratory.
“”"
Imports
import numpy as np
import osfrom tflite_model_maker.config import ExportFormat, QuantizationConfig
from tflite_model_maker import model_spec
from tflite_model_maker import object_detectorfrom tflite_support import metadata
import tensorflow as tf
assert tf.version.startswith(‘2’)tf.get_logger().setLevel(‘ERROR’)
from absl import logging
logging.set_verbosity(logging.ERROR)Confirm TF Version
print(“\nTensorflow Version:”)
print(tf.version)
print()Load Dataset
train_data = object_detector.DataLoader.from_pascal_voc(
‘20detection/train’,
‘20detection/train’,
[‘bellpepper’, ‘bittergourd’, ‘broccoli’, ‘cabbage’, ‘carrot’, ‘chicken’, ‘egg’, ‘eggplant’, ‘garlic’, ‘ginger’, ‘okra’, ‘onion’, ‘pork’, ‘potato’, ‘radish’, ‘shrimp’, ‘tofu’, ‘tomato’, ‘fish’, ‘chayote’]
)val_data = object_detector.DataLoader.from_pascal_voc(
‘20detection/valid’,
‘20detection/valid’,
[‘bellpepper’, ‘bittergourd’, ‘broccoli’, ‘cabbage’, ‘carrot’, ‘chicken’, ‘egg’, ‘eggplant’, ‘garlic’, ‘ginger’, ‘okra’, ‘onion’, ‘pork’, ‘potato’, ‘radish’, ‘shrimp’, ‘tofu’, ‘tomato’, ‘fish’, ‘chayote’]
)Load model spec
spec = object_detector.EfficientDetSpec(
model_name=‘efficientdet-lite2’,
uri=‘TensorFlow | efficientdet | Kaggle’,
model_dir=‘/content/checkpoints’,
hparams=‘’)Train the model
model = object_detector.create(train_data, model_spec=spec, batch_size=4, train_whole_model=True, epochs=10, validation_data=val_data)
Evaluate the model
eval_result = model.evaluate(val_data)
Print COCO metrics
print(“mMAP Metrics:”)
for label, metric_value in eval_result.items():
print(f"{label}: {metric_value}")Add a line break after all the items have been printed
print()
Export the model
model.export(export_dir=‘.’, tflite_filename=‘EfficientDet2.tflite’)
Evaluate the tflite model
#tflite_eval_result = model.evaluate_tflite(‘EfficientDet2.tflite’, val_data)
Print COCO metrics for tflite
#print(“mMAP metrics tflite”)
#for label, metric_value in tflite_eval_result.items():print(f"{label}: {metric_value}")
I wanted to get graphs like this
I hope some can help me I am newbiew in this I am really lost I don’t know what to do