Giter VIP home page Giter VIP logo

Comments (7)

Tomlac92 avatar Tomlac92 commented on August 28, 2024

I fixed this with replacing:
ww = detections[supp_inds, 4]
To:
ww = detections[supp_inds, :4]

from pytorch-computer-vision-cookbook.

wvalcke avatar wvalcke commented on August 28, 2024

Hi Tomlac92,

Thanks for the reply, but i doubt your solution is correct. The idea is to average the remaining bounding boxes position, but taking into account the object score of each box. That is exactly what the code does by taking ww=detections[supp_inds, 4]
You are now taking the sum of all boxes x1^2, y1^2, x2^2, y2^2, and them dividing each of the sums by the sum of all x1, y1, x2, y2 values of all boxes, which seems strange to me.

from pytorch-computer-vision-cookbook.

Tomlac92 avatar Tomlac92 commented on August 28, 2024

Hey, thanks for the explanations. I didn't sure what exactly this line doing, so I share my first solution, which doesn't give an error, but I can't judge it is correct or not. Before changing that line I was getting error like "tensor a must be the same shape, like tensor b". Tell me, your solution works? Any idea to fix this NMS algorithm will be really helpfull.

from pytorch-computer-vision-cookbook.

wvalcke avatar wvalcke commented on August 28, 2024

Hi Tomlac92,

yes my code works, keep in mind you need to patch the NMS function xyxyh2xywh as well, see the issue i created for this how to patch this method.

from pytorch-computer-vision-cookbook.

Tomlac92 avatar Tomlac92 commented on August 28, 2024

I also had idea, that ww needs to be ww. unsqueezed(0), because error I was getting was informing that tensor ww is one dimension smaller than tensor detections[supp_inds, :4], anyway I have not tested it yet. So many thanks for providing a working solution.

from pytorch-computer-vision-cookbook.

ManikandanKurup-Packt avatar ManikandanKurup-Packt commented on August 28, 2024

@mravendi Can you have a look at this issue?

from pytorch-computer-vision-cookbook.

mave5 avatar mave5 commented on August 28, 2024

Thanks @wvalcke. Your fix makes sense since you are basically converting 'ww' into a 2d array using '.view' method.

from pytorch-computer-vision-cookbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.