Commit 1472cf1c authored by fengzch-das's avatar fengzch-das
Browse files

update readme

parent 9dcafc71
<img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/pytorch3dlogo.png" width="900"/> # <div align="center"><strong>Pytorch3d</strong></div>
[![CircleCI](https://circleci.com/gh/facebookresearch/pytorch3d.svg?style=svg)](https://circleci.com/gh/facebookresearch/pytorch3d) ## 1 简介
[![Anaconda-Server Badge](https://anaconda.org/pytorch3d/pytorch3d/badges/version.svg)](https://anaconda.org/pytorch3d/pytorch3d)
# Introduction PyTorch3D 为基于 PyTorch 的 3D 计算机视觉研究提供了高效、可复用的组件。
主要功能包括:
PyTorch3D provides efficient, reusable components for 3D Computer Vision research with [PyTorch](https://pytorch.org). * 用于存储和操作三角网格的数据结构
* 高效的三角网格操作(投影变换、图卷积、采样、损失函数等)
* 可微分网格渲染器
Key features include: PyTorch3D 专为与深度学习方法无缝集成而设计,可用于预测和处理 3D 数据。因此,PyTorch3D 的所有算子均具备以下特性:
- Data structure for storing and manipulating triangle meshes * 基于 PyTorch 张量实现
- Efficient operations on triangle meshes (projective transformations, graph convolution, sampling, loss functions) * 支持异构数据的批量处理
- A differentiable mesh renderer * 可微分计算
- Implicitron, see [its README](projects/implicitron_trainer), a framework for new-view synthesis via implicit representations. ([blog post](https://ai.facebook.com/blog/implicitron-a-new-modular-extensible-framework-for-neural-implicit-representations-in-pytorch3d/)) * 支持 GPU 加速
PyTorch3D is designed to integrate smoothly with deep learning methods for predicting and manipulating 3D data. ## 2 安装
For this reason, all operators in PyTorch3D:
- Are implemented using PyTorch tensors 组件支持组合
- Can handle minibatches of hetereogenous data
- Can be differentiated
- Can utilize GPUs for acceleration
Within FAIR, PyTorch3D has been used to power research projects such as [Mesh R-CNN](https://arxiv.org/abs/1906.02739). | PyTorch版本 | fastpt版本 | cuBVH版本 | DTK版本 | Python版本 | 推荐编译方式 |
| ----------- | ---------- | ------------- | -------- | --------------- | ------------ |
| 2.5.1 | 2.1.0 | main-eeb9d5fa | >= 25.04 | 3.8、3.10、3.11 | fastpt不转码 |
| 2.4.1 | 2.0.1 | main-eeb9d5fa | >= 25.04 | 3.8、3.10、3.11 | fastpt不转码 |
See our [blog post](https://ai.facebook.com/blog/-introducing-pytorch3d-an-open-source-library-for-3d-deep-learning/) to see more demos and learn about PyTorch3D. + pytorch 版本大于 2.4.1 && dtk 版本大于 25.04 推荐使用 fastpt 不转码编译。
## Installation ### 2.1 使用pip方式安装
For detailed instructions refer to [INSTALL.md](INSTALL.md). pytorch3d whl 包下载目录:[光和开发者社区](https://download.sourcefind.cn:65024/4/main),选择对应的 pytorch 版本和 python 版本下载对应 pytorch3d 的 whl 包:
## License ```shell
pip install torch* # 下载torch的whl包
PyTorch3D is released under the [BSD License](LICENSE). pip install fastpt* --no-deps # 下载fastpt的whl包
source /usr/local/bin/fastpt -E
## Tutorials pip install pytorch3d* # # 下载的 pytorch3d-fastpt 的whl包
```
Get started with PyTorch3D by trying one of the tutorial notebooks.
|<img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/dolphin_deform.gif" width="310"/>|<img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/bundle_adjust.gif" width="310"/>|
|:-----------------------------------------------------------------------------------------------------------:|:--------------------------------------------------:|
| [Deform a sphere mesh to dolphin](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb)| [Bundle adjustment](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/bundle_adjustment.ipynb) |
| <img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/render_textured_mesh.gif" width="310"/> | <img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/camera_position_teapot.gif" width="310" height="310"/>
|:------------------------------------------------------------:|:--------------------------------------------------:|
| [Render textured meshes](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/render_textured_meshes.ipynb)| [Camera position optimization](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb)|
| <img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/pointcloud_render.png" width="310"/> | <img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/cow_deform.gif" width="310" height="310"/>
|:------------------------------------------------------------:|:--------------------------------------------------:|
| [Render textured pointclouds](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/render_colored_points.ipynb)| [Fit a mesh with texture](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/fit_textured_mesh.ipynb)|
| <img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/densepose_render.png" width="310"/> | <img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/shapenet_render.png" width="310" height="310"/>
|:------------------------------------------------------------:|:--------------------------------------------------:|
| [Render DensePose data](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/render_densepose.ipynb)| [Load & Render ShapeNet data](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/dataloaders_ShapeNetCore_R2N2.ipynb)|
| <img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/fit_textured_volume.gif" width="310"/> | <img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/fit_nerf.gif" width="310" height="310"/>
|:------------------------------------------------------------:|:--------------------------------------------------:|
| [Fit Textured Volume](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/fit_textured_volume.ipynb)| [Fit A Simple Neural Radiance Field](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/fit_simple_neural_radiance_field.ipynb)|
| <img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/fit_textured_volume.gif" width="310"/> | <img src="https://raw.githubusercontent.com/facebookresearch/pytorch3d/main/.github/implicitron_config.gif" width="310" height="310"/>
|:------------------------------------------------------------:|:--------------------------------------------------:|
| [Fit Textured Volume in Implicitron](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/implicitron_volumes.ipynb)| [Implicitron Config System](https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/implicitron_config_system.ipynb)|
## Documentation
Learn more about the API by reading the PyTorch3D [documentation](https://pytorch3d.readthedocs.org/).
We also have deep dive notes on several API components:
- [Heterogeneous Batching](https://github.com/facebookresearch/pytorch3d/tree/main/docs/notes/batching.md)
- [Mesh IO](https://github.com/facebookresearch/pytorch3d/tree/main/docs/notes/meshes_io.md)
- [Differentiable Rendering](https://github.com/facebookresearch/pytorch3d/tree/main/docs/notes/renderer_getting_started.md)
### Overview Video
We have created a short (~14 min) video tutorial providing an overview of the PyTorch3D codebase including several code examples. Click on the image below to watch the video on YouTube:
<a href="http://www.youtube.com/watch?v=Pph1r-x9nyY"><img src="http://img.youtube.com/vi/Pph1r-x9nyY/0.jpg" height="225" ></a>
## Development
We welcome new contributions to PyTorch3D and we will be actively maintaining this library! Please refer to [CONTRIBUTING.md](./.github/CONTRIBUTING.md) for full instructions on how to run the code, tests and linter, and submit your pull requests.
## Development and Compatibility
- `main` branch: actively developed, without any guarantee, Anything can be broken at any time
- REMARK: this includes nightly builds which are built from `main`
- HINT: the commit history can help locate regressions or changes
- backward-compatibility between releases: no guarantee. Best efforts to communicate breaking changes and facilitate migration of code or data (incl. models).
## Contributors
PyTorch3D is written and maintained by the Facebook AI Research Computer Vision Team.
In alphabetical order:
* Amitav Baruah
* Steve Branson
* Krzysztof Chalupka
* Jiali Duan
* Luya Gao
* Georgia Gkioxari
* Taylor Gordon
* Justin Johnson
* Patrick Labatut
* Christoph Lassner
* Wan-Yen Lo
* David Novotny
* Nikhila Ravi
* Jeremy Reizenstein
* Dave Schnizlein
* Roman Shapovalov
* Olivia Wiles
## Citation ### 2.2 使用源码编译方式安装
If you find PyTorch3D useful in your research, please cite our tech report: #### 2.2.1 编译环境准备
```bibtex 提供基于 fastpt 不转码编译:
@article{ravi2020pytorch3d,
author = {Nikhila Ravi and Jeremy Reizenstein and David Novotny and Taylor Gordon
and Wan-Yen Lo and Justin Johnson and Georgia Gkioxari},
title = {Accelerating 3D Deep Learning with PyTorch3D},
journal = {arXiv:2007.08501},
year = {2020},
}
```
If you are using the pulsar backend for sphere-rendering (the `PulsarPointRenderer` or `pytorch3d.renderer.points.pulsar.Renderer`), please cite the tech report: 1. 基于光源 pytorch 基础镜像环境:镜像下载地址:[光合开发者社区](https://sourcefind.cn/#/image/dcu/pytorch),根据 pytorch、python、dtk 及系统下载对应的镜像版本。
2. 基于现有 python 环境:安装 pytorch,fastpt whl 包下载目录:[光合开发者社区](https://sourcefind.cn/#/image/dcu/pytorch),根据 python、dtk 版本,下载对应 pytorch 的 whl 包。安装命令如下:
```bibtex ```shell
@article{lassner2020pulsar, pip install torch* # 下载torch的whl包
author = {Christoph Lassner and Michael Zollh\"ofer}, pip install fastpt* --no-deps # 下载fastpt的whl包, 安装顺序,先安装torch,后安装fastpt
title = {Pulsar: Efficient Sphere-based Neural Rendering}, pip install setuptools==59.5.0 wheel pytest
journal = {arXiv:2004.07484},
year = {2020},
}
``` ```
## News #### 2.2.2 源码编译安装
Please see below for a timeline of the codebase updates in reverse chronological order. We are sharing updates on the releases as well as research projects which are built with PyTorch3D. The changelogs for the releases are available under [`Releases`](https://github.com/facebookresearch/pytorch3d/releases), and the builds can be installed using `conda` as per the instructions in [INSTALL.md](INSTALL.md). - 代码下载
**[Oct 31st 2023]:** PyTorch3D [v0.7.5](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.7.5) released. ```shell
git clone http://developer.sourcefind.cn/codes/OpenDAS/pytorch3d.git # 根据编译需要切换分支
```
**[May 10th 2023]:** PyTorch3D [v0.7.4](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.7.4) released. - 提供2种源码编译方式(进入 pytorch3d 目录):
- 源码编译安装:
**[Apr 5th 2023]:** PyTorch3D [v0.7.3](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.7.3) released. ```bash
source /usr/local/bin/fastpt -C
**[Dec 19th 2022]:** PyTorch3D [v0.7.2](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.7.2) released. export FORCE_CUDA=1 # 编译 cuda 版本
**[Oct 23rd 2022]:** PyTorch3D [v0.7.1](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.7.1) released. python setup.py develop
python setup.py install
```
- whl 包构建安装:
**[Aug 10th 2022]:** PyTorch3D [v0.7.0](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.7.0) released with Implicitron and MeshRasterizerOpenGL. ```bash
source /usr/local/bin/fastpt -C
export FORCE_CUDA=1 # 编译 cuda 版本
python setup.py bdist_wheel # 该指令用于编译 whl 包
pip install dist/pytorch3d-0.7.8-cp310-cp310-linux_x86_64.whl
```
**[Apr 28th 2022]:** PyTorch3D [v0.6.2](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.6.2) released #### 2.2.3 注意事项
**[Dec 16th 2021]:** PyTorch3D [v0.6.1](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.6.1) released + ROCM_PATH 为 dtk 的路径,默认为 /opt/dtk;
+ 在 pytorch2.5.1 环境下编译需要支持 c++17 语法,打开setup.py文件,把文件中的 -std=c++14 修改为 -std=c++17。
**[Oct 6th 2021]:** PyTorch3D [v0.6.0](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.6.0) released ## 3 验证
- 执行下面的命令获取版本号:
```bash
source /usr/local/bin/fastpt -E
**[Aug 5th 2021]:** PyTorch3D [v0.5.0](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.5.0) released python
>>> import pytorch3d
>>> pytorch3d.__version__
'0.7.8'
```
**[Feb 9th 2021]:** PyTorch3D [v0.4.0](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.4.0) released with support for implicit functions, volume rendering and a [reimplementation of NeRF](https://github.com/facebookresearch/pytorch3d/tree/main/projects/nerf). - 执行下面的命令测试组件:
**[November 2nd 2020]:** PyTorch3D [v0.3.0](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.3.0) released, integrating the pulsar backend. ```bash
pip install omegaconf
pip install tabulate
pip install pyopengl
pip install pycuda
pip install visdom
pip install lpips
pip install plotly
**[Aug 28th 2020]:** PyTorch3D [v0.2.5](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.2.5) released source /usr/local/bin/fastpt -E
**[July 17th 2020]:** PyTorch3D tech report published on ArXiv: https://arxiv.org/abs/2007.08501 export PYTORCH3D_NO_TEST_OPENGL=1 # skip OpenGL 相关测试用例
pytest -vs ./tests
```
**[April 24th 2020]:** PyTorch3D [v0.2.0](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.2.0) released ## 4 Known Issue
**[March 25th 2020]:** [SynSin](https://arxiv.org/abs/1912.08804) codebase released using PyTorch3D: https://github.com/facebookresearch/synsin -
**[March 8th 2020]:** PyTorch3D [v0.1.1](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.1.1) bug fix release ## 5 参考资料
**[Jan 23rd 2020]:** PyTorch3D [v0.1.0](https://github.com/facebookresearch/pytorch3d/releases/tag/v0.1.0) released. [Mesh R-CNN](https://arxiv.org/abs/1906.02739) codebase released: https://github.com/facebookresearch/meshrcnn - [README_ORIGIN](README_ORIGIN.md)
- [https://github.com/facebookresearch/pytorch3d.git](https://github.com/facebookresearch/pytorch3d.git)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment