draw a rectangle in keras draw_box code example
Example 1: draw a rectangle in keras draw_box
model = load_model("modelname.h5")
Example 2: draw a rectangle in keras draw_box
(_, Contours ,_) = cv2.findContours(Image,cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE)
for area in Contours:
(x, y, w, h) = cv2.boundingRect(area)
ObjROI = Image[y : y+h, x : x+w]
p = model.predict(cv2.resize(ObjROI, (<size of CNN input>)))