Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How AB is calculated? #39

Closed
YWonchall opened this issue Feb 18, 2023 · 1 comment
Closed

How AB is calculated? #39

YWonchall opened this issue Feb 18, 2023 · 1 comment

Comments

@YWonchall
Copy link

YWonchall commented Feb 18, 2023

hi, i want to konw how th AB is calculate?
the code is as follows:

def send(self, key, val):
    self.data[key] = val
    if isinstance(val, np.ndarray):
        cur_bytes = val.size * 8
    elif type(val) in [int, float]:
        cur_bytes = 8
    elif isinstance(val, list):
        cur_bytes = np.array(val).size * 8
    elif type(val) is str:
        cur_bytes = len(val)
    if key.endswith("boxes"):
        cur_bytes = cur_bytes * 7 / 24
    self.cur_bytes += cur_bytes

i want to konw which is used to calculate the point cloud or box?

for pointcloud, each point cloud has 4 float value, each float takes up 4 bytes. so the AB of pointcloud is N*4*4 (N is the numbers of point clous in each file).

for box,each box has 8 vertices, each vertice has 3 coordinates. if it is float too, the AB of pointcloud is M*8*3*4(M is the number of boxes in each file).

Am I doing the right thing?, Or can you tell me about the logic of the source code?

Thank you!

@haibao-yu
Copy link
Member

hi, i want to konw how th AB is calculate? the code is as follows:

def send(self, key, val):
    self.data[key] = val
    if isinstance(val, np.ndarray):
        cur_bytes = val.size * 8
    elif type(val) in [int, float]:
        cur_bytes = 8
    elif isinstance(val, list):
        cur_bytes = np.array(val).size * 8
    elif type(val) is str:
        cur_bytes = len(val)
    if key.endswith("boxes"):
        cur_bytes = cur_bytes * 7 / 24
    self.cur_bytes += cur_bytes

i want to konw which is used to calculate the point cloud or box?

for pointcloud, each point cloud has 4 float value, each float takes up 4 bytes. so the AB of pointcloud is N44 (N is the numbers of point clous in each file).

for box,each box has 8 vertices, each vertice has 3 coordinates. if it is float too, the AB of pointcloud is M83*4(M is the number of boxes in each file).

Am I doing the right thing?, Or can you tell me about the logic of the source code?

Thank you!

In our newer paper, we will normalize and explain how to calculate the transmission cost of the three transmission forms.
Here we use a 32-bit float to represent each element in transmitted data, and we ignore the transmission cost of calibration files and timestamps.

  • Calculating the transmission cost of transmitting raw data for early fusion. We represent each point in point clouds with $(x,y,z, intensity)$, so each point requires four 32-bit floats that are equal to 16 Bytes. If there are 100,000 points in point clouds, the $\mathcal{AB}$ of the transmission cost is 1.6 $\times 10^6$ Bytes.
  • Calculating the transmission cost of transmitting detection outputs for late fusion. We represent each 3D detection output with $(x, y, z, w, l, h, \theta, confidence)$, so each detection output requires eight 32-bit floats that are equal to 32 Bytes. If we transmit ten detection outputs per transmission on average, the $\mathcal{AB}$ of the transmission cost is 3.2 $\times 10^2$ Bytes.
  • Calculating the transmission cost of transmitting intermediate data for middle fusion. The feature or feature flow is represented with the tensor, and we represent each element with a 32-bit float. If the size of the feature or feature flow is $(100, 100, 100)$, then the $\mathcal{AB}$ of the transmission cost is 100 $\times$ 100 $\times$ 100 $\times$ 4 Bytes, which are equal to 4 $\times 10^6$ Bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants