Megvii-BaseDetection / Megvii-BaseDetection/YOLOX

Overflow error in onnx inference

Open
#1,658 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

When I convert the yolox model to onnx and run inference on it i get the following warning in the demo_posprocess function in YOLOX/yolox/utils/demo_utils.py

RuntimeWarning: overflow encountered in exp
outputs[..., 2:4] = np.exp(outputs[..., 2:4]) * expanded_strides

This is causing the bbox output to be negative
@FateScript @GOATmessi7

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in YOLOX/yolox/utils/demo_utils.py at the demo_posprocess function and inspect the outputs[..., 2:4] = np.exp(outputs[..., 2:4]) * expanded_strides line. Reproduce inference with the converted YOLOX model and trace the values entering np.exp; done means identifying the overflow cause and preventing the resulting negative bounding-box output.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.