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

Update Plotting.py #47

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/datamodules/components/kitti_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,7 @@ def format_label(self, line):

# Locattion: x, y, z
Location = [line[11], line[12], line[13]]
# bring the KITTI center up to the middle of the object
Location[1] -= Dimension[0] / 2
# KITTI Location == center of 3D Object

Orientation = np.zeros((self.bins, 2))
Confidence = np.zeros(self.bins)
Expand Down Expand Up @@ -753,4 +752,4 @@ def get_augmentation(self, data):
results2 = (time() - start2) * 1000

# print("KITTI Dataset: {} ms".format(results1))
print("KITTI Dataset3: {} ms".format(results2))
print("KITTI Dataset3: {} ms".format(results2))
4 changes: 2 additions & 2 deletions src/utils/Plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def compute_3Dbox(self, P2, line):
z_corners = [0, 0, 0, obj.w, obj.w, obj.w, obj.w, 0] # -w/2

x_corners = [i - obj.l / 2 for i in x_corners]
y_corners = [i - obj.h for i in y_corners]
y_corners = [i - obj.h / 2 for i in y_corners]
z_corners = [i - obj.w / 2 for i in z_corners]

corners_3D = np.array([x_corners, y_corners, z_corners])
Expand Down Expand Up @@ -683,4 +683,4 @@ def save_plot(self, path, name):
mode="training",
)

plot.visualization()
plot.visualization()