def draw_boxes3d_cam(img, boxes3d, class_ids, metadata, intrinsics=None, scores=None, render_labels=True):
    """
    Parameters
    ----------
    img: np.ndarray
        RGB image. (H, W, 3)

    boxes3d: tridet.structures.Boxes3D or np.ndarray
        If np.ndarray, it must be a length-10 vector.
    """
    if len(boxes3d) == 0:
        return img.copy()

    assert len(class_ids) == len(boxes3d), "Number of class IDs must be same with number of 3D boxes."

    if isinstance(boxes3d, Boxes3D):
        intrinsics = torch.unique(torch.inverse(boxes3d.inv_intrinsics), dim=0)
        assert len(intrinsics) == 1, "Input 3D boxes must share intrinsics."
        _intrinsics = intrinsics[0]

        if intrinsics is not None:
            assert torch.allclose(_intrinsics, torch.as_tensor(intrinsics).reshape(3, 3))
        intrinsics = _intrinsics
        K = intrinsics.detach().cpu().numpy().copy()
    else:
        assert intrinsics is not None
        K = np.float32(intrinsics).reshape(3, 3)

    class_names = [metadata.contiguous_id_to_name[class_id] for class_id in range(len(metadata.thing_classes))]

    viz_image = img.copy()
    for k, (class_id, box3d) in enumerate(zip(class_ids, boxes3d)):
        if isinstance(box3d, GenericBoxes3D):
            box3d = box3d.vectorize()[0]
        if isinstance(box3d, torch.Tensor):
            box3d = box3d.detach().cpu().numpy()
        clr = metadata.thing_colors[class_id]
        box3d = GenericBoxes3D.from_vectors([box3d])
        if scores is not None:
            score = scores[k]
        else:
            score = None
        viz_image = pretty_render_3d_box(
            box3d,
            viz_image,
            # camera,
            K,
            class_id=class_id,
            color=clr,
            class_names=class_names,
            score=score,
            line_thickness=2,
            render_label=render_labels
        )

    return viz_image

    Parameters
    ----------
    img: np.ndarray
        RGB image. (H, W, 3)

    boxes3d: tridet.structures.Boxes3D or np.ndarray
        If np.ndarray, it must be a length-10 vector.
    
tridet/visualizers/box3d_visualizer.py