Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MotrixLab/AiOS
/ box_cxcywh_to_xyxy
Function
box_cxcywh_to_xyxy
util/box_ops.py:5–8 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
3
4
5
def
box_cxcywh_to_xyxy(x):
6
x_c, y_c, w, h = x.unbind(-1)
7
b = [(x_c - 0.5 * w), (y_c - 0.5 * h), (x_c + 0.5 * w), (y_c + 0.5 * h)]
8
return
torch.stack(b, dim=-1)
9
10
11
def
box_xyxy_to_cxcywh(x):
Callers
2
forward
Method · 0.90
forward
Method · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected