onnx / onnx/models

Tiny YOLOv2 produces incorrect output with v1.8.0

Open
#399 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Jupyter Notebook
Stars
9.8k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Bug Report

Which model does this pertain to?

Tiny YOLOv2

Describe the bug

The output when running tiny yolov2 through an ONNX runtime inference session appears to be incorrect, and outputs a large number of warnings. The code being used is given in this gist: https://gist.github.com/avarsh/cdbab0cc635fad6a403a5a616aff639e

When running this code with the threshold value set to "0.002" in the postprocessing, the following output is given: https://gist.github.com/avarsh/d5f4efd28e4e927ebcaad06163dff801

I was able to manually generate an ONNX file for tiny yolov2 from the relevant Darknet files, which gives the correct output with the same code (post processing threshold set to 0.3):

(1, 3, 416, 416)
(125, 13, 13)
Bounding Box 1 : [[75, 97, 163, 371], 0.7742048036087853, 'person']
Bounding Box 2 : [[2, 262, 86, 354], 0.7187669842556927, 'sheep']
Bounding Box 3 : [[283, 151, 409, 335], 0.6768828930128936, 'sheep']
Bounding Box 4 : [[305, 155, 410, 323], 0.5562674827033209, 'sheep']

Note that the input image for both models was: https://github.com/pjreddie/darknet/blob/master/data/person.jpg

Reproduction instructions

System Information

OS Platform and Distribution (e.g. Linux Ubuntu 16.04): Arch Linux
ONNX version (e.g. 1.6): 1.8
Backend/Runtime version (e.g. ONNX Runtime 1.1, PyTorch 1.2): Onnx Runtime 1.5.2

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 by running the inference code from the linked gist with the Tiny YOLOv2 ONNX model, using the supplied person.jpg input and comparing it with the manually generated ONNX file. Done means identifying why the v1.8.0 model produces warnings and incorrect detections, then confirming output comparable to the reported correct bounding boxes.

Written by the indexing model from the issue text.

Assessment

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.