# Reimplement VectorNet :car:
Paper: [VectorNet: Encoding HD Maps and Agent Dynamics from Vectorized Representation](https://arxiv.org/abs/2005.04259)
Still under construction:
- [x] finish the feature preprocessor
- [x] finish the hierarchical GNN
- [x] overfit the tiny sample dataset
- [x] batchify the data and compute subgraph in parallel
- [X] evaluate results on DE / ADE metrics
- [x] refine the feature preprocessor (how to encode the features)
- [x] Check the correctness of hierarchical-GNN's implementation
- [x] run on the whole dataset (running)
- [x] add multi-GPU training (currently too slow, 2h an epoch)
- [ ] add uni-test for each modules
- [ ] More advanced trajectory predictor, generate diverse trajectories (MultiPath, or variational RNNs; current using MLP)
- [ ] add node feature completing module
Inplement a Vectornet: hierarchical GNN encoder (no feature completing) + MLP predictor, without node feature completing.
~~The performance on test is 3.255 on minADE (K=1) v.s that in paper of 1.81.~~ (bug found in `GraphDataset`: the former implementation contained *self-loops connection* in graph data, which was wrong; and the preprocessed `dataset.pt` was also wrong; now the model is still trainning...)
After I fix the bug about self-loops in `Graph.Data`, I re-train the network with the same setting but only to find the performance on the validation set remains the same for about 2.6 of ADE, which was so disappointing. Notice that I only use the context (social + lanes) with about 5-10 meters around each agent (not enough machine for me), so I tried to change the context radius to 100 meters in `config.py` file (in the paper it's 200 * 200 if my memory serves me right). Unfortunately, the machines in the lab are not accessible to me right now, so I couldn't train the network with these new settings. :cry:
branch `master` is sync with branch `large-scale`; branch `overfit-small` is archived.
---
## Table of Contents
- [Environment](#Environment)
- [Usage](#Usage)
- [Results on val and test](#Results-on-val-and-test)
- [Result and visualization for overfitting tiny dataset](#Result-and-visualization-for-overfitting-tiny-dataset)
---
## Environment
Multi-GPU training on Windows Serer 2016; CUDA version 10.1; 2 Titan Xp GPUs.
Install the packages mentioned in requirements.txt
```
pip install -r requirements.txt
```
> torch==1.4.0,
argoverse-api,
numpy==1.18.1,
pandas==1.0.0,
matplotlib==3.1.1,
torch-geometric==1.5.0
## Usage
For pre-processed data, pre-trained model, and results `*.h5` file: [Google Drive](https://drive.google.com/drive/folders/1XJ2Oz4Qc2UstnfRw3DNvQThuEVvM6tUL?usp=sharing)
(Remember to run `find . -name "*.DS_Store" -type f -delete` if you're using MacOS)
0) Install [Argoverse-api](https://github.com/argoai/argoverse-api/tree/master/argoverse). Download `HD-maps` in argoverse-api as instructed.
1) download [the prepared dataset objects on Google Drive](https://drive.google.com/drive/folders/1XJ2Oz4Qc2UstnfRw3DNvQThuEVvM6tUL?usp=sharing) directly and unzip it in path `.`, and skip step 3.
or prepared the dataset (batchify ...) from raw *.csv.
put all data (folders named `train/val/test` or a single folder `sample`) in `data` folder.
An example folder structure:
```
data - train - *.csv
\ \ ...
\
\- val - *.csv
\ \ ...
\
\- test - *.csv
\ ...
```
2) Modify the config file `utils/config.py`. Use the proper env paths and arguments.
3) Feature preprocessing, save intermediate data input features (compute_feature_module.py)
```
$ python compute_feature_module.py
```
Use (200, 200) size for a single sequence as the paper told.
4) Train the model (`train.py`; overfit a tiny dataset by setting `small_dataset = True`, and use `GraphDataset` in `dataset.py` to batchify the data)
```
$ python train.py
```
---
## Results on val and test
Some predicting results were uploaded to the Argoverse contest, check the board via the [url](https://evalai.cloudcv.org/web/challenges/challenge-page/454/leaderboard/)
Submission ID of the repo: @xkhuang
### Result on val
| model params | minADE (K=1) | minFDE (K=1) |
| ------------------------------------------------------------ | ------------ | ------------ |
| results in paper | 1.66 | 3.67 |
| epoch_24.valminade_2.637.200624.xkhuang.pth | 2.637 | |
### Result on test
| model params | minADE (K=1) | minFDE (K=1) |
| ------------------------------------------------------------ | ------------ | ------------ |
| results in paper | 1.81 | 4.01 |
| epoch_24.valminade_2.637.200624.xkhuang.pth | 3.255298 | 6.992046 |
---
## Result and visualization for overfitting tiny dataset
Sample results are shown below:
* red lines are agent input and ground truth output
* blue points are predicted feature tarjectory
* light blue lanes are other moving objects
* grey lines are lanes
### Using nearby context (about 5M around):
| | |
|:-------------------------:|:-------------------------:|
| ![](images/1.png) | ![](images/2.png) |
| ![](images/3.png) | ![](images/4.png) |
### Using 200 * 200 context (about 100M around):
with lanes:
| | |
|:-------------------------:|:-------------------------:|
| ![](images/200*200-1-1.png) | ![](images/200*200-2-1.png) |
| ![](images/200*200-3-1.png) | ![](images/200*200-4-1.png) |
| ![](images/200*200-5-1.png) | |
without lanes:
| | |
|:-------------------------:|:-------------------------:|
| ![](images/200*200-1-2.png) | ![](images/200*200-2-2.png) |
| ![](images/200*200-3-2.png) | ![](images/200*200-4-2.png) |
| ![](images/200*200-5-2.png) | |
没有合适的资源?快使用搜索试试~ 我知道了~
人工智能+Vectornet源码详解+博客资源
共214个文件
csv:86个
pkl:45个
py:19个
需积分: 0 59 下载量 16 浏览量
2023-01-01
14:17:22
上传
评论
收藏 4.62MB ZIP 举报
温馨提示
人工智能+Vectornet源码详解+博客资源,博客地址https://blog.csdn.net/qq_52053775/article/details/128510992
资源推荐
资源详情
资源评论
收起资源包目录
人工智能+Vectornet源码详解+博客资源 (214个子文件)
config 278B
33333.csv 167KB
33333.csv 167KB
33333.csv 167KB
33333.csv 167KB
167841.csv 148KB
95563.csv 142KB
71268.csv 137KB
31341.csv 130KB
31341.csv 130KB
31341.csv 130KB
31341.csv 130KB
11800.csv 123KB
11800.csv 123KB
11800.csv 123KB
11800.csv 123KB
65255.csv 121KB
147134.csv 117KB
893.csv 115KB
893.csv 115KB
893.csv 115KB
893.csv 115KB
179790.csv 113KB
143762.csv 110KB
208898.csv 109KB
162681.csv 102KB
193760.csv 101KB
198617.csv 101KB
157114.csv 100KB
164591.csv 99KB
85927.csv 99KB
142965.csv 98KB
119998.csv 96KB
30414.csv 89KB
30414.csv 89KB
30414.csv 89KB
30414.csv 89KB
90171.csv 88KB
68950.csv 84KB
2468.csv 81KB
2468.csv 81KB
2468.csv 81KB
2468.csv 81KB
136133.csv 79KB
4674.csv 77KB
4674.csv 77KB
4674.csv 77KB
4674.csv 77KB
38439.csv 75KB
38439.csv 75KB
38439.csv 75KB
38439.csv 75KB
187154.csv 72KB
97577.csv 68KB
16177.csv 68KB
16177.csv 68KB
16177.csv 68KB
16177.csv 68KB
175155.csv 68KB
106639.csv 66KB
100499.csv 62KB
186293.csv 57KB
53760.csv 56KB
53760.csv 56KB
53760.csv 56KB
53760.csv 56KB
35305.csv 47KB
35305.csv 47KB
35305.csv 47KB
35305.csv 47KB
40764.csv 46KB
40764.csv 46KB
40764.csv 46KB
40764.csv 46KB
96350.csv 42KB
20804.csv 40KB
20804.csv 40KB
20804.csv 40KB
20804.csv 40KB
77822.csv 40KB
112402.csv 40KB
207679.csv 35KB
36858.csv 29KB
36858.csv 29KB
36858.csv 29KB
36858.csv 29KB
165065.csv 0B
description 73B
exclude 240B
.gitignore 96B
.gitignore 47B
HEAD 198B
HEAD 198B
HEAD 32B
HEAD 23B
pack-4161174158344823625ded08e0aff6ac19c172d3.idx 9KB
yet-another-vectornet.iml 481B
index 3KB
master 198B
master 41B
共 214 条
- 1
- 2
- 3
资源评论
樱花的浪漫
- 粉丝: 4w+
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 7777端口抓包数据集
- IMG_0694.GIF
- 基于图像的三维模型重建C++源代码+文档说明(高分课程设计)
- 基于聚焦法的工件立体测量方案,根据数据进行三维重建 使用HALCON处理图像,MATLAB拟合数据+源代码+数据集+效果图
- 锄战三国村 修改:货币使用不减 v1.10(2) 原创 (中文).apk
- 基于python实现的单目双目视觉三维重建+源代码+图像图片(高分课程设计)
- 基于C+++OPENCV的全景图像拼接源码(课程设计)
- 基于Python+OpenCV对多张图片进行全景图像拼接,消除鬼影,消除裂缝+源代码+文档说明+界面截图(高分课程设计)
- 基于C++实现的全景图像拼接源码(课程设计)
- 基于SIFT特征点提取和RASIC算法实现全景图像拼接python源码+文档说明+界面截图+详细注释(95分以上课程大作业)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功