Comments (7)
I fixed this with replacing:
ww = detections[supp_inds, 4]
To:
ww = detections[supp_inds, :4]
from pytorch-computer-vision-cookbook.
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.
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.
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.
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.
@mravendi Can you have a look at this issue?
from pytorch-computer-vision-cookbook.
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)
- Bounding box too small contrary to shown in book HOT 2
- Chapter 6 - CUDA goes out of memory even with batch size 4. HOT 4
- Pirated copy of your book? HOT 3
- chapter2 I have a KeyError: '_labels' HOT 1
- Training yolo model with different image size HOT 2
- Page 174, When i run get_coco_dataset.sh, get_coco_dataset.sh: 29: get_coco_dataset.sh: Syntax error: "(" unexpected HOT 3
- Chapter5 error HOT 2
- Chapter 10 HOT 1
- Chapter 10 Resnt18RNN model accuracy is 0. HOT 2
- Chapter 5 get_yolo_targets
- AMD Grand challenge download forbidden HOT 3
- Chapter6-deployment Error
- NotaDirectoryError
- Error when running the module below
- lacking data HOT 3
- Chapter 5 training code question/error ? HOT 1
- Chapter 5 method xyxyh2xywh HOT 3
- Chapter 10 Error ( Accuracy is always 18.18% i.e constant) HOT 1
- Chapter 10 Error ( Accuracy is always 0% i.e constant) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-computer-vision-cookbook.