How do I generate my own tb and tbtxt files?

I’ve been learning how to use OpenCV with Python in order to use a predefined dataset for object detection. My goal now is to train my own dataset using my own pictures. Is this possible? How do I train a dataset using my own pictures, generating a pb and pbtxt file?

In opencv there is ml module to train mlp or kmeans … models

There is no deep learning training method. You have to train your model using your prefered library (tensorflow, caffe pytorch…)
With train model you can infer using opencv