Code Monkey home page Code Monkey logo

Comments (5)

poodarchu avatar poodarchu commented on July 22, 2024

does the result right?

from det3d.

muzi2045 avatar muzi2045 commented on July 22, 2024

the test result is correct, and there are other people are get the same problem

from det3d.

poodarchu avatar poodarchu commented on July 22, 2024

I also encounter this problem occasionally, but it's hard to reproduce so I didn't pay much attention to it.

from det3d.

muzi2045 avatar muzi2045 commented on July 22, 2024

I am checking the loss compute in your repo and the second.pytorch repo, in the original repo, I have never encounter this kind of problem though the loss compute are almost same when train pointpoillars.

from det3d.

muzi2045 avatar muzi2045 commented on July 22, 2024

here is some problem in data generate, the invalid Nan Value in gt_boxes velocity leading this problem.
If this error occurs to anyone, please check the data generate output, this repo get gt_boxes will generate wrong velocity value.
check the part in nusc_common.py

if not test:
            annotations = [
                nusc.get("sample_annotation", token) for token in sample["anns"]
            ]

            locs = np.array([b.center for b in ref_boxes]).reshape(-1, 3)
            dims = np.array([b.wlh for b in ref_boxes]).reshape(-1, 3)
            # rots = np.array([b.orientation.yaw_pitch_roll[0] for b in ref_boxes]).reshape(-1, 1)
            # velocity = np.array([b.velocity for b in ref_boxes]).reshape(-1, 3)
            velocity = np.array(
                [nusc.box_velocity(token)[:2] for token in sample['anns']]
            )
            # convert velo from global to lidar
            for i in range(len(ref_boxes)):
                velo = np.array([*velocity[i], 0.0])
                velo = velo @ np.linalg.inv(e2g_r_mat).T @ np.linalg.inv(
                    l2e_r_mat).T
                velocity[i] = velo[:2]
            velocity = velocity.reshape(-1,2)

            rots = np.array([quaternion_yaw(b.orientation) for b in ref_boxes]).reshape(
                -1, 1
            )
            names = np.array([b.name for b in ref_boxes])
            tokens = np.array([b.token for b in ref_boxes])
            gt_boxes = np.concatenate(
                [locs, dims, velocity[:, :2], -rots - np.pi / 2], axis=1
            )

although you modify these part, the velo compute may be still be illegal output.

the most dirty way avoid this .
you can just add these code in mg_head.py

if kwargs.get("mode", False):
    reg_targets = example["reg_targets"][task_id][:, :, [0, 1, 3, 4, 6]]
    reg_targets_left = example["reg_targets"][task_id][:, :, [2, 5]]
else:
    reg_targets = example["reg_targets"][task_id]

## Add part
for i in range(6):
    example["reg_targets"][i][torch.isnan(example["reg_targets"][i])] = 0.0

from det3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.