Research Article

YOLOv5-Based Vehicle Detection Method for High-Resolution UAV Images

Algorithm 1

Label mapping.
Input: ObjectBox(x1,y1,x2,y2),SlidingBox(x3,y3,x4,y4)
Output: ClippingBox(x-top,y-top,x-bot,y-bot)
function Label mapping(x1,y1,x2,y2,x3,y3,x4,y4)
if IoU([x1,y1,x2,y2], [x3,y3,x4,y4])>0 then
  x-top = max(x1,x3)
  x-bot = max(x2,x4)
  y-top = max(y1,y3)
  y-bot = max(y2,y4)
end if
return x-top,y-top,x-bot,y-bot