waymo

编程入门 行业动态 更新时间:2024-10-27 20:31:32

<a href=https://www.elefans.com/category/jswz/34/1752430.html style=waymo"/>

waymo

waymo-open-dataset-viewer使用详解

  • 1 前言
  • 2 Waymo Open Dataset Viewer
    • 2.1 Prerequisites
      • 2.1.1 Dataset
      • 2.1.2 Install tensorflow
      • 2.1.3 Install dependencies
    • 2.2 Usage
    • 2.3 Known Issues

1 前言

waymo-open-dataset-viewer是一个开源的waymo open dataset的可视化工具,本文基于我fork的这一版本进行详解,并直接在原README文件中进行修改。

2 Waymo Open Dataset Viewer

A WebGL viewer for pointclouds of the waymo open dataset that runs seamlessly in the browser with an integrated python server that processes and serves the dataset segments.

2.1 Prerequisites

2.1.1 Dataset

Before using the viewer, you first need to download (parts of) the dataset from the official download page. Create a directory containing the segments (.tfrecord files) you want to view.

下载过程中你可能会用到gsutil,关于它的使用可以参考gsutil的安装与文件下载注意事项和gsutil下载失败如何恢复下载。

2.1.2 Install tensorflow

Consider using tensorflow-gpu since it will speed up reading the segments.

原文使用的是 tensorflow2.0.0,其实在tensorflow2.0.0之后已经不再区分CPU和GPU版本了,只要你的环境中有GPU且依赖环境设置正确就会自动调用GPU进行计算。而且根据下文中用到的requirements.txt文件中所写的依赖库可以看出作者使用的tensorflow为2.5.0,但经过测试在tensorflow2.4.0上也能使用。

2.1.3 Install dependencies

  1. 将源码clone到本地
git clone .git
  1. Server dependencies:
cd ./waymo-open-dataset-viewer
pip install -r requirements.txt
  1. 安装yarn
    详情参考这里
curl -sS .gpg | sudo apt-key add -
echo "deb / stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn
  1. Frontend dependecies:
yarn install

2.2 Usage

  1. Start the websocket that processes and serves the segment files in a given directory:
python websocket.py --segments-dir path/to/segments

python websocket.py --segments-dir /media/bit/waymo_open_dataset_v_1_3_2/validation
  1. 再打开一个终端,Build the frontend.
yarn build
  1. Now, you can open the index.html file (在你终端的当前目录下)in the browser or call
yarn serve

to start a small python server on port 8000 that serves the html file.

当运行上面的指令,终端会打印如下信息,将其中的网址:8000/用浏览器打开即可

yarn run v1.22.19
$ ./serve_frontend.sh
Serving HTTP on 0.0.0.0 port 8000 (:8000/) ...
  1. 效果展示
    可以从“SEGMENT”中选择所要展示的文件;FRAMES中分别是“当前展示帧”/“当前加载帧数量”/“总帧数”,下面的滚动条可以调整展示进度;“LASERS”中可以开关对应位置的雷达点云;“COLOR BY”可以设置目标染色依据,是类型还是反射率。

waymo-open-dataset-viewer效果演示

2.3 Known Issues

  1. GPU RAM报错
    If you had a GPU with a small RAM, misalignment between the LIDARs can happen.
    In this case, please try to run the websocket using CPU:
CUDA_VISIBLE_DEVICES="-1" python websocket.py --segments-dir path/to/segments

CUDA_VISIBLE_DEVICES="-1" python websocket.py --segments-dir /media/bit202/BIT202/waymo_open_dataset_v_1_3_2/validation

否则有可能出现如下报错

F tensorflow/core/util/cuda_solvers:120] Check failed: cublasCreate(&cublas_handle) == CUBLAS_STATUS_SUCCESS Failed to create cuBlas instance.
已放弃 (核心已转储)
  1. 安装yarn出问题
    如果直接使用sudo apt install yarn而不进行前面的设置,你可能会安装cmdtest,安装过程中他会提示你下面的信息,而这种情况下你后续的操作将无法实现。
注意,选中 'cmdtest' 而非 'yarn'

更多推荐

waymo

本文发布于:2024-03-08 06:31:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1720068.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:waymo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!