question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to understand the logic behind the `object_detection_demo_yolov3_async.py` demo

See original GitHub issue

I noticed that the recent pull for the file object_detection_demo_yolov3_async.py did try to remove the otherwise confusing flattening of blob but I still can’t figure out how most of the results are parsed from this blob.

Is there some YOLO guide that you guys (@eizamaliev ) followed (except the official paper which is not so clear)?

Some example snippets that I don’t understand include

  1. if is_proportional: in the line131. What was the purpose behind introducing this additional parameter to pass around the functions?

  2. In the part

       # Process raw value
        x = (col + x) / params.side
        y = (row + y) / params.side

I can’t understand how the x,y (values) are added with row and col is right. I mean what is the logic behind it?

Please help me get a clear understanding of the YOLO decoding 😕

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
eizamalievcommented, Jun 2, 2020

Hi, @pra-dan. Thanks for your questions, I’ll try to answer them all.

  1. Demo supports two resize type: with aspect ratio kept and without. Because initially was used simple resize, this behavior is saved as default. So is_proportional parameter tells to the function how it should rescale output boxes.

  2. As you can know, YOLO generate local coordinates relative to the cell. To get coordinates relative to image, you should add cell coordinates. By dividing by cell count across corresponding direction, you normalize coordinates.

0reactions
pra-dancommented, Oct 14, 2020

Yeah, we are good to go 👍🏽

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python for Beginners [20 of 44] Demo: Conditional Logic
Demo : Using if statements. Full 'Intro to Python' course on Microsoft Learn: https://aka.ms/MSLearnPython.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found