I am doing object detection based on a sliding window algorithm. Based on the following code I am creating heat maps :
def add_heat(heatmap, bbox_list):
# Iterate through list of bboxes
for box in bbox_list:
# Add += 1 for all pixels inside each bbox
# Assuming each "box" takes the form ((x1, y1), (x2, y2))
heatmap[box[0][1]:box[1][1], box[0][0]:box[1][0]] += 1
The code simply adds +1 where bounding boxes are overlapping. However, for each bounding box I saved the score from the model prediction (model.predict_proba from tensorflow keras). Can anyone help me to incorporate the score from the model prediction, instead of just adding +1 to create a heatmap? Thanks a lot!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…