Megvii-BaseDetection / Megvii-BaseDetection/YOLOX
Question Regarding BBox Transform Before NMS
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I'm having trouble understanding why this transform is needed before feeding the decoded bounding boxes into the NMS function:
ONNX Inference:
https://github.com/Megvii-BaseDetection/YOLOX/blob/dd5700c24693e1852b55ce0cb170342c19943d8b/demo/ONNXRuntime/onnx_inference.py#L78-L82
PyTorch Inference:
https://github.com/Megvii-BaseDetection/YOLOX/blob/dd5700c24693e1852b55ce0cb170342c19943d8b/yolox/utils/boxes.py#L33-L37
As I understand it, this is what the above code is doing:
# BBox in `(x1, y1, x2, y2)` format
x1 = x1 - (x2/2)
y1 = y1 - (y2/2)
x2 = x1 + (x2/2)
y2 = y1 + (y2/2)
Also, does it make sense for this step to happen inside the YOLOXHead itself rather than outside?
Thank you!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked sections of demo/ONNXRuntime/onnx_inference.py and yolox/utils/boxes.py, then trace the decoded box format into NMS. Compare the two inference paths and determine whether the transform belongs in YOLOXHead or remains at the inference boundary. Done means documenting the transform's purpose and the placement decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision, machine-learning
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100