Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Bug in data_classes?

オープン
#85 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
numpy, python

調査の方向性

data_classes.py の LidarPointCloud と PointCloud の実装から始め、次に scene 21 の .bin ファイルがどのように読み込まれるかを確認してください。reshape の前提と、長さが 5 で割り切れないファイルに対して提供されている代替処理を比較してください。既存の形式を壊すことなく、対象ファイルが正しい点群値で読み込まれれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Jupyter Notebook
スター
390
フォーク
99
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

lyft/nuscenes-devkit のほかの issue

lyft/nuscenes-devkit の issue をすべて見る

似ている issue

Computer Vision の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。