I’d expect the score is how confident the model is that it found something on the region.
The code for the threshold  seems to be correct but from your code, if the 3 super confident values are not from the label that your are looking for (if l == label_to_look_for:) then it won’t save any images.