Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Bug in data_classes?

Đang mở
#85 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
numpy, python
Lĩnh vực
computer-vision

Hướng nghiên cứu

Bắt đầu trong data_classes.py với các triển khai của LidarPointCloud và PointCloud, sau đó kiểm tra cách tệp .bin của scene 21 được tải. So sánh các giả định của reshape với cách xử lý thay thế được cung cấp cho các tệp có độ dài không chia hết cho năm. Hoàn tất khi các tệp bị ảnh hưởng được tải với các giá trị đám mây điểm chính xác mà không làm hỏng định dạng hiện có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I believe that there is a small flaw in the data_classes.py file in the LidarPointCloud class (PointCloud). Because not all files that I tried to get have the same format for the reshape ((- - 1, 5)) [:,: cls.nbr_dims ()], that is, points = scan.reshape ((- -, 5) ) [:,: cls.nbr_dims ()]. I encountered such a problem in scene 21.
So, I replaced the LidarPointCloud (PointCloud) class with:

class LidarPointCloud(PointCloud):
@staticmethod
def nbr_dims() -> int:
    """Returns the number of dimensions.

    Returns: Number of dimensions.

    """
    return 4

@classmethod
def from_file(cls, file_name: Path) -> "LidarPointCloud":
    """Loads LIDAR data from binary numpy format. Data is stored as (x, y, z, intensity, ring index).

    Args:
        file_name: Path of the pointcloud file on disk.

    Returns: LidarPointCloud instance (x, y, z, intensity).

    """

    assert file_name.suffix == ".bin", "Unsupported filetype {}".format(file_name)

    scan = np.fromfile(str(file_name), dtype=np.float32)
    if len(scan) % 5 == 0:
        points = scan.reshape((-1, 5))[:, : cls.nbr_dims()]
    else:
        scan0=[]
        scan1=[]
        scan2=[]
        scan3=[]
        scan4=[]
        scan_pontos = []
        scan_pontos = scan.reshape((-1, 1))
        dv = 0
        for divisao in range(math.floor(len(scan)/5)):
            if (dv+4)<=len(scan):
                scan0.append(scan_pontos[dv])
                scan1.append(scan_pontos[dv+1])
                scan2.append(scan_pontos[dv+2])
                scan3.append(scan_pontos[dv+3])
                scan4.append(scan_pontos[dv+4])
            dv = dv+5
        points = np.concatenate((scan0,scan1,scan2,scan3),axis=1)
    return cls(points.T)

I I believe that now I got the correct point cloud values.

Ngôn ngữ chính
Jupyter Notebook
Star
390
Fork
99
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của lyft/nuscenes-devkit

Tất cả issue của lyft/nuscenes-devkit

Issue tương tự

Thêm issue về Computer Vision

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.