---
title: cv_sceneflow_estimation
canonical_url: "https://www.modelscope.cn/models/iic/cv_sceneflow_estimation"
md_url: "https://www.modelscope.cn/models/iic/cv_sceneflow_estimation.md"
repository: iic/cv_sceneflow_estimation
chinese_name: "点云sceneflow预测"
last_updated: 2024-07-18
pipeline_tag: pointcloud-sceneflow-estimation
tasks:
  - pointcloud-sceneflow-estimation
library_name:
  - pytorch
frameworks:
  - pytorch
downloads: 123
stars: 3
---

# cv_sceneflow_estimation

> cv_sceneflow_estimation - iic 在 ModelScope 开源的模型。在点云sceneflow的预测的任务上，采用递归神经网络和attention机制来迭代求解每次flow的增量，在FlyingThings3D仿真数据集上进行训练，可以用于点云的配准等任务中。

- **Repository**: iic/cv_sceneflow_estimation
- **Tasks**: pointcloud-sceneflow-estimation
- **Downloads**: 123
- **Stars**: 3
- **Last updated**: 2024-07-18

Source: https://www.modelscope.cn/models/iic/cv_sceneflow_estimation

---

# SceneFlow Estimation on 3D Point Clouds 介绍
任务：输入两堆点云，输出每个点的三维光流（xyz）


## 模型描述
采用递归神经网络和attention机制来迭代求解每次flow的增量。递归神经网络可以记忆之前的尝试过的历史经验（当前的预测值和当前的cost）来指导下一步增量的预测。每次迭代预测需要计算当前的cost，即找对应点然后计算特征距离。由于点云的稀疏原因，无法类似2d图像，不一定能找够找到匹配点，为次我们采用attention的机制利用一堆邻域点插值出匹配点。

该模型在FlyingThings3D仿真数据集上进行训练，可以用于点云的配准等任务中。


## 期望模型使用方式以及适用范围
本模型主要用于点云的sceneflow求解。用户可以自行尝试各种输入点云的模型效果。具体调用方式请参考代码示例。
受限于显存，输入的点云要求点的数量<=8192（推荐用户先自行降采样）


### 如何使用
在ModelScope里可以比较方便的使用

### 代码范例

``` python
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

img_captioning = pipeline(
            Tasks.image_captioning,
            model='damo/ofa_image-caption_coco_large_en')
result = img_captioning('data/test/images/image_captioning.png')
print(result['caption'])
```

### 模型局限性以及可能的偏差
该模型在FlyingThings3D数据集上训练，有可能产生一些偏差，请用户自行评测后决定如何使用。



## 训练数据介绍
FlyingThings3D是一个合成数据集，由ShapeNet数据集中的多个随机采样移动对象的场景渲染而成。它包含大约32k个立体图像，包括地面真实视差和光流图

## 模型训练流程
暂时不支持通过ModelScope接口进行训练，敬请期待。

描述模型是如何具体训练出来的。

### 预处理

我们按照之前的工作 [HPLFlowNet](https://github.com/laoreja/HPLFlowNet)来预处理数据集

1、下载FlyingThings3D数据，下载链接[FlyingThings3D website](https://lmb.informatik.uni-freiburg.de/resources/datasets/SceneFlowDatasets.en.html) 或者 [FlyingThings3D download paths](https://lmb.informatik.uni-freiburg.de/data/FlyingThings3D_subset/FlyingThings3D_subset_all_download_paths.txt)

2、解压后到 RAW_DATA_PATH 文件夹，然后使用HPLFlowNet提供的脚本进行预处理
```
python data_preprocess/process_flyingthings3d_subset.py --raw_data_path ${RAW_DATA_PATH} --save_path ${SAVE_PATH}/FlyingThings3D_subset_processed_35m --only_save_near_pts
```



### 训练
暂不支持

## 数据评估及结果

| Datasets | EPE3D | Acc3DS | AccDR | Outliers3D |
| :--- | :---: | :---: | :---: |  :---: |
| FlyingThings3D | 0.0403 | 0.8567 | 0.9635 | 0.1976 |
| KITTI | 0.0481 | 0.8491 | 0.9448 | 0.1228 |


## 相关论文以及引用信息
如果你觉得这个该模型对有所帮助，请考虑引用下面的相关的论文：
```
@inproceedings{gu2022rcp,
  title={RCP: Recurrent Closest Point for Point Cloud},
  author={Gu, Xiaodong and Tang, Chengzhou and Yuan, Weihao and Dai, Zuozhuo and Zhu, Siyu and Tan, Ping},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={8216--8226},
  year={2022}
}
```
该项目中一些代码来自于：[Flowstep3d](https://github.com/yairkit/flowstep3d), [FLOT](https://github.com/valeoai/FLOT), [flownet3d_Pytorch](https://github.com/hyangwinter/flownet3d_pytorch), [HPLFlowNet](https://github.com/laoreja/HPLFlowNet) and [Pointnet2.PyTorch](https://github.com/sshaoshuai/Pointnet2.PyTorch)，非常感谢他们开源了相关的工作。
