Skip to content

z_filter variable computation is giving out of index error on nuscenes dataset #9

@Mayakshanesht

Description

@Mayakshanesht

mask = mask_x & mask_y & mask_z
indices = np.where(mask)
dts = dts[indices]
max_dist = max(abs(target_x - 100), abs(target_y - 100))
elem = int(min(np.ceil(((max_dist + 50)/100) * (len(dts) - 1)), len(dts) - 1))
z_filter = sorted(dts[:, 2])[elem]
minind = np.argmin(np.linalg.norm(dts[:, :3] - np.array([[0.0, 0.0, z_filter]]), axis=1))
arr = np.expand_dims(dts[minind], axis=1).T

In the above code snippet, the value of indices is becoming an empty list for some examples in the nuscenes dataset(scene no - 4, 419) and thus z_filter computation is giving the out-of-index error.
Please suggest a solution to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions