| Algorithm 1: VIFM |
| Input: image, Target detection results, Square size m Output: m*m feature map matrix high ← image.shape0 width ← image.shape1 matrix ← for (cls, x, y, w, h) ∈ results do: center_x ← x + center_y ← y + index_width ← int(m) index_high ← int(m) if cls ≠’bus’ and cls ≠’car’ and cls ≠’trunck’ continue end if if index_width ≥ m or index_high ≥ m or index_width < 0 or index_high < 0 continue end if matrix[index_width,index_high] ← matrix[index_width,index_high] + 1 end for return matrix |