Hi,
Please refer to Object Detection Using YOLO v2 Deep Learning example that explains complete workflow which includes , preparing the dataset, training the network and evaluating the network on a test dataset.
The example also shows how to obtain anchor boxes for a given dataset.