0

I have trained my custom object using Yolov4 and I have the following file :

yolov4-custom_best.weights
yolov4-custom.cfg
obj.names

'obj.names' has the names of the classes of the custom object.

In order to deploy my custom object detector to a web application I need the files in a tensorflow model format (eg : object_detector.h5)

Can someone help?

1 Answer 1

0

To get the model files in .h5 format you have to save the model. To save the model you can use

# The '.h5' extension indicates that the model should be saved to HDF5.
model.save('my_model.h5')

You can also save the model by using tf.keras.models.save_model()

tf.keras.models.save_model(model,filepath,save_format='h5')

For more details, please refer to this documentation. Thank You!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.