varunagrawal / bbox Goto Github PK
View Code? Open in Web Editor NEWPython library for 2D/3D bounding boxes
Home Page: https://varunagrawal.github.io/bbox/
License: MIT License
Python library for 2D/3D bounding boxes
Home Page: https://varunagrawal.github.io/bbox/
License: MIT License
The latest version on PyPI (0.8.3) includes a dependency on PIL in the utils module, but this is not reflected as a requirement in setup.py. Would you consider publishing an updated version which includes fa838a0 where this explicit dependency was eliminated?
For e.g. at https://github.com/varunagrawal/bbox/blob/master/bbox/bbox2d_list.py#L223 (and a couple other blocks in that file, not sure if there are some in others), there is an exception block with no specified exception. That will propagate an arbitrary exception forward as a value error, so if a user catches a value error from that they will be catching any possible exception. In other words, this is shadowing all exceptions as a ValueError.
Currently no readme and large amounts of undocumented code.
Hi,
BBox2D
can accept a tuple, but BBox2DList
can't accept a list of tuples.
Is it possible to make BBox2DList
accept a list of tuples?
Maybe even let BBox2D
accept and typing.Sequence
, and BBox2DList
any Sequence
of Sequence
s.
Thanks
Is it wrong in this code for jaccard_index_3d?
inter_area = polygon_area(intersection_points)
zmax = np.minimum(a.cz, b.cz) //this is center
zmin = np.maximum(a.cz - a.h, b.cz - b.h) //what is the point?
I think it should be
zmax = np.minimum(a.cz + 0.5 * a.h, b.cz + 0.5 * a.h) //upper bound
zmin = np.maximum(a.cz - 0.5 * a.h, b.cz - 0.5 * b.h) //lower bound
For example,
a = bbox.BBox3D(0,0,0,1,1,2)
b = bbox.BBox3D(0,0,-2.0,1,1,2.4)
jaccard_index_3d(a,b)
0.0
How ever, z range for a is [-1,1]
z range for b is [-3.2,-0.8]
There must be a intersection, which means iou should not be 0.
Is my calculation wrong?
The original bbox
package name was reserved by Dustin Tran (the Edward guy) who has responded to me and relinquished control of the name.
Currently, there is no formal process to takeover the package name and publish my code to it, though it is being worked upon by PyPA.
Once the process has been finalized, and I have permission from the legal teams, I should go ahead and publish this library.
Bounding boxes can be cast to a numpy array by exposing the __array__
dunder method, so that you can call np.array()
on it and get the result that you want instead of (or in addition to, so that you can still have the flag) the numpy()
method.
https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.array.html
object : array_like
An array, any object exposing the array interface, an object whose __array__ method returns an array, or any (nested) sequence.
About a year ago, a fix was committed for a NumPy deprecation.
Can we publish a release including this fix to PyPi? There hasn't been a new PyPi version since 2020.
Hello, nice to meet you, and thank you very much for providing such a useful example for new users of gtsam. About the program (imukittiexamplegps. M), I have successfully run it. Now I want to test it with different data. As a first step, I try to generate data in the same format from Kitti raw data. I want to know Kittiequivbiasedimu.txt and attached Kittigps_converted.txt what do these two data components represent respectively, such as attached What are the meanings of X, y and Z in kittigps_converted.txt? What are the meanings of X, y and Z in kittiequivbiasedimu.txt. Looking forward to your reply!!!
您好,很高兴见到您,非常感谢您为 gts am 的新用户提供了这样一个有用的示例。关于程序( imu kitti example gps 。米),我已经成功运行了。现在我想用不同的数据来检验。作为第一步,我尝试从 Kitti 原始数据生成相同格式的数据。我想知道 Kitti equiv bia sedimum . txt 和附件中的 Kitt i gps _ convorted . txt 这两个数据分量分别代表什么,如附件中 kitt iq ps _ Convented . txt 中的 X , y , Z 是什么意思?kitti equiv biased imu . txt 中的 X 、 y 、 Z 是什么意思?期待您的回复!!!
The following code:
from bbox import BBox3D
import pyquaternion
a = BBox3D(x=0, y=0, z=0, q=pyquaternion.Quaternion(axis=[1, 0, 0], angle=3.14159265))
b = BBox3D(x=1, y=0, z=0, q=pyquaternion.Quaternion(axis=[1, 0, 0], angle=3.14159265))
bbox.metrics.iou_3d(a,b)
produces the error
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-7-e3b42501e331> in <module>
----> 1 bbox.metrics.iou_3d(a,b)
~/PycharmProjects/thea_context/.venv/lib/python3.6/site-packages/bbox/metrics.py in iou_3d(a, b)
131 Alias for `jaccard_index_3d`.
132 """
--> 133 return jaccard_index_3d(a, b)
134
135
~/PycharmProjects/thea_context/.venv/lib/python3.6/site-packages/bbox/metrics.py in jaccard_index_3d(a, b)
152 return np.round_(0, decimals=5)
153
--> 154 intersection_points = polygon_intersection(a.p[0:4, 0:2], b.p[0:4, 0:2])
155 inter_area = polygon_area(intersection_points)
156
~/PycharmProjects/thea_context/.venv/lib/python3.6/site-packages/bbox/geometry.py in polygon_intersection(poly1, poly2)
171 input_list = output_list
172 output_list = []
--> 173 s = input_list[-1]
174
175 for e in input_list:
IndexError: list index out of range
NIce library. It'd be convenient if it contained a point-inclusion test.
Thanks for putting this library together -- we are finding it very useful.
One limitation we have encountered is that the various setters for the x/y coordinates in BBox2D raise an exception when faced with negative values. It is not clear why this limitation is in place, and it also seems a little inconsistent since the constructor does allow for instantiating a bbox with negative coordinates.
Additionally, the width and height setters prohibit negative values which seems sensible, but there is not similar checking in the constructor and thus you can instantiate a bbox with negative width/height.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.