Numpy threshold, Learn from the basics to implementing IoU from scratch