How it works...
In step 1, we initialized a few parameters that will be used in the upcoming steps. All our input images are of varying sizes and need to be resized uniformly before they're fed into the model. In the next step, we rescaled the bounding box coordinates according to the new dimensions. Then, we plotted a sample image to display the resized version of the image. In step 3, we split the data into training, validation, and testing datasets based on the indexes. In step 4, we defined a custom metric known as the intersection of union to evaluate the goodness of fit of our model. A metric function is like a loss function, but the results from evaluating a metric are not used when training the model. This metric is passed during ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access