You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-7Lines changed: 4 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# LSNMS
2
2
Speeding up Non Maximum Suppresion ran on very large images by a several folds factor, using a sparse implementation of NMS.
3
-
This project describes a "sparse" implementation of Non Maximum Suppression, useful in the case of very high dimensional images data, when the amount of predicted instances to prune becomes considerable (> 10,000 objects).
3
+
This project becomes useful in the case of very high dimensional images data, when the amount of predicted instances to prune becomes considerable (> 10,000 objects).
@@ -121,22 +121,19 @@ tree = BallTree(data, leaf_size=16)
121
121
122
122
123
123
## Performances
124
-
The BallTree implemented in this repo was timed against scikit-learn's `neighbors` one.
124
+
The BallTree implemented in this repo was timed against scikit-learn's `neighbors` one. Note that runtimes are not fair to compare since sklearn implementation allows for node to contain
125
+
between `leaf_size` and `2 * leaf_size` datapoints. To account for this, I timed my implementation against sklearn tree with `int(0.67 * leaf_size)` as `leaf_size`.
<figcaption>Trees building times comparison</figcaption></center>
129
130
</p>
130
131
131
-
The (minor) slow down observed against sklearn implementation is probably related to the node-splitting process. I used the median cutoff (compute median, then assign datapoints depending on their value above or below median) but it is suboptimal: a proper pivot algorithm could easily be implemented.
<figcaption>Trees query times comparison (single query, radius=100) in a 1000x1000 space</figcaption></center>
137
137
</p>
138
138
139
-
Query time are somehow identical. However, my implementation does seem to not scale as well as scikit-learn's one, a minor slowdown could be observed for extremely large datasets (million-ish data points).
140
-
141
-
### Warnings
142
-
Because input data needs to be typed: the dimensionality of the process is fixed in advance. This BallTree implementation can not work on 3D and above data (although it is a one-liner fix).
0 commit comments