I would like to make transfer learning with my own traine custom model:
from tflite_model_maker import model_spec
from tflite_model_maker import object_detector
import tensorflow as tftrain_data = object_detector.DataLoader.from_pascal_voc(
"path to images, "path to xml, ['label', 'label2']
)
val_data = object_detector.DataLoader.from_pascal_voc(
"path to images,
"path to xml,
[‘label’, ‘label2’]
)spec = model_spec.get(‘efficientdet_lite1’)
model = object_detector.create(train_data, model_spec=spec, batch_size=8, train_whole_model=True, epochs=1000, validation_data=val_data)
model.export(export_dir=‘.’, tflite_filename=‘model.tflite’)
What I have tried is to change the spec line with my own model as below:
spec = model_spec.get(‘my_model_path’)
But I have an error and it is not working. Does anybody have an idea if I was wrong with this way? If so, What way should I have needed for the aim?