skhadem / 3D-BoundingBox

PyTorch implementation for 3D Bounding Box Estimation Using Deep Learning and Geometry
MIT License
435 stars 96 forks source link

some code I don't understand #5

Closed maxwellfrom closed 4 years ago

maxwellfrom commented 4 years ago

Hi Thanks for your great work, It helped me a lot, however, there are some codes that I don't understand, for example: _dim += averages.getitem(label['Class']) , cloud you please explain it ? Thank you very much!

mheriyanto commented 4 years ago

I also don't understand. I get error on this code command dim += averages.get_item(detected_class).

skhadem commented 4 years ago

What type of error are you getting? The idea is that the predicted dimension is not the pure dimension, but rather the deviation from the average dimension. Therefore, to get the full dimensions, I add the average back in. For example, if the prediction for a car (in x,y,z) is (0.1, 0.5, -0.3), this means that the actual dimension is (0.1 + [average car x], 0.5 + [average car y], -0.3 + average car z]). Does that make sense?

mheriyanto commented 4 years ago

Oh, I got it. Yes, that make sense. Thanks @skhadem for your explanation.